wmaker: make the '--replace' de-activable at compile time
[wmaker-crm.git] / Makefile.am
blobd0b6688242e8af0a194ee4e0f96d7075d071b3c7
1 ## Process this file with automake to produce Makefile.in
3 AUTOMAKE_OPTIONS =
5 BUILT_SOURCES = config-paths.h
7 DISTCLEANFILES = config-paths.h
9 config.h: config-paths.h
11 config-paths.h: Makefile
12         @echo "Generating $@"
13         @echo '/* this is a generated file - do not edit */' > $@
14         @echo '' >> $@
15         @echo '/* define where the translations are stored */' >> $@
16         @echo '#define LOCALEDIR "$(localedir)"' >> $@
17         @echo '' >> $@
18         @echo '/* define an extra path for pixmaps */' >> $@
19         @echo '#define PIXMAPDIR "$(pixmapdir)"' >> $@
20         @echo '' >> $@
21         @echo '/* where shared data is stored */' >> $@
22         @echo '#define PKGDATADIR "$(datadir)/WindowMaker"' >> $@
23         @echo '' >> $@
24         @echo '/* where the configuration is stored */' >> $@
25         @echo '#define SYSCONFDIR "$(sysconfdir)"' >> $@
27 ACLOCAL_AMFLAGS = -I m4
29 # Improve coverage in 'make distcheck' by checking that translations work
30 AM_DISTCHECK_CONFIGURE_FLAGS = --enable-silent-rules LINGUAS='*'
33 SUBDIRS = wrlib WINGs src util po WindowMaker wmlib WPrefs.app doc
34 DIST_SUBDIRS = $(SUBDIRS) test
36 EXTRA_DIST = TODO BUGS BUGFORM FAQ INSTALL \
37         INSTALL-WMAKER README.i18n README.definable-cursor \
38         The-perfect-Window-Maker-patch.txt \
39         README COPYING.WTFPL autogen.sh \
40         email-clients.txt checkpatch.pl update-changelog.pl \
41         script/check-cmdline-options-doc.sh \
42         script/check-translation-sources.sh \
43         script/check-wmaker-loaddef-callbacks.sh \
44         script/generate-mapfile-from-header.sh \
45         script/generate-po-from-template.sh \
46         script/generate-txt-from-texi.sh \
47         script/nested-func-to-macro.sh \
48         script/replace-ac-keywords.sh
51 .PHONY: coverage-reset coverage
53 if USE_LCOV
54 coverage-reset:
55         find . -type f -name '*.gcda' -exec rm -f '{}' ';'
56         lcov --directory . --zerocounters
58 coverage:
59         rm -rf coverage @lcov_output_directory@
60         -mkdir -p coverage @lcov_output_directory@
61         lcov --compat-libtool --capture --directory . --output-file coverage/coverage.info
62         genhtml --output-directory @lcov_output_directory@ coverage/coverage.info
63 endif
65 # make update-lang PO=<lang>
66 # ==========================
67 # Update the PO files against the POT file in all the translation sub-directories
69 # We do not use an automatic recursive target from Automake (AM_EXTRA_RECURSIVE_TARGETS)
70 # because we want to check only once that the variable PO was defined; the added bonus
71 # being that we do not process all directories but only the related ones, which is
72 # faster and a lot less verbose
74 update-lang:
75 if HAVE_XGETTEXT
76         @if echo "$(PO)" | grep -v '^[a-z][a-z]\(_[A-Z][A-Z]\)\?$$' > /dev/null ; then \
77           echo "Error: invalid value \"$(PO)\" for update-lang, use PO=<lang>" >&2 ; exit 1 ; \
78         fi ; \
79         for subdir in $(SUBDIRS_PO); do \
80           ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) update-lang || exit $$?); \
81         done
83 SUBDIRS_PO = WINGs/po po util/po WPrefs.app/po
84 else
85         @echo "Error: the program 'xgettext' was not found by configure, it is mandatory for this operation" >&2 ; exit 1
86 endif
88 .PHONY: update-lang
90 # Create a 'silent-rule' for our make check the same way automake does
91 AM_V_CHKOPTS = $(am__v_CHKOPTS_$(V))
92 am__v_CHKOPTS_  = $(am__v_CHKOPTS_$(AM_DEFAULT_VERBOSITY))
93 am__v_CHKOPTS_0 = @echo "  CHK      $@" ;
94 am__v_CHKOPTS_1 =
96 check-local: configure-documentation
98 configure-documentation:
99         $(AM_V_CHKOPTS)$(top_srcdir)/script/check-cmdline-options-doc.sh \
100                 --program "$(top_srcdir)/configure" --text-doc "$(top_srcdir)/INSTALL-WMAKER" \
101                 --ignore-prg 'with-PACKAGE,without-PACKAGE # only template names from Autoconf' \
102                 --ignore-prg 'program-prefix,program-suffix,program-transform-name # in INSTALL' \
103                 --ignore-prg 'version,quiet,srcdir,build,host,cache-file,no-create # in INSTALL' \
104                 --ignore-prg 'enable-silent-rules,disable-silent-rules # should be in INSTALL' \
105                 --ignore-prg 'enable-dependency-tracking,disable-dependency-tracking # in INSTALL' \
106                 --ignore-prg 'enable-shared,enable-static # should be in INSTALL' \
107                 --ignore-prg 'disable-option-checking,enable-fast-install # should be in INSTALL' \
108                 --ignore-prg 'disable-libtool-lock,with-pic,with-gnu-ld,with-sysroot # for libtool' \
109                 --ignore-prg 'with-x # no use, it would not work without X'
111 .PHONY: configure-documentation