Bugzilla bug #27955: added a static pattern rule to make every object NSPRPUB_RELEASE_4_0_BRANCH
authorwtc%netscape.com
Wed, 16 Feb 2000 23:13:52 +0000
branchNSPRPUB_RELEASE_4_0_BRANCH
changeset 1169 e7efe47adf6811e2634080e76e5e39d2973c4007
parent 1168 0a584f3b581bfdeedf87af5e74b2f340df9013e1
child 1170 8313c5c2a9cad10aa14bcc8b00140169d6bcd523
push idunknown
push userunknown
push dateunknown
bugs27955
Bugzilla bug #27955: added a static pattern rule to make every object file depend on a dummy header file. Update the dummy header to force a full rebuild of NSPR in Mozilla's Tinderbox depend builds. Removed the old "depend: clean" hack. Modified files: nsprpub/Makefile.in, nsprpub/Makefile, rules.mk Added file: prdepend.h (NSPRPUB_RELEASE_4_0_BRANCH)
Makefile
Makefile.in
config/prdepend.h
config/rules.mk
--- a/Makefile
+++ b/Makefile
@@ -96,10 +96,10 @@ endif
 	chmod 664 $(MDIST)/$(MOD_NAME)/$(BUILD_NUMBER)/imports.df; \
 	cd $(OBJDIR_NAME); \
 	cp -f mdbinary.jar $(MDIST)/$(MOD_NAME)/$(BUILD_NUMBER)/$(OBJDIR_NAME); \
 	chmod 664 $(MDIST)/$(MOD_NAME)/$(BUILD_NUMBER)/$(OBJDIR_NAME)/mdbinary.jar; \
 	cd include; \
 	cp -f mdheader.jar $(MDIST)/$(MOD_NAME)/$(BUILD_NUMBER)/$(OBJDIR_NAME); \
 	chmod 664 $(MDIST)/$(MOD_NAME)/$(BUILD_NUMBER)/$(OBJDIR_NAME)/mdheader.jar
 
-depend: clean
+depend:
 	@echo "NSPR20 has no dependencies.  Skipped."
--- a/Makefile.in
+++ b/Makefile.in
@@ -101,10 +101,10 @@ endif
 	chmod 664 $(MDIST)/$(MOD_NAME)/$(BUILD_NUMBER)/imports.df; \
 	cd $(OBJDIR_NAME); \
 	cp -f mdbinary.jar $(MDIST)/$(MOD_NAME)/$(BUILD_NUMBER)/$(OBJDIR_NAME); \
 	chmod 664 $(MDIST)/$(MOD_NAME)/$(BUILD_NUMBER)/$(OBJDIR_NAME)/mdbinary.jar; \
 	cd include; \
 	cp -f mdheader.jar $(MDIST)/$(MOD_NAME)/$(BUILD_NUMBER)/$(OBJDIR_NAME); \
 	chmod 664 $(MDIST)/$(MOD_NAME)/$(BUILD_NUMBER)/$(OBJDIR_NAME)/mdheader.jar
 
-depend: clean
+depend:
 	@echo "NSPR20 has no dependencies.  Skipped."
new file mode 100644
--- /dev/null
+++ b/config/prdepend.h
@@ -0,0 +1,25 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/*
+ * The contents of this file are subject to the Netscape Public License
+ * Version 1.1 (the "NPL"); you may not use this file except in
+ * compliance with the NPL.  You may obtain a copy of the NPL at
+ * http://www.mozilla.org/NPL/
+ * 
+ * Software distributed under the NPL is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
+ * for the specific language governing rights and limitations under the
+ * NPL.
+ * 
+ * The Initial Developer of this code under the NPL is Netscape
+ * Communications Corporation.  Portions created by Netscape are
+ * Copyright (C) 2000 Netscape Communications Corporation.  All Rights
+ * Reserved.
+ */
+
+/*
+ * A dummy header file that is a dependency for all the object files.
+ * Used to force a full recompilation of NSPR in Mozilla's Tinderbox
+ * depend builds.  See comments in rules.mk.
+ */
+
+#error "Do not include this header file."
--- a/config/rules.mk
+++ b/config/rules.mk
@@ -403,16 +403,39 @@ endif
 	$(AS) -o $@ $(ASFLAGS) -c $<
 
 %.i: %.c
 	$(CC) -C -E $(CFLAGS) $< > $*.i
 
 %: %.pl
 	rm -f $@; cp $< $@; chmod +x $@
 
+#
+# HACK ALERT
+#
+# The only purpose of this rule is to pass Mozilla's Tinderbox depend
+# builds (http://tinderbox.mozilla.org/showbuilds.cgi).  Mozilla's
+# Tinderbox builds NSPR continuously as part of the Mozilla client.
+# Because NSPR's make depend is not implemented, whenever we change
+# an NSPR header file, the depend build does not recompile the NSPR
+# files that depend on the header.
+#
+# This rule makes all the objects depend on a dummy header file.
+# Touch this dummy header file to force the depend build to recompile
+# everything.
+#
+# This rule should be removed when make depend is implemented.
+#
+
+DUMMY_DEPEND_H = $(topsrcdir)/config/prdepend.h
+
+$(filter $(OBJDIR)/%.$(OBJ_SUFFIX),$(OBJS)): $(OBJDIR)/%.$(OBJ_SUFFIX): $(DUMMY_DEPEND_H)
+
+# END OF HACK
+
 ################################################################################
 # Special gmake rules.
 ################################################################################
 
 #
 # Re-define the list of default suffixes, so gmake won't have to churn through
 # hundreds of built-in suffix rules for stuff we don't need.
 #