* as/z80/Makefile: fix permanent rebuild of z80
authorbernhardheld <bernhardheld@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Sat, 19 Apr 2003 10:06:51 +0000 (10:06 +0000)
committerbernhardheld <bernhardheld@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Sat, 19 Apr 2003 10:06:51 +0000 (10:06 +0000)
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2540 4a8a32a2-be11-0410-ad9d-d568d2c75423

ChangeLog
as/z80/Makefile

index 2ebb099719b41228e442617f174246deb62e2a19..85ac10929f1ad4beb524b064969cc39a3d4d2435 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2003-04-19  Bernhard Held <bernhard@bernhardheld.de>
+
+       * as/z80/Makefile: fix permanent rebuild of z80
+
 2003-04-18     Kevin Vigor <kevin@vigor.nu>
 
        * src/SDCCopt.c: add special case optimization to replace modulo by
index a6d706fbab5678a0a352b0b63d5017fc8fb214c6..9a914813ac4dfd35b4933c00700fde834cb0bedd 100644 (file)
@@ -31,17 +31,24 @@ Makefile.dep: $(SRC) *.h
 
 include Makefile.dep
 
-$(OBJDIR):
+# We need a '.stamp'-file in $(OBJDIR), because the time stamp
+# of $(OBJDIR) itself is always updated, when a file in $(OBJDIR)
+# is updated. A rule like
+#      $(OBJDIR)/anyfile: $(OBJDIR)
+# will always force a remake (at least on Linux ext2).
+
+$(OBJDIR)/.stamp:
        mkdir -p $(OBJDIR)
+       touch $(OBJDIR)/.stamp
 
 $(BINS): $(OBJS) $(SLIBOBJS)
        $(CC) -o $(BINS) $(OBJS) $(SLIBOBJS) $(LDFLAGS)
 
 
-$(OBJDIR)/%.o: %.c $(OBJDIR)
+$(OBJDIR)/%.o: %.c $(OBJDIR)/.stamp
        $(CC) -c $(CFLAGS) -o $@ $<
 
-$(OBJDIR)/%.o: $(SLIB)/%.c $(OBJDIR)
+$(OBJDIR)/%.o: $(SLIB)/%.c $(OBJDIR)/.stamp
        $(CC) -c $(CFLAGS) -o $@ $<
 
 _as-z80: