Re: makefile for esqlc source
Posted in 1995
In article <4b6im4$6bh@hpcc48.corp.hp.com>, pwalden says... >Try this rule in your makefile: > >SUFFIXES : .ec > >ec.o : > esql -e $(CFLAGS) $< > $(CC) $(CFLAGS) -c $*.c > @-rm -f $*.c > >The makefile should then automatically handle esqlc files. The only problem >I have with this method is that when a compile error occurs the 'rm' does not >remove the intermediate .c. You should be able to fix that by defining the .ec suffix as follows: .ec.c : esql -e $(CFLAGS) $*.ec That way, the .ec rule invokes the preprocessor to create the .c file, then the .c rule gets invoked to create the .o; if there is an error in either step, rm should remove it. -- William Harris (Standard disclaimers) CARS Information Systems 4000 Executive Park Drive Cincinnati, OH (USA) 45241