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