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