# [PATCH 1/2] Makefile: fix header dependency checker to allow NO_CURL builds

3 messages from 2010-05-09 to 2010-05-09. Participants: Jonathan Nieder.
Thread: https://gitlist.dev/t/23753

## Jonathan Nieder, 2010-05-09 03:55

Subject: [PATCH 0/2] Makefile: header dependency checker fixes
Message-ID: <20100509035536.GA8118@progeny.tock>
URL: https://gitlist.dev/e/20100509035536.GA8118%40progeny.tock

```
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(-)

```

## Jonathan Nieder, 2010-05-09 03:57

Subject: [PATCH 1/2] Makefile: fix header dependency checker to allow NO_CURL builds
Message-ID: <20100509035728.GA8198@progeny.tock>
URL: https://gitlist.dev/e/20100509035728.GA8198%40progeny.tock
In-Reply-To: <20100509035536.GA8118@progeny.tock>

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

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
---
 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

```

## Jonathan Nieder, 2010-05-09 04:00

Subject: [PATCH 2/2] Makefile: let header dependency checker override COMPUTE_HEADER_DEPENDENCIES
Message-ID: <20100509040010.GB8198@progeny.tock>
URL: https://gitlist.dev/e/20100509040010.GB8198%40progeny.tock
In-Reply-To: <20100509035536.GA8118@progeny.tock>

```
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 <jrnieder@gmail.com>
---
 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

```
