Tim Peters | eba84cd | 2001-10-13 20:16:17 +0000 | [diff] [blame] | 1 | # This manages to rebuild graminit.{h, c} under MSVC 6 (Windows), via |
| 2 | # |
| 3 | # nmake /f grammar.mak |
| 4 | # |
Tim Peters | 8ab2ec4 | 2003-06-17 00:05:53 +0000 | [diff] [blame] | 5 | # You may also need to copy python23.dll into this directory, or get |
| 6 | # it on your search path. |
| 7 | # |
Tim Peters | eba84cd | 2001-10-13 20:16:17 +0000 | [diff] [blame] | 8 | # The intermediate files can be nuked afterwards: |
| 9 | # |
| 10 | # nmake /f grammar.mak clean |
| 11 | # |
| 12 | # I don't understand the maze of preprocessor #define's on Windows, and |
Tim Peters | 1c61926 | 2002-04-22 00:39:44 +0000 | [diff] [blame] | 13 | # as a result this requires linking with python23.lib, so it's of no use |
Tim Peters | eba84cd | 2001-10-13 20:16:17 +0000 | [diff] [blame] | 14 | # for bootstrapping (the cause appears to be a useless-- in this |
| 15 | # particular case --pragma in PC\pyconfig.h, which demands that |
Tim Peters | 1c61926 | 2002-04-22 00:39:44 +0000 | [diff] [blame] | 16 | # python23.lib get linked in). |
Tim Peters | eba84cd | 2001-10-13 20:16:17 +0000 | [diff] [blame] | 17 | |
Jeremy Hylton | 3e0055f | 2005-10-20 19:59:25 +0000 | [diff] [blame] | 18 | LIBS= ..\PCbuild\python25.lib |
Tim Peters | eba84cd | 2001-10-13 20:16:17 +0000 | [diff] [blame] | 19 | |
Tim Peters | 8ab2ec4 | 2003-06-17 00:05:53 +0000 | [diff] [blame] | 20 | CFLAGS= /I ..\Include /I ..\PC /D MS_NO_COREDLL /D PGEN /MD |
Tim Peters | eba84cd | 2001-10-13 20:16:17 +0000 | [diff] [blame] | 21 | |
| 22 | GRAMMAR_H= ..\Include\graminit.h |
| 23 | GRAMMAR_C= ..\Python\graminit.c |
| 24 | GRAMMAR_INPUT= ..\Grammar\Grammar |
| 25 | |
| 26 | PGEN= pgen.exe |
| 27 | |
| 28 | POBJS= acceler.obj grammar1.obj listnode.obj node.obj parser.obj \ |
| 29 | parsetok.obj tokenizer.obj bitset.obj metagrammar.obj |
| 30 | |
| 31 | PARSER_OBJS= $(POBJS) myreadline.obj |
| 32 | |
| 33 | PGOBJS= firstsets.obj grammar.obj pgen.obj printgrammar.obj pgenmain.obj |
| 34 | |
| 35 | PGENOBJS= $(POBJS) $(PGOBJS) |
| 36 | |
| 37 | $(GRAMMAR_H) $(GRAMMAR_C): $(PGEN) $(GRAMMAR_INPUT) |
| 38 | $(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C) |
| 39 | |
| 40 | $(PGEN): $(PGENOBJS) |
| 41 | $(CC) $(PGENOBJS) $(LIBS) /Fe$(PGEN) |
| 42 | |
| 43 | clean: |
| 44 | del *.obj |
| 45 | del $(PGEN) |