mirror of
https://github.com/php/php-src.git
synced 2024-11-27 03:44:07 +08:00
Add dependency tracking for header files
This ensures all .c files which include a header file directly or indirectly are rebuilt whenever the header file is changed. Closes GH-6693.
This commit is contained in:
parent
e727919b97
commit
c4d508c2bc
3
.gitignore
vendored
3
.gitignore
vendored
@ -41,6 +41,9 @@
|
||||
# Standard object files generated during build process
|
||||
*.o
|
||||
|
||||
# Dependency files generated during build process
|
||||
*.dep
|
||||
|
||||
# Cache directories created by Autoconf tools
|
||||
autom4te.cache/
|
||||
|
||||
|
@ -111,7 +111,7 @@ test: all
|
||||
|
||||
clean:
|
||||
find . -name \*.gcno -o -name \*.gcda | xargs rm -f
|
||||
find . -name \*.lo -o -name \*.o | xargs rm -f
|
||||
find . -name \*.lo -o -name \*.o -o -name \*.dep | xargs rm -f
|
||||
find . -name \*.la -o -name \*.a | xargs rm -f
|
||||
find . -name \*.so | xargs rm -f
|
||||
find . -name .libs -a -type d|xargs rm -rf
|
||||
@ -156,9 +156,5 @@ prof-use:
|
||||
fi; \
|
||||
fi;
|
||||
|
||||
# As we don't track includes, this is just a heuristic
|
||||
%.c: %_arginfo.h
|
||||
@touch $@
|
||||
|
||||
.PHONY: all clean install distclean test prof-gen prof-clean prof-use
|
||||
.NOEXPORT:
|
||||
|
@ -257,8 +257,12 @@ dnl Choose the right compiler/flags/etc. for the source-file.
|
||||
*.cpp|*.cc|*.cxx[)] ac_comp="$b_cxx_pre $ac_inc $b_cxx_meta $3 -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
|
||||
esac
|
||||
|
||||
dnl Generate Makefiles with dependencies
|
||||
ac_comp="$ac_comp -MMD -MF $ac_bdir$ac_obj.dep -MT $ac_bdir[$]ac_obj.lo"
|
||||
|
||||
dnl Create a rule for the object/source combo.
|
||||
cat >>Makefile.objects<<EOF
|
||||
-include $ac_bdir[$]ac_obj.dep
|
||||
$ac_bdir[$]ac_obj.lo: $ac_srcdir[$]ac_src
|
||||
$ac_comp
|
||||
EOF
|
||||
|
Loading…
Reference in New Issue
Block a user