From e291cff14e97feb3cff711f5a5cbcb63b32f9c72 Mon Sep 17 00:00:00 2001 From: Tomohiro Kusumi Date: Thu, 20 Oct 2016 23:03:18 +0900 Subject: [PATCH] Use fmt -w WIDTH option instead of -WIDTH Most systems support -WIDTH option which is an abbreviated form of -w WIDTH or --width=WIDTH option, but some OS don't support -WIDTH format. As far as I've checked (on actual systems or online manpages), Linux/FreeBSD/DragonFlyBSD/OpenBSD/Solaris/AIX/Cygwin support -WIDTH format, but NetBSD doesn't support this (see below). IRIX and HPUX may not support either according to online manpages. -w WIDTH format is basically supported by all systems that have fmt command, so this is probably better in terms of portability. -- CC crc/crc64.o fmt: unknown option -- 1 Usage: fmt [-Cr] [-g ] [-m|w ] [..] fmt [-Cr] [] [] [] CC crc/md5.o fmt: unknown option -- 1 Usage: fmt [-Cr] [-g ] [-m|w ] [..] fmt [-Cr] [] [] [] ... Signed-off-by: Tomohiro Kusumi Signed-off-by: Jens Axboe --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 6b5548a8..b3a12ddf 100644 --- a/Makefile +++ b/Makefile @@ -315,7 +315,7 @@ 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 - @sed -e 's/.*://' -e 's/\\$$//' < $*.d.tmp | fmt -1 | \ + @sed -e 's/.*://' -e 's/\\$$//' < $*.d.tmp | fmt -w 1 | \ sed -e 's/^ *//' -e 's/$$/:/' >> $*.d @rm -f $*.d.tmp @@ -354,7 +354,7 @@ 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 - @sed -e 's/.*://' -e 's/\\$$//' < $*.d.tmp | fmt -1 | \ + @sed -e 's/.*://' -e 's/\\$$//' < $*.d.tmp | fmt -w 1 | \ sed -e 's/^ *//' -e 's/$$/:/' >> $*.d @rm -f $*.d.tmp -- 2.25.1