]> err.no Git - moreutils/commitdiff
let's inline the awk
authorJoey Hess <joey@kitenet.net>
Mon, 4 Jun 2012 15:48:19 +0000 (11:48 -0400)
committerJoey Hess <joey@kitenet.net>
Mon, 4 Jun 2012 15:48:19 +0000 (11:48 -0400)
it's not *too* ugly (or my ugly tolerance for Makefiles is high)

Makefile
errnos [deleted file]

index 41c9c814ceffbd966c31199526a8e145fd6611a0..e798a9851386094eea02584196c88e04e3c9eb1b 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -50,7 +50,7 @@ parallel.1: parallel.docbook
 errno.o: errnos.h
 errnos.h:
        echo '#include <errno.h>' > dump.c
-       $(CC) -E -dD dump.c | ./errnos > errnos.h
+       $(CC) -E -dD dump.c | awk '/^#define E/ { printf "{\"%s\",%d},\n", $$2, $$3 }' > errnos.h
        rm -f dump.c
        
 errno.1: errno.docbook
diff --git a/errnos b/errnos
deleted file mode 100755 (executable)
index 62a0429..0000000
--- a/errnos
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/usr/bin/awk -f
-
-/^#define E/ {
-    printf "{\"%s\",%d},\n", $2, $3
-}
-