diff --git a/configure/CONFIG.gnuCommon b/configure/CONFIG.gnuCommon index f21bcc3df..9e8061520 100644 --- a/configure/CONFIG.gnuCommon +++ b/configure/CONFIG.gnuCommon @@ -42,5 +42,5 @@ STATIC_LDFLAGS_NO = SHRLIB_LDFLAGS_YES = -shared SHRLIB_LDFLAGS_NO = -HDEPENDS_FLAGS = -MM +HDEPENDS_FLAGS_CMPLR = -MM diff --git a/configure/CONFIG_COMMON b/configure/CONFIG_COMMON index b5836cf96..f35e01b41 100644 --- a/configure/CONFIG_COMMON +++ b/configure/CONFIG_COMMON @@ -237,12 +237,25 @@ COMPILE.cpp = $(CCC) -c $(CPPFLAGS) $(CXXFLAGS) $(INCLUDES) $(SOURCE_CXXFLAG) #-------------------------------------------------- # Build depends command here -HDEPENDS.c = $(CC) -HDEPENDS.cpp = $(CCC) -HDEPENDS_CMD.c = -$(HDEPENDS.c) $(HDEPENDS_CFLAGS) $(HDEPENDSFLAGS) $< > $*$(DEP) -HDEPENDS_CMD.cpp = -$(HDEPENDS.cpp) $(HDEPENDS_CXXFLAGS) $(HDEPENDSFLAGS) $< > $*$(DEP) +HOST_HDEPENDS_CMD = CMPLR +CROSS_HDEPENDS_CMD = CMPLR +HDEPENDS_CMD = $($(BUILD_CLASS)_HDEPENDS_CMD) + +HDEPENDS.c_CMPLR = $(CC) +HDEPENDS.cpp_CMPLR = $(CCC) +HDEPENDSFLAGS_CMPLR += $(CPPFLAGS) $(INCLUDES) $< > $*$(DEP) + +HDEPENDS.c_MKMF = $(PERL) $(TOOLS)/mkmf.pl +HDEPENDS.cpp_MKMF = $(PERL) $(TOOLS)/mkmf.pl +HDEPENDSFLAGS_MKMF += -c "$(CPPFLAGS)" -m $*$(DEP) -f $(subst -I,,$(INCLUDES)) $< + +HDEPENDS.c = $(HDEPENDS.c_$(HDEPENDS_CMD)) +HDEPENDS.cpp = $(HDEPENDS.cpp_$(HDEPENDS_CMD)) +HDEPENDSFLAGS = $(HDEPENDSFLAGS_$(HDEPENDS_CMD)) +HDEPENDS_FLAGS = $(HDEPENDS_FLAGS_$(HDEPENDS_CMD)) +HDEPENDS_CMD.c = -$(HDEPENDS.c) $(HDEPENDS_FLAGS) $(HDEPENDSFLAGS) +HDEPENDS_CMD.cpp = -$(HDEPENDS.cpp) $(HDEPENDS_FLAGS) $(HDEPENDSFLAGS) HDEPENDS_TARGETS_CMD = @$(PERL) $(TOOLS)/makeDependsTargets.pl $*$(DEP) -HDEPENDSFLAGS += $(CPPFLAGS) $(INCLUDES) $(HDEPENDS_FLAGS) #-------------------------------------------------- # depends definition diff --git a/configure/CONFIG_SITE b/configure/CONFIG_SITE index b95ae1e34..ff95df840 100644 --- a/configure/CONFIG_SITE +++ b/configure/CONFIG_SITE @@ -91,12 +91,19 @@ STATIC_BUILD=NO # Should header dependancy files be automatically generated # for each C/C++ source code file? # must be either YES or NO -# -# Note: On solaris and WIN32 hosts, the gnu compilers gcc and g++ are -# used to generate the dependancy files, and they must be in -# your path. HDEPENDS=YES +# Default command to generate header dependancies for host builds +# only used if HDEPENDS=YES +# must be either CMPLR or MKMF +# CMPLR - use c/c++ compiler (recommended) +# MKMF - use mkmf.pl perl script in tools directory (has limitations) +# +# CMPLR Note: On solaris and WIN32 hosts, gnu compilers gcc and g++ +# are used to generate dependancy files for host builds, +# and they must be in your path. +HOST_HDEPENDS_CMD=CMPLR + # Host build optimization # must be either YES or NO HOST_OPT=YES diff --git a/configure/os/CONFIG.hpux-parisc.hpux-parisc b/configure/os/CONFIG.hpux-parisc.hpux-parisc index ffd070bc6..35c101393 100644 --- a/configure/os/CONFIG.hpux-parisc.hpux-parisc +++ b/configure/os/CONFIG.hpux-parisc.hpux-parisc @@ -53,5 +53,5 @@ STATIC_LDLIBS_NO= SHRLIB_LDFLAGS_YES = -G -h $@ -HDEPENDS_FLAGS = +m +HDEPENDS_FLAGS_CMPLR = +m diff --git a/configure/os/CONFIG.osf-alpha.osf-alpha b/configure/os/CONFIG.osf-alpha.osf-alpha index 04361771a..06d967f22 100644 --- a/configure/os/CONFIG.osf-alpha.osf-alpha +++ b/configure/os/CONFIG.osf-alpha.osf-alpha @@ -43,7 +43,7 @@ STATIC_LDLIBS_NO= SHRLIB_LDFLAGS_YES = -shared -HDEPENDS_FLAGS = +HDEPENDS_FLAGS_CMPLR = ############# ??????????? #####ACC_SFLAGS_YES= -non_shared diff --git a/configure/os/CONFIG.solaris-sparc.solaris-sparc b/configure/os/CONFIG.solaris-sparc.solaris-sparc index 0ad06ab81..e5138793d 100644 --- a/configure/os/CONFIG.solaris-sparc.solaris-sparc +++ b/configure/os/CONFIG.solaris-sparc.solaris-sparc @@ -57,7 +57,7 @@ SHRLIB_LDFLAGS_YES = -G -h $@ # gnu compiler used because Sun compiler output # includes headers from /opt/SUNWspro and does # not work for c++ headers without .h suffix. -HDEPENDS_FLAGS = -MM -HDEPENDS.c = gcc -HDEPENDS.cpp = g++ +HDEPENDS_FLAGS_CMPLR = -MM +HDEPENDS.c_CMPLR = gcc +HDEPENDS.cpp_CMPLR = g++ diff --git a/configure/os/CONFIG.solaris-x86.solaris-x86 b/configure/os/CONFIG.solaris-x86.solaris-x86 index 9c30e8fd3..19d2ece5f 100644 --- a/configure/os/CONFIG.solaris-x86.solaris-x86 +++ b/configure/os/CONFIG.solaris-x86.solaris-x86 @@ -57,6 +57,7 @@ SHRLIB_LDFLAGS_YES = -G -h $@ # gnu compiler used because Sun compiler output # includes headers from /opt/SUNWspro and does # not work for c++ headers without .h suffix. -HDEPENDS_FLAGS = -MM -HDEPENDS.cpp = g++ +HDEPENDS_FLAGS_CMPLR = -MM +HDEPENDS.c_CMPLR = gcc +HDEPENDS.cpp_CMPLR = g++ diff --git a/configure/os/CONFIG.sun4-68k.sun4-68k b/configure/os/CONFIG.sun4-68k.sun4-68k index 965c1b3ae..1a9a14fb4 100644 --- a/configure/os/CONFIG.sun4-68k.sun4-68k +++ b/configure/os/CONFIG.sun4-68k.sun4-68k @@ -46,5 +46,5 @@ STATIC_LDLIBS_NO= SHRLIB_LDFLAGS_YES = -assert pure-text -h $@ -HDEPENDS_FLAGS = -xM1 +HDEPENDS_FLAGS_CMPLR = -xM1 diff --git a/configure/os/CONFIG.win32-x86.win32-x86 b/configure/os/CONFIG.win32-x86.win32-x86 index 30a1af90c..a37dcf94c 100644 --- a/configure/os/CONFIG.win32-x86.win32-x86 +++ b/configure/os/CONFIG.win32-x86.win32-x86 @@ -29,10 +29,10 @@ ARCMD = lib /nologo /verbose /out:$@ $(LIBRARY_LD_OBJS) BAFCMD = bscmake /nologo /o $@ -# gnu compiler used to create depends files (not available in Visual C++) -HDEPENDS_FLAGS = -MM $(addprefix -I,$(subst ;, ,$(INCLUDE))) -HDEPENDS.c = gcc -HDEPENDS.cpp = g++ +# gnu compiler used to create depends files +HDEPENDS_FLAGS_CMPLR = -MM +HDEPENDS.c_CMPLR = gcc +HDEPENDS.cpp_CMPLR = g++ # # Configure OS vendor C compiler