Makefile: header dependency checker fixes
cover Makefile: header dependency checker fixes
Two fixes to make the CHECK_HEADER_DEPENDENCIES facility more usable. Now you can
echo >>config.mak NO_CURL = YesPlease
echo >>config.mak COMPUTE_HEADER_DEPENDENCIES = YesPlease make -j16
make -j16 CHECK_HEADER_DEPENDENCIES=Yep
on some super-fast machine without libcurl-dev installed and it will check the header dependencies for the rest of the makefile.
Previously it would error out for two reasons:
- COMPUTE_HEADER_DEPENDENCIES and CHECK_HEADER_DEPENDENCIES are incompatible
- the safety to make sure the automatically computed header dependencies were present did not understand that HTTP support is missing
This is nothing urgent, just nice to have. I’d be glad to carry them locally if that’s more convenient.
Jonathan Nieder (2):
Makefile: fix header dependency checker to allow NO_CURL builds
Makefile: let header dependency checker override
COMPUTE_HEADER_DEPENDENCIES
Makefile | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-)
PATCH 1/2 Makefile: fix header dependency checker to allow NO_CURL builds
Do not expect to find http-related dependency fragments after a build with HTTP support disabled.
--- Makefile | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-)
Makefile +4 -1
@@ -1656,7 +1656,10 @@ git.o git.spec \ TEST_OBJS := $(patsubst test-%$X,test-%.o,$(TEST_PROGRAMS)) GIT_OBJS := $(LIB_OBJS) $(BUILTIN_OBJS) $(PROGRAM_OBJS) $(TEST_OBJS) \ - git.o http.o http-walker.o remote-curl.o + git.o +ifndef NO_CURL + GIT_OBJS += http.o http-walker.o remote-curl.o +endif XDIFF_OBJS = xdiff/xdiffi.o xdiff/xprepare.o xdiff/xutils.o xdiff/xemit.o \ xdiff/xmerge.o xdiff/xpatience.o OBJECTS := $(GIT_OBJS) $(XDIFF_OBJS)
Signature · 1 line
1.7.1
PATCH 2/2 Makefile: let header dependency checker override COMPUTE_HEADER_DEPENDENCIES
In reply to Jonathan NiederThis way, if you have “COMPUTE_HEADER_DEPENDENCIES = YesPlease” in your config.mak, you can still “make CHECK_HEADER_DEPENDENCIES=Yes” to check the makefile after a successful build.
This change does not affect the result of the command “make CHECK_HEADER_DEPENDENCIES=Yes COMPUTE_HEADER_DEPENDENCIES=Yes”. That will still die with an error message:
cannot compute header dependencies outside a normal build
The message is appropriate because still true.
--- Makefile | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
Makefile +1 -0
@@ -1063,6 +1063,7 @@ endif -include config.mak ifdef CHECK_HEADER_DEPENDENCIES +COMPUTE_HEADER_DEPENDENCIES = USE_COMPUTED_HEADER_DEPENDENCIES = endif
Signature · 1 line
1.7.1