diff options
author | Peter Kokot <peterkokot@gmail.com> | 2019-04-13 15:53:20 +0200 |
---|---|---|
committer | Peter Kokot <peterkokot@gmail.com> | 2019-04-16 17:25:08 +0200 |
commit | b09fa9ed530df47bff03b151931fa4464a388d35 (patch) | |
tree | ff62b68b44d7298d6915d2ff55f0a3b628b6d69f | |
parent | 12ee246ae45889004fc2c099c04cfff1ce6e8848 (diff) | |
download | php-git-b09fa9ed530df47bff03b151931fa4464a388d35.tar.gz |
Simplify generated_lists generation
The `generated_lists` file is generated as a helper for build related
Makefile to include a list of *.m4 files prerequisites. When some of
these *.m4 files change, the configure script is regenerated when
buildconf is run. This can be simplified using dynamic environment
variable passed to the Makefile directly so it avoids another file from
being generated in the project root directory and shipping it with the
PHP release or creating a dedicated gitignore rule.
This is portable across all POSIX compatible makes So this patch
includes GNU Make, and everybody elses' make derivative support.
-rw-r--r-- | .gitignore | 3 | ||||
-rw-r--r-- | build/build.mk | 11 | ||||
-rw-r--r-- | build/build2.mk | 4 | ||||
-rwxr-xr-x | buildconf | 7 |
4 files changed, 7 insertions, 18 deletions
diff --git a/.gitignore b/.gitignore index d98d59afd4..52ab256ba3 100644 --- a/.gitignore +++ b/.gitignore @@ -66,9 +66,6 @@ configure confdefs.h conftest* -# Generated by `./buildconf` script as a helper for further build/build2.mk file -/generated_lists - # Generated by configure scripts on all systems /main/internal_functions.c /main/internal_functions_cli.c diff --git a/build/build.mk b/build/build.mk index b3fa3e2285..bf7bbf4be5 100644 --- a/build/build.mk +++ b/build/build.mk @@ -22,16 +22,9 @@ SUBDIRS = Zend TSRM STAMP = buildmk.stamp -ALWAYS = generated_lists - - -all: $(STAMP) $(ALWAYS) +all: $(STAMP) @$(MAKE) -s -f build/build2.mk -generated_lists: - @echo config_m4_files = Zend/Zend.m4 TSRM/tsrm.m4 TSRM/threads.m4 \ - Zend/acinclude.m4 ext/*/config*.m4 sapi/*/config.m4 >> $@ - $(STAMP): build/buildcheck.sh @build/buildcheck.sh $(STAMP) @@ -64,4 +57,4 @@ gitclean-work: fi; \ git clean -X -f -d; -.PHONY: $(ALWAYS) snapshot +.PHONY: snapshot diff --git a/build/build2.mk b/build/build2.mk index 690166e887..b6b0343abf 100644 --- a/build/build2.mk +++ b/build/build2.mk @@ -14,8 +14,6 @@ # | Author: Sascha Schumann <sascha@schumann.cx> | # +----------------------------------------------------------------------+ -include generated_lists - config_h_in = main/php_config.h.in targets = configure $(config_h_in) @@ -40,7 +38,7 @@ aclocal.m4: configure.ac acinclude.m4 @echo rebuilding $@ cat acinclude.m4 ./build/libtool.m4 > $@ -configure: aclocal.m4 configure.ac $(config_m4_files) +configure: aclocal.m4 configure.ac $(M4_FILES) @echo rebuilding $@ @rm -f $@ $(PHP_AUTOCONF) -f $(SUPPRESS_WARNINGS) @@ -91,10 +91,11 @@ fi echo "buildconf: Building configure files" -rm -f generated_lists +# List of *.m4 prerequisites files for the make configure target. +M4_FILES=$(echo TSRM/*.m4 Zend/*.m4 ext/*/config*.m4 sapi/*/config*.m4) if test "$debug" = "1"; then - $MAKE -s -f build/build.mk SUPPRESS_WARNINGS="" + $MAKE -s -f build/build.mk M4_FILES="$M4_FILES" SUPPRESS_WARNINGS="" else - $MAKE -s -f build/build.mk + $MAKE -s -f build/build.mk M4_FILES="$M4_FILES" fi |