commit 344825fbb21140229625e78462b7e22280e3deb7
Author:     FRIGN <[email protected]>
AuthorDate: Tue May 17 21:35:49 2016 +0200
Commit:     FRIGN <[email protected]>
CommitDate: Tue May 17 21:35:49 2016 +0200

    Rename generror to generror.awk and change file mode
    
    Now it's clear what it is. The executable bit was not necessary,
    as we execute it using awk -f.

diff --git a/cc2/Makefile b/cc2/Makefile
index c56b70d..12cea53 100644
--- a/cc2/Makefile
+++ b/cc2/Makefile
@@ -18,7 +18,7 @@ main.o: error.h
 
 error.h: cc2.h
        rm -f $@; trap 'rm -f $$$$.h' EXIT INT QUIT ;\
-       awk -f generror cc2.h > $$$$.h && mv $$$$.h $@
+       awk -f generror.awk cc2.h > $$$$.h && mv $$$$.h $@
 
 cc2: $(OBJS) ../lib/libcc.a
        $(CC) $(SCC_LDFLAGS) $(OBJS) ../lib/libcc.a -o $@
diff --git a/cc2/generror b/cc2/generror
deleted file mode 100755
index 797fb55..0000000
--- a/cc2/generror
+++ /dev/null
@@ -1,12 +0,0 @@
-# See LICENSE file for copyright and license details.
-BEGIN {
-       print "char *errlist[] = {"
-}
-/^enum nerrors \{/     {inhome = 1}
-inhome && /E[A-Z]*, /  {sub(/,/, "", $1)
-                        printf("\t[%s] = \"", $1)
-                        for (i = 3; i < NF-1; ++i)
-                               printf("%s ", $i)
-                        printf("%s\",\n", $(NF-1));}
-inhome && /^}/          {print "};" ; inhome = 0}
-
diff --git a/cc2/generror.awk b/cc2/generror.awk
new file mode 100644
index 0000000..797fb55
--- /dev/null
+++ b/cc2/generror.awk
@@ -0,0 +1,12 @@
+# See LICENSE file for copyright and license details.
+BEGIN {
+       print "char *errlist[] = {"
+}
+/^enum nerrors \{/     {inhome = 1}
+inhome && /E[A-Z]*, /  {sub(/,/, "", $1)
+                        printf("\t[%s] = \"", $1)
+                        for (i = 3; i < NF-1; ++i)
+                               printf("%s ", $i)
+                        printf("%s\",\n", $(NF-1));}
+inhome && /^}/          {print "};" ; inhome = 0}
+

Reply via email to