summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoey Hess <joey@kitenet.net>2012-06-04 11:48:19 -0400
committerJoey Hess <joey@kitenet.net>2012-06-04 11:48:19 -0400
commitafe520ed30715628765e6b5f858d57af487358b6 (patch)
tree873fbc82e72ac3e57b3a2423ed90029f3509d9f4
parent66a2a6ace9fb99096c2a1d0144a7b12895db59e6 (diff)
downloadmoreutils-afe520ed30715628765e6b5f858d57af487358b6.tar.gz
let's inline the awk
it's not *too* ugly (or my ugly tolerance for Makefiles is high)
-rw-r--r--Makefile2
-rwxr-xr-xerrnos6
2 files changed, 1 insertions, 7 deletions
diff --git a/Makefile b/Makefile
index 41c9c81..e798a98 100644
--- 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
index 62a0429..0000000
--- a/errnos
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/usr/bin/awk -f
-
-/^#define E/ {
- printf "{\"%s\",%d},\n", $2, $3
-}
-