]> granicus.if.org Git - php/commitdiff
Simplify generated_lists generation
authorPeter Kokot <peterkokot@gmail.com>
Sat, 13 Apr 2019 13:53:20 +0000 (15:53 +0200)
committerPeter Kokot <peterkokot@gmail.com>
Tue, 16 Apr 2019 15:25:08 +0000 (17:25 +0200)
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.

.gitignore
build/build.mk
build/build2.mk
buildconf

index d98d59afd4f52ad6560a52ca996f7557bd9768c3..52ab256ba3000d3c014524a912bb195dbc98ad0d 100644 (file)
@@ -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
index b3fa3e2285089c9c2edc83c3cc640778dea75408..bf7bbf4be5e27f0c57e6c99ecd1aaffc654ed803 100644 (file)
@@ -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
index 690166e887a4ea50c525a046d9735bc0beb0c595..b6b0343abf965c36a848589a3778744e780b39ae 100644 (file)
@@ -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)
index ad9febfef50f272c5fc9aaa0e4afebfb4575d1f9..2b2f8f696ad5e1ac98da8fb5ab835e2a69412d82 100755 (executable)
--- a/buildconf
+++ b/buildconf
@@ -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