]> git.sur5r.net Git - i3/i3/blob - Makefile.am
Merge branch 'next' into master
[i3/i3] / Makefile.am
1 @CODE_COVERAGE_RULES@
2
3 echo-version:
4         @echo "@I3_VERSION@"
5
6 bin_PROGRAMS = \
7         i3 \
8         i3bar/i3bar \
9         i3-config-wizard/i3-config-wizard \
10         i3-dump-log/i3-dump-log \
11         i3-input/i3-input \
12         i3-msg/i3-msg \
13         i3-nagbar/i3-nagbar
14
15 install-exec-hook:
16         $(LN_S) -f i3 $(DESTDIR)$(bindir)/i3-with-shmlog
17
18 uninstall-hook:
19         rm -f $(DESTDIR)$(bindir)/i3-with-shmlog
20
21 i3includedir=$(includedir)/i3
22 i3include_HEADERS = \
23         include/i3/ipc.h
24
25 dist_bin_SCRIPTS = \
26         i3-dmenu-desktop \
27         i3-migrate-config-to-v4 \
28         i3-save-tree \
29         i3-sensible-editor \
30         i3-sensible-pager \
31         i3-sensible-terminal
32
33 i3confdir = $(sysconfdir)/i3
34 dist_i3conf_DATA = \
35         etc/config \
36         etc/config.keycodes
37
38 applicationsdir = $(datarootdir)/applications
39 xsessionsdir = $(datarootdir)/xsessions
40 dist_applications_DATA = \
41         share/applications/i3.desktop
42 dist_xsessions_DATA = \
43         share/xsessions/i3.desktop \
44         share/xsessions/i3-with-shmlog.desktop
45
46 noinst_LIBRARIES = libi3.a
47
48 check_PROGRAMS = \
49         test.commands_parser \
50         test.config_parser \
51         test.inject_randr15
52
53 check_SCRIPTS = \
54         testcases/complete-run.pl
55
56 check_DATA = \
57         anyevent-i3.stamp
58
59 clean-check:
60         rm -rf testsuite-* latest i3-cfg-for-* _Inline
61 clean-local: clean-check
62
63 TESTS = testcases/complete-run.pl
64
65 EXTRA_DIST = \
66         $(dist_docs_toc_DATA:.html=) \
67         $(dist_docs_notoc_DATA:.html=) \
68         docs/asciidoc-git.conf \
69         docs/bigpicture.png \
70         docs/i3-pod2html \
71         docs/i3-sync.dia \
72         docs/i3-sync.png \
73         docs/i3-sync-working.dia \
74         docs/i3-sync-working.png \
75         docs/keyboard-layer1.png \
76         docs/keyboard-layer2.png \
77         docs/layout-saving-1.png \
78         docs/logo-30.png \
79         docs/modes.png \
80         docs/refcard.html \
81         docs/refcard_style.css \
82         docs/single_terminal.png \
83         docs/snapping.png \
84         docs/tree-layout1.png \
85         docs/tree-layout2.png \
86         docs/tree-shot1.png \
87         docs/tree-shot2.png \
88         docs/tree-shot3.png \
89         docs/tree-shot4.png \
90         docs/two_columns.png \
91         docs/two_terminals.png \
92         docs/wsbar.dia \
93         docs/wsbar.png \
94         i3bar/LICENSE \
95         libi3/README \
96         $(asciidoc_MANS:.1=.man) \
97         $(asciidoc_MANS:.1=.man) \
98         man/asciidoc.conf.in \
99         DEPENDS \
100         I3_VERSION \
101         LICENSE \
102         PACKAGE-MAINTAINER \
103         RELEASE-NOTES-4.14 \
104         generate-command-parser.pl \
105         parser-specs/commands.spec \
106         parser-specs/config.spec \
107         parser-specs/highlighting.vim \
108         pseudo-doc.doxygen \
109         testcases/complete-run.pl.in \
110         testcases/i3-test.config \
111         testcases/lib/i3test/Test.pm \
112         testcases/lib/i3test/Util.pm \
113         testcases/lib/i3test/XTEST.pm \
114         testcases/lib/i3test.pm.in \
115         testcases/lib/SocketActivation.pm \
116         testcases/lib/StartXServer.pm \
117         testcases/lib/StatusLine.pm \
118         testcases/lib/TestWorker.pm \
119         testcases/Makefile.PL \
120         testcases/new-test \
121         testcases/restart-state.golden \
122         testcases/t \
123         testcases/valgrind.supp
124
125 # dirstamps contains directories which we want to be created in $(top_builddir)
126 # so that our custom rules can store files in them.
127 dirstamp = .dirstamp
128 dirstamps = \
129         docs/$(dirstamp) \
130         man/$(dirstamp) \
131         parser/$(dirstamp)
132 DISTCLEANFILES = $(dirstamps)
133
134 $(dirstamps):
135         @stamp='$@'; $(MKDIR_P) "$${stamp%/*}"
136         @: > $@
137
138 ################################################################################
139 # docs generation
140 ################################################################################
141
142 docs_tocdir = ${docdir}
143 docs_notocdir = ${docdir}
144 docs_poddir = ${docdir}
145 if BUILD_DOCS
146 dist_docs_toc_DATA = \
147         docs/hacking-howto.html \
148         docs/userguide.html \
149         docs/ipc.html \
150         docs/multi-monitor.html \
151         docs/wsbar.html \
152         docs/testsuite.html \
153         docs/i3bar-protocol.html \
154         docs/layout-saving.html
155
156 dist_docs_notoc_DATA = \
157         docs/debugging.html
158
159 dist_docs_pod_DATA = \
160         docs/lib-i3test.html \
161         docs/lib-i3test-test.html
162
163 $(dist_docs_toc_DATA): docs/%.html: docs/% docs/$(dirstamp)
164         $(AM_V_GEN) @PATH_ASCIIDOC@ -a toc -n -o $@ $<
165
166 $(dist_docs_notoc_DATA): docs/%.html: docs/% docs/$(dirstamp)
167         $(AM_V_GEN) @PATH_ASCIIDOC@ -n -o $@ $<
168
169 docs/lib-i3test.html: testcases/lib/i3test.pm docs/$(dirstamp)
170         $(AM_V_GEN) $(top_srcdir)/docs/i3-pod2html $< $@
171
172 docs/lib-i3test-test.html: testcases/lib/i3test/Test.pm docs/$(dirstamp)
173         $(AM_V_GEN) $(top_srcdir)/docs/i3-pod2html $< $@
174
175 else
176 dist_docs_toc_DATA =
177 dist_docs_notoc_DATA =
178 dist_docs_pod_DATA =
179 endif
180
181 ################################################################################
182 # manpage generation
183 ################################################################################
184
185 if BUILD_MANS
186 dist_man1_MANS = \
187         $(asciidoc_MANS) \
188         $(pod_MANS)
189
190 asciidoc_MANS = \
191         man/i3.1 \
192         man/i3bar.1 \
193         man/i3-msg.1 \
194         man/i3-input.1 \
195         man/i3-nagbar.1 \
196         man/i3-config-wizard.1 \
197         man/i3-migrate-config-to-v4.1 \
198         man/i3-sensible-editor.1 \
199         man/i3-sensible-pager.1 \
200         man/i3-sensible-terminal.1 \
201         man/i3-dump-log.1
202
203 pod_MANS = \
204         man/i3-dmenu-desktop.1 \
205         man/i3-save-tree.1
206
207 $(asciidoc_MANS): man/%.1: man/%.xml man/$(dirstamp)
208         $(AM_V_GEN) out='$@'; @PATH_XMLTO@ man -o "$${out%/*}" $<
209         @stamp='$@'; $(MKDIR_P) "$${stamp%/*}"
210
211 man/%.xml: man/%.man man/asciidoc.conf man/$(dirstamp)
212         $(AM_V_GEN) @PATH_ASCIIDOC@ -d manpage -b docbook -f $(top_builddir)/man/asciidoc.conf -o $@ $<
213
214 $(pod_MANS): man/%.1: % man/$(dirstamp)
215         $(AM_V_GEN) @PATH_POD2MAN@ --utf8 $< > $@
216 else
217 asciidoc_MANS =
218 endif
219
220 AM_CPPFLAGS = \
221         -DSYSCONFDIR="\"$(sysconfdir)\"" \
222         -I$(top_builddir)/parser \
223         -I$(top_srcdir)/include \
224         @AX_EXTEND_SRCDIR_CPPFLAGS@
225
226 i3_CFLAGS = \
227         $(AM_CFLAGS) \
228         $(libi3_CFLAGS) \
229         $(LIBSN_CFLAGS) \
230         $(XCB_CFLAGS) \
231         $(XCB_UTIL_CURSOR_CFLAGS) \
232         $(XCB_UTIL_KEYSYM_CFLAGS) \
233         $(XCB_UTIL_WM_CFLAGS) \
234         $(XCB_UTIL_XRM_CFLAGS) \
235         $(XKBCOMMON_CFLAGS) \
236         $(YAJL_CFLAGS) \
237         $(LIBPCRE_CFLAGS) \
238         $(PTHREAD_CFLAGS) \
239         $(CODE_COVERAGE_CFLAGS)
240
241 i3_CPPFLAGS = \
242         $(AM_CPPFLAGS) \
243         $(CODE_COVERAGE_CPPFLAGS)
244
245 i3_LDADD = \
246         $(libi3_LIBS) \
247         $(LIBSN_LIBS) \
248         $(XCB_LIBS) \
249         $(XCB_UTIL_CURSOR_LIBS) \
250         $(XCB_UTIL_KEYSYMS_LIBS) \
251         $(XCB_UTIL_WM_LIBS) \
252         $(XCB_UTIL_XRM_LIBS) \
253         $(XKBCOMMON_LIBS) \
254         $(YAJL_LIBS) \
255         $(LIBPCRE_LIBS) \
256         $(PANGOCAIRO_LIBS) \
257         $(PTHREAD_LIBS) \
258         $(CODE_COVERAGE_LDFLAGS)
259
260 libi3_CFLAGS = \
261         $(AM_CFLAGS) \
262         $(XCB_CFLAGS) \
263         $(XCB_UTIL_CFLAGS) \
264         $(XCB_UTIL_XRM_CFLAGS) \
265         $(YAJL_CFLAGS) \
266         $(PANGOCAIRO_CFLAGS)
267
268 libi3_LIBS = \
269         $(top_builddir)/libi3.a \
270         $(XCB_LIBS) \
271         $(XCB_UTIL_LIBS) \
272         $(XCB_UTIL_XRM_LIBS) \
273         $(YAJL_LIBS) \
274         $(PANGOCAIRO_LIBS)
275
276 libi3_a_CFLAGS = \
277         $(libi3_CFLAGS)
278
279 libi3_a_SOURCES = \
280         include/libi3.h \
281         libi3/dpi.c \
282         libi3/draw_util.c \
283         libi3/fake_configure_notify.c \
284         libi3/font.c \
285         libi3/format_placeholders.c \
286         libi3/get_colorpixel.c \
287         libi3/get_config_path.c \
288         libi3/get_exe_path.c \
289         libi3/get_mod_mask.c \
290         libi3/get_process_filename.c \
291         libi3/get_visualtype.c \
292         libi3/ipc_connect.c \
293         libi3/ipc_recv_message.c \
294         libi3/ipc_send_message.c \
295         libi3/is_debug_build.c \
296         libi3/mkdirp.c \
297         libi3/resolve_tilde.c \
298         libi3/root_atom_contents.c \
299         libi3/safewrappers.c \
300         libi3/string.c \
301         libi3/strndup.c \
302         libi3/ucs2_conversion.c
303
304 i3_dump_log_i3_dump_log_CFLAGS = \
305         $(AM_CFLAGS) \
306         $(PTHREAD_CFLAGS) \
307         $(libi3_CFLAGS)
308
309 i3_dump_log_i3_dump_log_LDADD = \
310         $(PTHREAD_LIBS) \
311         $(libi3_LIBS)
312
313 i3_dump_log_i3_dump_log_SOURCES = \
314         i3-dump-log/main.c
315
316 i3_input_i3_input_CFLAGS = \
317         $(AM_CFLAGS) \
318         $(libi3_CFLAGS)
319
320 i3_input_i3_input_LDADD = \
321         $(libi3_LIBS) \
322         $(XCB_UTIL_KEYSYMS_LIBS)
323
324 i3_input_i3_input_SOURCES = \
325         i3-input/i3-input.h \
326         i3-input/keysym2ucs.c \
327         i3-input/keysym2ucs.h \
328         i3-input/main.c
329
330 i3_msg_i3_msg_CFLAGS = \
331         $(AM_CFLAGS) \
332         $(libi3_CFLAGS)
333
334 i3_msg_i3_msg_LDADD = \
335         $(libi3_LIBS)
336
337 i3_msg_i3_msg_SOURCES = \
338         i3-msg/main.c
339
340 i3_nagbar_i3_nagbar_CFLAGS = \
341         $(AM_CFLAGS) \
342         $(libi3_CFLAGS)
343
344 i3_nagbar_i3_nagbar_LDADD = \
345         $(libi3_LIBS) \
346         $(XCB_UTIL_CURSOR_LIBS)
347
348 i3_nagbar_i3_nagbar_SOURCES = \
349         i3-nagbar/atoms.xmacro \
350         i3-nagbar/i3-nagbar.h \
351         i3-nagbar/main.c
352
353 i3bar_i3bar_CPPFLAGS = \
354         $(AM_CPPFLAGS) \
355         -I$(top_srcdir)/i3bar/include
356
357 i3bar_i3bar_CFLAGS = \
358         $(AM_CFLAGS) \
359         $(libi3_CFLAGS) \
360         $(XCB_CFLAGS) \
361         $(XKBCOMMON_CFLAGS) \
362         $(PANGOCAIRO_CFLAGS) \
363         $(YAJL_CFLAGS)
364
365 i3bar_i3bar_LDADD = \
366         $(libi3_LIBS) \
367         $(XCB_LIBS) \
368         $(XCB_UTIL_CURSOR_LIBS) \
369         $(XKBCOMMON_LIBS) \
370         $(PANGOCAIRO_LIBS) \
371         $(YAJL_LIBS)
372
373 i3bar_i3bar_SOURCES = \
374         i3bar/include/child.h \
375         i3bar/include/common.h \
376         i3bar/include/configuration.h \
377         i3bar/include/ipc.h \
378         i3bar/include/mode.h \
379         i3bar/include/outputs.h \
380         i3bar/include/parse_json_header.h \
381         i3bar/include/trayclients.h \
382         i3bar/include/util.h \
383         i3bar/include/workspaces.h \
384         i3bar/include/xcb_atoms.def \
385         i3bar/include/xcb.h \
386         i3bar/src/child.c \
387         i3bar/src/config.c \
388         i3bar/src/ipc.c \
389         i3bar/src/main.c \
390         i3bar/src/mode.c \
391         i3bar/src/outputs.c \
392         i3bar/src/parse_json_header.c \
393         i3bar/src/workspaces.c \
394         i3bar/src/xcb.c
395
396 i3_config_wizard_i3_config_wizard_CFLAGS = \
397         $(AM_CFLAGS) \
398         $(libi3_CFLAGS) \
399         $(XKBCOMMON_CFLAGS)
400
401 i3_config_wizard_i3_config_wizard_LDADD = \
402         $(libi3_LIBS) \
403         $(XCB_UTIL_KEYSYMS_LIBS) \
404         $(XKBCOMMON_LIBS)
405
406 i3_config_wizard_i3_config_wizard_SOURCES = \
407         i3-config-wizard/atoms.xmacro \
408         i3-config-wizard/main.c \
409         i3-config-wizard/xcb.h
410
411 test_inject_randr15_CPPFLAGS = \
412         $(AM_CPPFLAGS)
413
414 test_inject_randr15_CFLAGS = \
415         $(AM_CFLAGS) \
416         $(i3_CFLAGS)
417
418 test_inject_randr15_SOURCES = \
419         testcases/inject_randr1.5.c
420
421 test_inject_randr15_LDADD = \
422         $(i3_LDADD)
423
424 test_commands_parser_CPPFLAGS = \
425         $(AM_CPPFLAGS) \
426         -DTEST_PARSER
427
428 test_commands_parser_CFLAGS = \
429         $(AM_CFLAGS) \
430         $(i3_CFLAGS)
431
432 test_commands_parser_SOURCES = \
433         src/commands_parser.c
434
435 test_commands_parser_LDADD = \
436         $(i3_LDADD)
437
438 test_config_parser_CPPFLAGS = \
439         $(AM_CPPFLAGS) \
440         -DTEST_PARSER
441
442 test_config_parser_CFLAGS = \
443         $(AM_CFLAGS) \
444         $(i3_CFLAGS)
445
446 test_config_parser_SOURCES = \
447         src/config_parser.c
448
449 test_config_parser_LDADD = \
450         $(i3_LDADD)
451
452 command_parser_SOURCES = \
453         parser/GENERATED_command_enums.h \
454         parser/GENERATED_command_tokens.h \
455         parser/GENERATED_command_call.h
456
457 config_parser_SOURCES = \
458         parser/GENERATED_config_enums.h \
459         parser/GENERATED_config_tokens.h \
460         parser/GENERATED_config_call.h
461
462 i3_SOURCES = \
463         $(command_parser_SOURCES) \
464         $(config_parser_SOURCES) \
465         include/all.h \
466         include/assignments.h \
467         include/atoms_NET_SUPPORTED.xmacro \
468         include/atoms_rest.xmacro \
469         include/atoms.xmacro \
470         include/bindings.h \
471         include/click.h \
472         include/cmdparse.h \
473         include/commands.h \
474         include/commands_parser.h \
475         include/config_directives.h \
476         include/configuration.h \
477         include/config_parser.h \
478         include/con.h \
479         include/data.h \
480         include/display_version.h \
481         include/ewmh.h \
482         include/fake_outputs.h \
483         include/floating.h \
484         include/handlers.h \
485         include/i3.h \
486         include/ipc.h \
487         include/key_press.h \
488         include/load_layout.h \
489         include/log.h \
490         include/main.h \
491         include/manage.h \
492         include/match.h \
493         include/move.h \
494         include/output.h \
495         include/queue.h \
496         include/randr.h \
497         include/regex.h \
498         include/render.h \
499         include/resize.h \
500         include/restore_layout.h \
501         include/scratchpad.h \
502         include/sd-daemon.h \
503         include/shmlog.h \
504         include/sighandler.h \
505         include/startup.h \
506         include/tree.h \
507         include/util.h \
508         include/window.h \
509         include/workspace.h \
510         include/xcb.h \
511         include/xcursor.h \
512         include/x.h \
513         include/xinerama.h \
514         include/yajl_utils.h \
515         src/assignments.c \
516         src/bindings.c \
517         src/click.c \
518         src/commands.c \
519         src/commands_parser.c \
520         src/con.c \
521         src/config.c \
522         src/config_directives.c \
523         src/config_parser.c \
524         src/display_version.c \
525         src/ewmh.c \
526         src/fake_outputs.c \
527         src/floating.c \
528         src/handlers.c \
529         src/ipc.c \
530         src/key_press.c \
531         src/load_layout.c \
532         src/log.c \
533         src/main.c \
534         src/manage.c \
535         src/match.c \
536         src/move.c \
537         src/output.c \
538         src/randr.c \
539         src/regex.c \
540         src/render.c \
541         src/resize.c \
542         src/restore_layout.c \
543         src/scratchpad.c \
544         src/sd-daemon.c \
545         src/sighandler.c \
546         src/startup.c \
547         src/tree.c \
548         src/util.c \
549         src/version.c \
550         src/window.c \
551         src/workspace.c \
552         src/x.c \
553         src/xcb.c \
554         src/xcursor.c \
555         src/xinerama.c
556
557 ################################################################################
558 # parser generation
559 ################################################################################
560
561 $(command_parser_SOURCES): %.h: i3-command-parser.stamp
562
563 $(config_parser_SOURCES): %.h: i3-config-parser.stamp
564
565 src/i3-commands_parser.$(OBJEXT): i3-command-parser.stamp
566
567 src/i3-config_parser.$(OBJEXT): i3-config-parser.stamp
568
569 i3-command-parser.stamp: parser/$(dirstamp) generate-command-parser.pl parser-specs/commands.spec
570         $(AM_V_GEN) $(top_srcdir)/generate-command-parser.pl --input=$(top_srcdir)/parser-specs/commands.spec --prefix=command
571         $(AM_V_at) mv GENERATED_command_* $(top_builddir)/parser
572         $(AM_V_at) touch $@
573
574 i3-config-parser.stamp: parser/$(dirstamp) generate-command-parser.pl parser-specs/config.spec
575         $(AM_V_GEN) $(top_srcdir)/generate-command-parser.pl --input=$(top_srcdir)/parser-specs/config.spec --prefix=config
576         $(AM_V_at) mv GENERATED_config_* $(top_builddir)/parser
577         $(AM_V_at) touch $@
578
579 ################################################################################
580 # AnyEvent-I3 build process
581 ################################################################################
582
583 anyevent-i3.stamp: AnyEvent-I3/lib/AnyEvent/I3.pm
584         $(AM_V_BUILD) (cd $(top_srcdir)/AnyEvent-I3 && perl Makefile.PL && make)
585         $(AM_V_at) touch $@
586
587 CLEANFILES = \
588         i3-command-parser.stamp \
589         i3-config-parser.stamp \
590         anyevent-i3.stamp