aboutsummaryrefslogtreecommitdiff
path: root/unix/boot/generic.new/mkpkg.sh
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2015-07-08 20:46:52 -0400
committerJoseph Hunkeler <jhunkeler@gmail.com>2015-07-08 20:46:52 -0400
commitfa080de7afc95aa1c19a6e6fc0e0708ced2eadc4 (patch)
treebdda434976bc09c864f2e4fa6f16ba1952b1e555 /unix/boot/generic.new/mkpkg.sh
downloadiraf-linux-fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4.tar.gz
Initial commit
Diffstat (limited to 'unix/boot/generic.new/mkpkg.sh')
-rw-r--r--unix/boot/generic.new/mkpkg.sh18
1 files changed, 18 insertions, 0 deletions
diff --git a/unix/boot/generic.new/mkpkg.sh b/unix/boot/generic.new/mkpkg.sh
new file mode 100644
index 00000000..45389d35
--- /dev/null
+++ b/unix/boot/generic.new/mkpkg.sh
@@ -0,0 +1,18 @@
+# Bootstrap the generic preprocessor. The -lln library is not used to avoid
+# the enternal dependency. The sed script is used to edit certain nonportable
+# constructs in the LEX code, and the filename lex.yy.c is changed to lexyy.c
+# for portability reasons.
+
+find tok.l -newer lexyy.c -exec rm lexyy.c \;
+if test -f lexyy.c; then\
+ $CC -c $HSI_CF lexyy.c;\
+else\
+ lex tok.l;\
+ sed -f lex.sed lex.yy.c > lexyy.c; rm lex.yy.c;\
+ $CC -c $HSI_CF lexyy.c;\
+fi
+
+$CC -c $HSI_CF generic.c chario.c yywrap.c
+$CC $HSI_LF generic.o lexyy.o chario.o yywrap.o $HSI_LIBS -o generic.e
+mv -f generic.e ../../hlib
+rm *.o