summaryrefslogtreecommitdiffstats
path: root/Parser/grammar.mak
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2001-10-13 20:16:17 (GMT)
committerTim Peters <tim.peters@gmail.com>2001-10-13 20:16:17 (GMT)
commiteba84cdacb3ba20845a8b9612db257ae7e2a9c4e (patch)
tree219caea5e5a58951849df47d6f2556cd9af23209 /Parser/grammar.mak
parentd396b9c9c3315b6020ab53f595be05d939be8732 (diff)
downloadcpython-eba84cdacb3ba20845a8b9612db257ae7e2a9c4e.zip
cpython-eba84cdacb3ba20845a8b9612db257ae7e2a9c4e.tar.gz
cpython-eba84cdacb3ba20845a8b9612db257ae7e2a9c4e.tar.bz2
An MSVC makefile to rebuild the grammar files (graminit.[ch]) manually.
Ugly, but it works.
Diffstat (limited to 'Parser/grammar.mak')
-rw-r--r--Parser/grammar.mak42
1 files changed, 42 insertions, 0 deletions
diff --git a/Parser/grammar.mak b/Parser/grammar.mak
new file mode 100644
index 0000000..bbb83aa
--- /dev/null
+++ b/Parser/grammar.mak
@@ -0,0 +1,42 @@
+# This manages to rebuild graminit.{h, c} under MSVC 6 (Windows), via
+#
+# nmake /f grammar.mak
+#
+# The intermediate files can be nuked afterwards:
+#
+# nmake /f grammar.mak clean
+#
+# I don't understand the maze of preprocessor #define's on Windows, and
+# as a result this requires linking with python22.lib, so it's of no use
+# for bootstrapping (the cause appears to be a useless-- in this
+# particular case --pragma in PC\pyconfig.h, which demands that
+# python22.lib get linked in).
+
+LIBS= ..\PCbuild\python22.lib
+
+CFLAGS= /I ..\Include /I ..\PC /D MS_NO_COREDLL
+
+GRAMMAR_H= ..\Include\graminit.h
+GRAMMAR_C= ..\Python\graminit.c
+GRAMMAR_INPUT= ..\Grammar\Grammar
+
+PGEN= pgen.exe
+
+POBJS= acceler.obj grammar1.obj listnode.obj node.obj parser.obj \
+ parsetok.obj tokenizer.obj bitset.obj metagrammar.obj
+
+PARSER_OBJS= $(POBJS) myreadline.obj
+
+PGOBJS= firstsets.obj grammar.obj pgen.obj printgrammar.obj pgenmain.obj
+
+PGENOBJS= $(POBJS) $(PGOBJS)
+
+$(GRAMMAR_H) $(GRAMMAR_C): $(PGEN) $(GRAMMAR_INPUT)
+ $(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C)
+
+$(PGEN): $(PGENOBJS)
+ $(CC) $(PGENOBJS) $(LIBS) /Fe$(PGEN)
+
+clean:
+ del *.obj
+ del $(PGEN)