]> Zhao Yanbai Git Server - minix.git/commitdiff
/usr/lib/cpp script to invoke clang -E
authorBen Gras <ben@minix3.org>
Fri, 17 Feb 2012 14:43:50 +0000 (14:43 +0000)
committerBen Gras <ben@minix3.org>
Fri, 17 Feb 2012 15:15:31 +0000 (15:15 +0000)
. mainly to keep X working

commands/Makefile
commands/cpp/Makefile [new file with mode: 0644]
commands/cpp/cpp.sh [new file with mode: 0644]

index 2d8c6cc62dffc301062d25b811eaea9f6a2c90ed..3d1d1d54833c6cfeee1c0b206987dd99e6d38bcb 100644 (file)
@@ -5,7 +5,7 @@
 SUBDIR=        add_route arp ash at awk \
        backup badblocks banner basename \
        btrace cal calendar \
-       cat cawf cd  cdprobe checkhier \
+       cat cawf cd  cdprobe checkhier cpp \
        chmod chown chroot ci cksum cleantmp clear cmp co \
        comm compress cp crc cron crontab cut \
        dd decomp16 DESCRIBE dev2name devsize df dhcpd \
diff --git a/commands/cpp/Makefile b/commands/cpp/Makefile
new file mode 100644 (file)
index 0000000..18917ae
--- /dev/null
@@ -0,0 +1,5 @@
+SCRIPTS=       cpp.sh
+BINDIR=        /usr/lib
+MAN=
+
+.include <bsd.prog.mk>
diff --git a/commands/cpp/cpp.sh b/commands/cpp/cpp.sh
new file mode 100644 (file)
index 0000000..a2ca6f9
--- /dev/null
@@ -0,0 +1,6 @@
+exec 2>>/cpp.log
+set -x
+if [ $# -ne 1 ]
+then   exec /usr/pkg/bin/clang "$@" -E - 
+else   exec /usr/pkg/bin/clang "$@" -E 
+fi