1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-24 07:02:30 +01:00
Files
wmaker/Makefile.am
Christophe CURIS 10371836ed wmaker: work around compilers that do not support nested functions
There are a few cases in which nested functions are an helpful way to write
code, as this is explained in 'script/nested-func-to-macro.sh'. However,
some compiler do not support them (like clang), so this patch proposes an
elegant solution, where developers can get the benefit of them, but for
users they are automatically converted to C macro if needed.

The advantage of this solution is that we keep the code simple, there is no
hack in the source (like #ifdef and code duplication), yet still having the
full advantages.

The translation is done according to what have been detected by configure
(see the WM_PROG_CC_NESTEDFUNC macro) so that user has nothing to do.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2014-12-07 09:52:21 +00:00

55 lines
1.6 KiB
Makefile

## Process this file with automake to produce Makefile.in
AUTOMAKE_OPTIONS =
BUILT_SOURCES = config-paths.h
DISTCLEANFILES = config-paths.h
config.h: config-paths.h
config-paths.h: Makefile
@echo "Generating $@"
@echo '/* this is a generated file - do not edit */' > $@
@echo '' >> $@
@echo '/* gettext domain used for menu translations */' >> $@
@if test -z "$(menutextdomain)"; then \
echo '/* #undef MENU_TEXTDOMAIN "$(menutextdomain)" */' >> $@; \
else \
echo '#define MENU_TEXTDOMAIN "$(menutextdomain)"' >> $@; \
fi
@echo '' >> $@
@echo '/* define an extra path for pixmaps */' >> $@
@echo '#define PIXMAPDIR "$(pixmapdir)"' >> $@
@echo '' >> $@
@echo '/* where shared data is stored */' >> $@
@echo '#define PKGDATADIR "$(datadir)/WindowMaker"' >> $@
@echo '' >> $@
@echo '/* where the configuration is stored */' >> $@
@echo '#define SYSCONFDIR "$(sysconfdir)"' >> $@
ACLOCAL_AMFLAGS = -I m4
SUBDIRS = wrlib WINGs src util po WindowMaker wmlib WPrefs.app doc test
EXTRA_DIST = TODO BUGS BUGFORM FAQ FAQ.I18N INSTALL \
INSTALL-WMAKER README.definable-cursor \
The-perfect-Window-Maker-patch.txt \
README COPYING.WTFPL autogen.sh \
email-clients.txt checkpatch.pl update-changelog.pl \
script/nested-func-to-macro.sh
if USE_LCOV
coverage-reset:
find . -type f -name '*.gcda' -exec rm -f '{}' ';'
lcov --directory . --zerocounters
coverage:
rm -rf coverage @lcov_output_directory@
-mkdir -p coverage @lcov_output_directory@
lcov --compat-libtool --capture --directory . --output-file coverage/coverage.info
genhtml --output-directory @lcov_output_directory@ coverage/coverage.info
.PHONY: coverage-reset coverage
endif