HOWTO: update directory and filename option descriptions
[fio.git] / Makefile
index 64fa97a71f68cb5d53797399690c624a0cc400b3..bef930f876718c48e72a5c169912760e04ac5e43 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -327,8 +327,13 @@ override CFLAGS += -DFIO_VERSION='"$(FIO_VERSION)"'
        @$(CC) -MM $(CFLAGS) $(CPPFLAGS) $(SRCDIR)/$*.c > $*.d
        @mv -f $*.d $*.d.tmp
        @sed -e 's|.*:|$*.o:|' < $*.d.tmp > $*.d
+ifeq ($(CONFIG_TARGET_OS), NetBSD)
+       @sed -e 's/.*://' -e 's/\\$$//' < $*.d.tmp | tr -cs "[:graph:]" "\n" | \
+               sed -e 's/^ *//' -e '/^$$/ d' -e 's/$$/:/' >> $*.d
+else
        @sed -e 's/.*://' -e 's/\\$$//' < $*.d.tmp | fmt -w 1 | \
                sed -e 's/^ *//' -e 's/$$/:/' >> $*.d
+endif
        @rm -f $*.d.tmp
 
 ifdef CONFIG_ARITHMETIC
@@ -366,8 +371,13 @@ init.o: init.c FIO-VERSION-FILE
        @$(CC) -MM $(CFLAGS) $(CPPFLAGS) $(SRCDIR)/$*.c > $*.d
        @mv -f $*.d $*.d.tmp
        @sed -e 's|.*:|$*.o:|' < $*.d.tmp > $*.d
+ifeq ($(CONFIG_TARGET_OS), NetBSD)
+       @sed -e 's/.*://' -e 's/\\$$//' < $*.d.tmp | tr -cs "[:graph:]" "\n" | \
+               sed -e 's/^ *//' -e '/^$$/ d' -e 's/$$/:/' >> $*.d
+else
        @sed -e 's/.*://' -e 's/\\$$//' < $*.d.tmp | fmt -w 1 | \
                sed -e 's/^ *//' -e 's/$$/:/' >> $*.d
+endif
        @rm -f $*.d.tmp
 
 gcompat.o: gcompat.c gcompat.h