diff --git a/gconfig/command.mk b/gconfig/command.mk index d6950730bea1..4b20d9c4619e 100644 --- a/gconfig/command.mk +++ b/gconfig/command.mk @@ -30,6 +30,8 @@ CFLAGS += $(OPTIMIZER) $(OS_CFLAGS) $(XP_DEFINE) $(DEFINES) $(INCLUDES) \ RANLIB = echo JAR = /bin/jar TAR = /bin/tar + + # # For purify # diff --git a/gconfig/rules.mk b/gconfig/rules.mk index 26e83b780847..abe87b6fdb87 100644 --- a/gconfig/rules.mk +++ b/gconfig/rules.mk @@ -23,6 +23,7 @@ # Double-Colon rules for utilizing the binary release model. # ####################################################################### + all:: export private_export libs program install ifeq ($(AUTOCLEAN),1) @@ -113,6 +114,9 @@ realclean clobber_all:: rm -rf $(wildcard *.OBJ) dist $(ALL_TRASH) +$(LOOP_OVER_DIRS) +depend:: + +$(LOOP_OVER_DIRS) + #ifdef ALL_PLATFORMS #all_platforms:: $(NFSPWD) # @d=`$(NFSPWD)`; \ @@ -780,6 +784,13 @@ dependclean:: else depend:: +ifdef DODEPEND + @$(MAKE_OBJDIR) + $(GDEPTH)/gconfig/makedep.exe -s -O $(OBJDIR)/make.dp $(INCLUDES) $(OBJS) +endif + +-include $(OBJDIR)/make.dp + endif ################################################################################ diff --git a/gconfig/ruleset.mk b/gconfig/ruleset.mk index 830f021595e8..9d0472c9a689 100644 --- a/gconfig/ruleset.mk +++ b/gconfig/ruleset.mk @@ -139,6 +139,8 @@ ifdef PROGRAM PROGRAM := $(addprefix $(OBJDIR)/, $(PROGRAM)$(PROG_SUFFIX)) endif +MAKEDEPFILE := $(addprefix $(OBJDIR)/, make.dep) + #ifdef RCFILE # RCFILE := $(addprefix $(OBJDIR)/, $(RCFILE)$(RC_SUFFIX)) # endif @@ -197,6 +199,15 @@ ifndef TARGETS endif endif +ifdef CSRCS +DEPENDFILES += $(OBJS) +DODEPEND=1 +endif +ifdef CPPSRCS +DEPENDFILES += $(OBJS) +DODEPEND=1 +endif + ifndef OBJS OBJS := $(JRI_STUB_CFILES) $(addsuffix $(OBJ_SUFFIX), $(JMC_GEN)) $(CSRCS:.c=$(OBJ_SUFFIX)) \ $(CPPSRCS:.cpp=$(OBJ_SUFFIX)) $(ASFILES:.s=$(OBJ_SUFFIX))