Quellcode durchsuchen

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

Ondrej Martinek vor 17 Jahren
Ursprung
Commit
bcf9e57952
1 geänderte Dateien mit 3 neuen und 3 gelöschten Zeilen
  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)