summaryrefslogtreecommitdiff
path: root/src/h_exten.c
diff options
context:
space:
mode:
authorklarlund <klarlund@01de4be4-8c4a-0410-9132-4925637da917>2008-05-09 18:15:18 +0000
committerklarlund <klarlund@01de4be4-8c4a-0410-9132-4925637da917>2008-05-09 18:15:18 +0000
commit9dd498f86c7179a1c9642a3d9fd9b9323d6c10d3 (patch)
tree30374f419a5f86ad3f4357694162f8c248b611d1 /src/h_exten.c
parent8acf0c1215996e2d5ece310080a2d23a007c6f61 (diff)
downloaddistcc-9dd498f86c7179a1c9642a3d9fd9b9323d6c10d3.tar.gz
Make handling of config.h sound.
(1) Correct order of -Is in Makefile. (2) remove unnessary PATH modification in configure.ac (this is fergus's suggestion -- hopefully this will do, this replaces a circumvention mechanism I had originally concocted. (3) Fix place of the include of popt in CPPFLAGS. (4) Convert quoted includes of config.h to angle bracket includes so that the build version, not the source version, of this file is picked up. The order of -Is in the build system is wrong: it contradicts the VPATH mechanism. This means that builds in a build directory different from that of the source (distribution) directory will find wrong files even after the hapless developer has issued only a 'configure' command in the source directory (but not actually 'made' any thing there). For in that case, the src/config.h will be generated in the source directory and this will be the file picked in the build directory even if that directory has it's own src/config.h. This can lead to wrong builds and it can be hard to diagnose the problem. Currently, this what CPPFLAGS end up being (as found in the generated Makefile): CPPFLAGS = -DHAVE_CONFIG_H -D_GNU_SOURCE \ -I../distcc/popt -I../distcc/src \ ${DIR_DEFS} \ -Isrc -Ilzo \ -I"$(srcdir)/src" -I"$(srcdir)/lzo" \ Here my source dir was ../distcc. The presence of '-I../distcc/popt' in front of -Isrc is the exact opposite of the semantics of VPATH mechanism, which looks for files in the build directory, then in the source directory. Also, note the remarks in: http://www.gnu.org/software/autoconf/manual/autoconf.html#Configuration-Headers (they do not quite correctly discuss the search path, btw). TESTING: I verified that with a corrupted config.h file in the source directory, building now succeeds. Also: make distcheck (it fails the same place as before: this is corrected in another change of mine --- I'll verify that with that change in place, this change makes 'make distcheck' succeed.) REVIEWERS: fergus@google.com, csilvers@google.com git-svn-id: http://distcc.googlecode.com/svn/trunk@148 01de4be4-8c4a-0410-9132-4925637da917
Diffstat (limited to 'src/h_exten.c')
-rw-r--r--src/h_exten.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/h_exten.c b/src/h_exten.c
index 23782c9..1463c99 100644
--- a/src/h_exten.c
+++ b/src/h_exten.c
@@ -22,7 +22,7 @@
*/
-#include "config.h"
+#include <config.h>
#include <stdio.h>
#include <stdlib.h>