summaryrefslogtreecommitdiff
path: root/benchmarks/fio/patches/patch-Makefile
blob: 3c06fe90cf022a1bd6e7a13b5f2e4b5630f6b683 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
$NetBSD: patch-Makefile,v 1.1 2017/02/04 12:50:23 ryoon Exp $

Convert the fmt(1) command to a tr(1) one (the fmt(1) old syntax command is not
supported on all Unix systems).

--- Makefile.orig	2017-01-17 15:51:31.000000000 +0000
+++ Makefile
@@ -319,8 +319,8 @@ override CFLAGS += -DFIO_VERSION='"$(FIO
 	@$(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 -w 1 | \
-		sed -e 's/^ *//' -e 's/$$/:/' >> $*.d
+	@sed -e 's/.*://' -e 's/\\$$//' < $*.d.tmp | tr -cs "[:graph:]" "\n" | \
+		sed -e 's/^ *//' -e '/^$$/ d' -e 's/$$/:/' >> $*.d
 	@rm -f $*.d.tmp
 
 ifdef CONFIG_ARITHMETIC
@@ -358,8 +358,8 @@ 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 -w 1 | \
-		sed -e 's/^ *//' -e 's/$$/:/' >> $*.d
+	@sed -e 's/.*://' -e 's/\\$$//' < $*.d.tmp | tr -cs "[:graph:]" "\n" | \
+		sed -e 's/^ *//' -e '/^$$/ d' -e 's/$$/:/' >> $*.d
 	@rm -f $*.d.tmp
 
 gcompat.o: gcompat.c gcompat.h