freebsd-ports/devel/cocktail/files/patch-rex-m2c-Makefile
Pav Lucistnik c0150116c3 Add cocktail, a set of program generators or compiler construction tools
for nearly all phases of a compiler. It has been developed until 1993
at the Karlsruhe research lab of GMD, the German National Research Center
for Information Technology.

PR:		ports/65164
Submitted by:	Willem Jan Withagen <wjw@withagen.nl>
2004-05-04 21:07:46 +00:00

72 lines
1.6 KiB
Text

--- ../../work/cocktail-9309//./rex/m2c/Makefile Tue Feb 15 14:27:51 1994
+++ ./rex/m2c/Makefile Wed Mar 31 22:59:41 2004
@@ -1,34 +1,28 @@
-BIN = $(HOME)/bin
-LIB = $(HOME)/lib
-OPT = -O
-CC = cc
- # C library (reuse)
-REUSE = ../../reuse/m2c
+.include "../../Makefile.inc"
- # C libraries
-CLIBS = $(REUSE)/libreuse.a
-
- # options for C compiler
-CFLAGS = -w -I$(REUSE) $(OPT)
-
-M2FLAGS = -c
+ROOTDIR = ../..
+CFLAGS += -I$(INCDIR)
+CLIBS += $(REUSELIB)
all : rex
-install: rex rex.sh $(LIB)/rex
- if test $(LIB) = $(BIN); then echo error: BIN = LIB; false; else true; fi
- sed "s;LIB;$(LIB);g" < rex.sh > $(BIN)/rex
- chmod a+rx $(BIN)/rex
- install -c -s -m 755 rex $(LIB)/rex
- cp ../lib/[Salst]* $(LIB)/rex
- chmod a+r $(LIB)/rex/[Salst]*
+install: rex rex.sh $(DESTLIB)/rex
+ if test $(DESTLIB) = $(DESTBIN); then echo error: DESTBIN = DESTLIB; false; else true; fi
+ $(SED) "s;LIB;$(DESTLIB);g" < rex.sh > $(DESTBIN)/rex
+ chmod a+rx $(DESTBIN)/rex
+ install -c -m 755 rex $(DESTLIB)/rex
+ cp ../lib/[Salst]* $(DESTLIB)/rex
+ chmod a+r $(DESTLIB)/rex/[Salst]*
# installation directories
-$(LIB)/rex: $(LIB)
- sh -c "if test ! -d $(LIB)/rex; then mkdir -p $(LIB)/rex; else true; fi"
+$(DESTLIB)/rex: $(DESTLIB)
+ sh -c "if test ! -d $(DESTLIB)/rex; then mkdir -p $(DESTLIB)/rex; else true; fi"
+clean:
+ rm -f core *.o
+ rm -f rex
# HEAD
@@ -198,18 +192,3 @@
Scanner.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