diff options
author | Peter Kokot <peterkokot@gmail.com> | 2019-04-17 00:09:36 +0200 |
---|---|---|
committer | Peter Kokot <peterkokot@gmail.com> | 2019-04-17 21:52:58 +0200 |
commit | 02c1f3293ea2f5ef2d712c93cad3964e382e4fb0 (patch) | |
tree | c80c19a713c0032859c25287586746eb6b75e317 /build/build.mk | |
parent | 663056aa5f161854d4255bfb66526e71bbf4f639 (diff) | |
download | php-git-02c1f3293ea2f5ef2d712c93cad3964e382e4fb0.tar.gz |
Join build makefiles together
Changes:
- Joins build/build.mk and build/build2.mk files together since there
isn't any practical reason for having two different files with the
current build system.
- Makefile is now more portable. All special syntaxes are omitted, for
example, a conditional assignment operators `?=`. This makes buildconf
more useful on Solaris make derivative, so there is no longer need to
override make with gmake: `MAKE=gmake ./buildconf`.
- Suppressing autoconf and autoheader warnings is not needed anymore
with current build system. Instead, the option `-Wall` has been used
when running `./buildconf --debug` to get more useful debug info
about current M4.
Diffstat (limited to 'build/build.mk')
-rw-r--r-- | build/build.mk | 36 |
1 files changed, 28 insertions, 8 deletions
diff --git a/build/build.mk b/build/build.mk index bf7bbf4be5..46cb0c3360 100644 --- a/build/build.mk +++ b/build/build.mk @@ -18,15 +18,35 @@ # Makefile to generate build tools # -SUBDIRS = Zend TSRM +subdirs = Zend TSRM +stamp = buildmk.stamp +config_h_in = main/php_config.h.in +PHP_AUTOCONF = autoconf +PHP_AUTOHEADER = autoheader +PHP_AUTOCONF_FLAGS = -f -STAMP = buildmk.stamp +all: $(stamp) configure $(config_h_in) -all: $(STAMP) - @$(MAKE) -s -f build/build2.mk +$(stamp): build/buildcheck.sh + @build/buildcheck.sh $@ -$(STAMP): build/buildcheck.sh - @build/buildcheck.sh $(STAMP) +configure: aclocal.m4 configure.ac $(PHP_M4_FILES) + @echo rebuilding $@ + @rm -f $@ + @$(PHP_AUTOCONF) $(PHP_AUTOCONF_FLAGS) + +aclocal.m4: configure.ac acinclude.m4 + @echo rebuilding $@ + @cat acinclude.m4 ./build/libtool.m4 > $@ + +$(config_h_in): configure +# Explicitly remove target since autoheader does not seem to work correctly +# otherwise (timestamps are not updated). Also disable PACKAGE_* symbols in the +# generated php_config.h.in template. + @echo rebuilding $@ + @rm -f $@ + @$(PHP_AUTOHEADER) $(PHP_AUTOCONF_FLAGS) + @sed -e 's/^#undef PACKAGE_[^ ]*/\/\* & \*\//g' < $@ > $@.tmp && mv $@.tmp $@ snapshot: distname='$(DISTNAME)'; \ @@ -36,8 +56,8 @@ snapshot: myname=`basename \`pwd\`` ; \ cd .. && cp -rp $$myname $$distname; \ cd $$distname; \ - rm -f $(SUBDIRS) 2>/dev/null || true; \ - for i in $(SUBDIRS); do \ + rm -f $(subdirs) 2>/dev/null || true; \ + for i in $(subdirs); do \ test -d $$i || (test -d ../$$i && cp -rp ../$$i $$i); \ done; \ find . -type l -exec rm {} \; ; \ |