--- /usr/ports/devel/cocktail/work/cocktail-9309//./lalr/m2c/Makefile Tue Feb 15 14:23:56 1994 +++ ./lalr/m2c/Makefile Thu Aug 5 18:49:12 2004 @@ -1,21 +1,9 @@ -BIN = $(HOME)/bin -LIB = $(HOME)/lib -OPT = -O -CC = cc - # C library (reuse) -REUSE = ../../reuse/m2c +.include "../../Makefile.inc" - # C library (front) -FRONT = ../../front/m2c - - # C libraries -CLIBS = $(FRONT)/libfront.a $(REUSE)/libreuse.a - - # options for C compiler -CFLAGS = -I$(FRONT) -I$(REUSE) $(OPT) - -M2FLAGS = -c +ROOTDIR = ../.. +CFLAGS += -I$(FRONTINC) -I$(INCDIR) +CLIBS += $(FRONTLIB) $(REUSELIB) PLIB = ParserDrv.mi Parser.md Parser.mi Errors.md Errors.mi Scanner.md Scanner.mi \ ParserDrv.c Parser.c Parser.h Errors.c Errors.h Scanner.c Scanner.h \ @@ -24,19 +12,22 @@ all : lalr -install: lalr lalr.sh $(LIB)/lalr - if test $(LIB) = $(BIN); then echo error: BIN = LIB; false; else true; fi - install -c -s -m 755 lalr $(LIB)/lalr - sed "s;LIB;$(LIB);" < lalr.sh > $(BIN)/lalr - chmod a+rx $(BIN)/lalr - cd ../lib; cp $(PLIB) $(LIB)/lalr - cd $(LIB)/lalr; chmod a+r $(PLIB) +install: lalr lalr.sh $(DESTLIB)/lalr + if test $(DESTLIB) = $(DESTBIN); then echo error: DESTBIN = DESTLIB; false; else true; fi + install -c -s -m 755 lalr $(DESTLIB)/lalr + sed "s;LIB;$(DESTLIB);" < lalr.sh > $(DESTBIN)/lalr + chmod a+rx $(DESTBIN)/lalr + cd ../lib; cp $(PLIB) $(DESTLIB)/lalr + cd $(DESTLIB)/lalr; chmod a+r $(PLIB) # installation directories -$(LIB)/lalr: $(LIB) - sh -c "if test ! -d $(LIB)/lalr; then mkdir -p $(LIB)/lalr; else true; fi" +$(DESTLIB)/lalr: $(DESTLIB) + sh -c "if test ! -d $(DESTLIB)/lalr; then mkdir -p $(DESTLIB)/lalr; else true; fi" +clean: + -rm -f $(STDCLEAN) + -rm -f *.o lalr # HEAD @@ -200,18 +191,3 @@ Infos.o \ $(CLIBS) -# TAIL - -clean : - rm -f core *.o - -.SUFFIXES: .md .mi .h .c .o - -.mi.c: - mtc2 $(M2FLAGS) $*.mi; - -.md.h: - mtc2 $(M2FLAGS) $*.md; - -.c.o: - $(CC) $(CFLAGS) -c $*.c