aboutsummaryrefslogtreecommitdiffstats
path: root/devel/cocktail/files/patch-mtc-m2c-Makefile
blob: 0b957dca5ab2d61df3ea02f04dbf2487c54aeffc (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
--- /usr/ports/devel/cocktail/work/cocktail-9309//./mtc/m2c/Makefile    Tue Feb 15 14:24:29 1994
+++ ./mtc/m2c/Makefile  Thu Aug  5 18:49:18 2004
@@ -1,43 +1,37 @@
-BIN    = $(HOME)/bin
-LIB    = $(HOME)/lib
-OPT    = -O
-CC = cc
 
-                # C library (reuse)
-REUSE  = ../../reuse/m2c
+.include "../../Makefile.inc"
 
-                # C library
-CLIBS  = $(REUSE)/libreuse.a
+ROOTDIR = ../..
+CFLAGS  += -I$(INCDIR)
+CLIBS   += $(REUSELIB)
 
-                # options for cc
-CFLAGS = -w -I$(REUSE) $(OPT)
+RTS    = $(INCDIR)/SYSTEM_.h $(INCDIR)/SYSTEM_.c Arguments.h Arguments.c
 
-                # options for mtc
-M2FLAGS    = -c
+all: mtc
 
-                # "runtime system"
-RTS    = SYSTEM_.h SYSTEM_.c Arguments.h Arguments.c
-
-all    :
-
-install:   mtc $(BIN) $(LIB)/mtc
-   if test $(LIB) = $(BIN); then echo error: BIN = LIB; false; else true; fi
-   install -c -s -m 755 mtc $(BIN)
-   cp $(RTS) $(LIB)/mtc
-   chmod a+r $(LIB)/mtc/*.[hc]
+install:   mtc $(DESTBIN) $(DESTLIB)/mtc
+   if test $(DESTLIB) = $(DESTBIN); then echo error: DESTBIN = DESTLIB; false; else true; fi
+   install -c -s -m 755 mtc $(DESTBIN)
+   cp $(RTS) $(DESTLIB)/mtc
+   chmod a+r $(DESTLIB)/mtc/*.[hc]
 
 # installation directories
 
-$(BIN):
-   sh -c "if test ! -d $(BIN); then mkdir -p $(BIN); else true; fi"
+$(DESTBIN):
+   sh -c "if test ! -d $(DESTBIN); then mkdir -p $(DESTBIN); else true; fi"
 
-$(LIB):
-   sh -c "if test ! -d $(LIB); then mkdir -p $(LIB); else true; fi"
+$(DESTLIB):
+   sh -c "if test ! -d $(DESTLIB); then mkdir -p $(DESTLIB); else true; fi"
 
-$(LIB)/mtc:    $(LIB)
-   sh -c "if test ! -d $(LIB)/mtc; then mkdir -p $(LIB)/mtc; else true; fi"
+$(DESTLIB)/mtc:    $(DESTLIB)
+   sh -c "if test ! -d $(DESTLIB)/mtc; then mkdir -p $(DESTLIB)/mtc; else true; fi"
 
 
+clean:
+   -rm -f $(STDCLEAN) 
+   -rm -f   *.o
+   -rm -f mtc
+
 # HEAD
 
 sources    : AssocTab.h
@@ -236,9 +230,10 @@
 mtc.o  : Defs.h
 mtc.o  : Code.h
 
-SYSTEM_.o  : SYSTEM_.c SYSTEM_.h
+# SYSTEM_.o    : SYSTEM_.c SYSTEM_.h
 
-mtc    : $(SYSTEM) \
+# mtc  : $(SYSTEM) \
+mtc    : \
    mtc.o   \
    Code.o  \
    Values.o    \
@@ -257,7 +252,7 @@
    Semantics.o \
    DefMods.o   \
    Parser.o    \
-;  $(CC) $(CFLAGS) -o mtc $(SYSTEM)    \
+;  $(CC) $(CFLAGS) -o mtc \
    mtc.o   \
    Code.o  \
    Values.o    \
@@ -278,18 +273,3 @@
    Parser.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