Thread View: comp.sys.next.programmer
1 messages
1 total messages
Started by J. G. Gregory
Fri, 14 Aug 1992 19:22
understanding make
Author: J. G. Gregory
Date: Fri, 14 Aug 1992 19:22
Date: Fri, 14 Aug 1992 19:22
37 lines
1899 bytes
1899 bytes
I am trying to debug a problem that occurs deep inside lex. I want to turn on
the debugging features of lex, but I can't seem to get "make" to compile the
lex output with the debugging flags on. I feel (and hope) that it is my weak
understanding of make that is the problem.
I want to put -DLEXDEBUG in when I cc the lex output. That is, in the sequence
of commands involved in making an object file:
lex foo.lm
mv lex.yy.c foo.m
cc -g -Wall -DDEBUG -c foo.m -o debug_obj/foo.o
^^^
I want -DLEXDEBUG here^
foo.lm is in a subproject. I have tried adding
OTHER_CFLAGS = -DLEXDEBUG
to the Makefile.preamble in that subproject directory, but it doesn't have an
effect. I also tried rewriting the suffix rule for .lm to .o, but that didn't
have an effect either. Further, the default for .lm.o has a rm line which
never happens on my system:
.lm.o:
$(LEX) $(LFLAGS) $*.lm
$(MV) $(MVFLAGS) lex.yy.c $*.m
$(CC) $(CFLAGS) $(OBJCFLAGS) -c $*.m
$(RM) $(RMFLAGS) $*.m
I think I must not be overriding something late enough. I tried putting the
things in Makefile.postamble, but had the same lack of success.
I can do what I want manually, but frustration with make looms so large that I
feel I must ask for advice. Nearly everything I have tried doesn't have the
intended effect. The NeXT make hierarchy is complex and hard to follow. I
have the Nutshell book on make, which is pretty weak, and no real help on
something as complex as NeXT's make stuff.
Any and all advice appreciated.
--J Gregory
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads