Only pass flags categories which can be expected to hold -I flags
to the preprocessor for dependency checking. Omit categories which
may contain architecture and tuning flags. This is a small and
hopefully reasonable limitation of dependency-checking functionality.
The preprocessor will still see predefined macros, amongst which
architecture definition. Thus, eventual architecture-dependent include
statements in the source code are considered for native architecture
during dependency checking.
This commit should resolve the rebuild issue on OSX, where some compiler
versions can not handle multiple architecture flags during dependency
checking.
...like '$' (e.g. "$arg-help.pd")
by installing them one-by-one and using single-quotes
(so the shell doesn't expand the dollargs)
NOTE: this does not fix compiling such weirdo filenames
Closes: https://github.com/pure-data/pd-lib-builder/issues/19
Multiple arch flags are incompatible with option -MM for preprocessor
on (at least) OSX <= 10.5. Non clean builds would stall on this. This
commit disables dependency checking for fat builds (current default
for OSX) on ppc and i386. Assuming that development is done on newer
systems / machines it should rarely hurt.
Phony target 'pre' forces rebuilds. This should not be default
behavior of Makefile.pdlibbuilder. If one needs a pre-build target
(phony or real file), declare it as prerequisite of $(all.objects)
in the library makefile after inclusion of Makefile.pdlibbuilder.
A pre-build target can have any name that isn't a target in
Makefile.pdlibbuilder.
Command line variable CFLAGS now work according to conventions (overriding
all non-essential C flags). CPPFLAGS and LDFLAGS are also implemented.
Built-in documentation updated.
This merge introduces the evaluation of optional multiline defines
'forLinux', 'forDarwin' and 'forWindows', which can be used as a flexible
replacement for system-specific variables as in Pd-extended's Makefile
template. Example code is added to Makefile.pdlibbuilder's built-in
documentation.
Targets pre and post can be defined in the including (library) makefile.
They are added to provide extra flexibility. Target all will
build pre, $(executable) and post in deterministic order. Built-in
documentation is modified to reflect the new situation.
This commit reorganizes the accumulation of build flags in such a way that
non-obligatory build flags can be overriden or added by specifying
CPPFLAGS, CFLAGS and LDFLAGS as arguments from command line or environment.
lib.version is only expanded if the file named by $(metafile) exists, but then it uses a hardcoded filename to do the actual expansion.
this patch uses $(metafile) to do the expansion instead.