Mail Archives: djgpp/1996/04/23/09:48:09
Yeah, I know what it's like. That was my first (and only) problem in
porting my grammar to Bison from Yacc. I had to get the mv port from the
GNU fileutils (which Eli kindly suggested), because for some inexplicable
reason the built-in make for .y files expects to find a mv command! Which
of course does not normally exist in DOS.
The only serious solution which finally got rid of all this foolishness
was not to use the default rules for .y files and move, er, rename them
yourself explicitly. The update utility which came with djgpp helps a
great deal. The makefile would thus look like this:
y_tab.c: grammar.y $(INCLUDES)
bison -y -d grammar.y
grammar.h: y_tab.c
update y_tab.h grammar.h
grammar.c: y_tab.c
rename y_tab.c grammar.c
This saves recompilation for whatever files might need grammar.h, because
update only updates grammar.h if y_tab.h is really different from the old
grammar.h. Normally, that file doesn't change much, right?
That is my pet peeve with these djgpp programs--their lineage from Unix
is so explicit that they sometimes fall down when we get to the
differences between the two operating systems, the pathetic DOS 8.3
filename limit is only one of them.
-------------------------------------------------------------------------
University of the Philippines Rafael R. Sevilla
PABX/OVCA: Diliman Networking Project rsevilla AT sauron DOT upd DOT edu DOT ph
-------------------------------------------------------------------------
- Raw text -