mirror of
https://github.com/php/php-src.git
synced 2025-08-15 13:38:49 +02:00
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.
This commit is contained in:
parent
12ee246ae4
commit
b09fa9ed53
4 changed files with 7 additions and 18 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue