Sfoglia il codice sorgente

Fixed %.d:%.c rule to fail if the target file was not created or is empty

Ondrej Martinek 17 anni fa
parent
commit
bcf9e57952
1 ha cambiato i file con 3 aggiunte e 3 eliminazioni
  1. 3 3
      Makefile.rules

+ 3 - 3
Makefile.rules

@@ -27,9 +27,9 @@
 	$(CC) $(CFLAGS) $(INCLUDES) $(DEFS) -c $< -o $@
 
 %.d: %.c $(ALLDEP)
-	@set -e; $(MKDEP) $(CFLAGS) $(INCLUDES) $(DEFS) $< \
-	|  sed 's#\(\($(*D)/\)\{0,1\}$(*F)\)\.o[ :]*#$*.o $@ : #g' > $@; \
-	[ -s $@ ] || rm -f $@
+	$(MKDEP) $(CFLAGS) $(INCLUDES) $(DEFS) $< \
+	    |  sed 's#\(\($(*D)/\)\{0,1\}$(*F)\)\.o[ :]*#$*.o $@ : #g' > $@; \
+	    test -s $@ || { rm -f $@; false; }
 
 # use RPATH and SER_LIBS if needed (make install and the module depends
 # on some ser libs)