[PATCH 0/2] Makefile: header dependency checker fixes

DORMANTno replies

3 messages, 1 author, 2016-06-15 · open the first message on its own page

[PATCH 0/2] Makefile: header dependency checker fixes

From: Jonathan Nieder <hidden>
Date: 2016-06-15 22:48:46

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

From: Jonathan Nieder <hidden>
Date: 2016-06-15 22:48:46

Do not expect to find http-related dependency fragments after a build
with HTTP support disabled.

Signed-off-by: Jonathan Nieder <redacted>
---
 Makefile |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/Makefile b/Makefile
index 910f471..567b859 100644
--- a/Makefile
+++ b/Makefile
@@ -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)
-- 
1.7.1

[PATCH 2/2] Makefile: let header dependency checker override COMPUTE_HEADER_DEPENDENCIES

From: Jonathan Nieder <hidden>
Date: 2016-06-15 22:48:46

This 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.

Signed-off-by: Jonathan Nieder <redacted>
---
 Makefile |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/Makefile b/Makefile
index 567b859..0025b98 100644
--- a/Makefile
+++ b/Makefile
@@ -1063,6 +1063,7 @@ endif
 -include config.mak
 
 ifdef CHECK_HEADER_DEPENDENCIES
+COMPUTE_HEADER_DEPENDENCIES =
 USE_COMPUTED_HEADER_DEPENDENCIES =
 endif
 
-- 
1.7.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help