diff options
author | Sami Kerola <kerolasa@iki.fi> | 2013-05-26 09:30:15 (GMT) |
---|---|---|
committer | Sami Kerola <kerolasa@iki.fi> | 2013-05-26 09:38:11 (GMT) |
commit | 7541054b299bbd61310ab0456cf4f25b7a672de3 (patch) | |
tree | 47878d28304cb560a4f31bc98466a9347e8edb6c /Makefile.am | |
parent | 82e300c7bac1542f27668a8d7e234b4dd6ea1211 (diff) | |
download | fluxbox-7541054b299bbd61310ab0456cf4f25b7a672de3.zip fluxbox-7541054b299bbd61310ab0456cf4f25b7a672de3.tar.bz2 |
build-sys: move to non-recursive build
This rather large change will attempts to make 'make' to work better.
See excellent paper 'Recursive Make Considered Harmful' by Peter Miller
for further explanation why several make files is worse than one for
whole project.
Note. The tests are build with 'make check' rather than defining TEST.
Reference: http://miller.emu.id.au/pmiller/books/rmch/
Reference: http://karelzak.blogspot.co.uk/2013/02/non-recursive-automake.html
Diffstat (limited to 'Makefile.am')
-rw-r--r-- | Makefile.am | 82 |
1 files changed, 73 insertions, 9 deletions
diff --git a/Makefile.am b/Makefile.am index 3d9b5bf..1b09b39 100644 --- a/Makefile.am +++ b/Makefile.am | |||
@@ -1,18 +1,82 @@ | |||
1 | |||
2 | # Makefile.am for Fluxbox - http://fluxbox.org | 1 | # Makefile.am for Fluxbox - http://fluxbox.org |
3 | 2 | ||
4 | # data dir after util so that utils are built for path searching | ||
5 | # when generating menu | ||
6 | |||
7 | SUBDIRS = doc nls src util data | ||
8 | MAINTAINERCLEANFILES = aclocal.m4 config.h.in configure Makefile.in stamp-h.in | ||
9 | ACLOCAL_AMFLAGS = -I m4 | 3 | ACLOCAL_AMFLAGS = -I m4 |
10 | EXTRA_DIST = $(top_srcdir)/3rd/vim/* $(top_srcdir)/3rd/vim/syntax/* build-aux/config.rpath | 4 | AM_CPPFLAGS = \ |
5 | -include $(top_builddir)/config.h | ||
6 | |||
7 | # the defaults.hh is wrote to builddir | ||
8 | src_incdir = $(top_srcdir)/src -I$(top_builddir)/src | ||
9 | fbtk_incdir = $(top_srcdir)/src/FbTk | ||
10 | nls_incdir = $(top_srcdir)/nls | ||
11 | |||
12 | EXTRA_DIST = \ | ||
13 | 3rd/vim/ \ | ||
14 | build-aux/config.rpath \ | ||
15 | nls/fluxbox-nls.hh \ | ||
16 | nls/nlsinfo | ||
17 | |||
18 | CLEANFILES = | ||
19 | bin_PROGRAMS = | ||
20 | |||
21 | MAINTAINERCLEANFILES = \ | ||
22 | aclocal.m4 \ | ||
23 | config.h.in \ | ||
24 | configure \ | ||
25 | Makefile.in \ | ||
26 | stamp-h.in | ||
27 | |||
28 | DEFAULT_MENU=@DEFAULT_MENU@ | ||
29 | DEFAULT_STYLE=@DEFAULT_STYLE@ | ||
30 | DEFAULT_KEYSFILE=@DEFAULT_KEYS@ | ||
31 | DEFAULT_APPSFILE=@DEFAULT_APPS@ | ||
32 | DEFAULT_OVERLAY=@DEFAULT_OVERLAY@ | ||
33 | DEFAULT_INITFILE=@DEFAULT_INIT@ | ||
34 | DEFAULT_WINDOWMENU=@DEFAULT_WINDOWMENU@ | ||
35 | PROGRAM_PREFIX=@program_prefix@ | ||
36 | PROGRAM_SUFFIX=@program_suffix@ | ||
37 | |||
38 | # Do not rely on configure.ac AC_CONFIG_FILES for install paths. The | ||
39 | # paths should be expanded at make time rather than configure. | ||
40 | edit_cmd = sed \ | ||
41 | -e 's|@bindir[@]|$(bindir)|g' \ | ||
42 | -e 's|@datadir[@]|$(datadir)|g' \ | ||
43 | -e 's|@exec_prefix[@]|$(exec_prefix)|g' \ | ||
44 | -e 's|@includedir[@]|$(includedir)|g' \ | ||
45 | -e 's|@localstatedir[@]|$(localstatedir)|g' \ | ||
46 | -e 's|@pkgbindir[@]|$(pkgbindir)|g' \ | ||
47 | -e 's|@pkgdatadir[@]|$(pkgdatadir)|g' \ | ||
48 | -e 's|@pkgprefix[@]|$(pkgprefix:NONE=)|g' \ | ||
49 | -e 's|@pkgsuffix[@]|$(pkgsuffix:NONE=)|g' \ | ||
50 | -e 's|@prefix[@]|$(prefix)|g' \ | ||
51 | -e 's|@sbindir[@]|$(sbindir)|g' \ | ||
52 | -e 's|@sysconfdir[@]|$(sysconfdir)|g' \ | ||
53 | -e 's|@usrbin_execdir[@]|$(usrbin_execdir)|g' \ | ||
54 | -e 's|@usrlib_execdir[@]|$(usrlib_execdir)|g' \ | ||
55 | -e 's|@usrsbin_execdir[@]|$(usrsbin_execdir)|g' \ | ||
56 | -e 's|@VERSION[@]|$(VERSION)|g' | ||
57 | |||
58 | PATHFILES = | ||
59 | CLEANFILES += $(PATHFILES) | ||
60 | EXTRA_DIST += $(PATHFILES:=.in) | ||
61 | |||
62 | $(PATHFILES): Makefile | ||
63 | @ rm -f $@ $@.tmp | ||
64 | $(AM_V_GEN) srcdir=''; \ | ||
65 | test -f ./$@.in || srcdir=$(srcdir)/; \ | ||
66 | $(edit_cmd) $${srcdir}$@.in >$@.tmp | ||
67 | @ mv $@.tmp $@ | ||
68 | |||
69 | include data/Makemodule.am | ||
70 | include doc/Makemodule.am | ||
71 | include nls/Makemodule.am | ||
72 | include src/FbTk/Makemodule.am | ||
73 | include src/Makemodule.am | ||
74 | include src/tests/Makemodule.am | ||
75 | include util/Makemodule.am | ||
76 | include util/fbrun/Makemodule.am | ||
11 | 77 | ||
12 | uninstall-hook: | 78 | uninstall-hook: |
13 | rmdir $(DESTDIR)$(pkgdatadir) | 79 | rmdir $(DESTDIR)$(pkgdatadir) |
14 | distclean-local: | ||
15 | rm -f *\~ | ||
16 | 80 | ||
17 | source-doc: | 81 | source-doc: |
18 | doxygen Doxyfile | 82 | doxygen Doxyfile |