summaryrefslogtreecommitdiff
path: root/web/glasgow/lit2x-0.16/mkworld/suffixes-GEN.jm
blob: 8a399a7ac551ae626252da2d2ecb62a8874ba56a (plain)
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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
# line 31 "suffixes-GEN.ljm"
#ifndef LitSuffixRule
#define LitSuffixRule(beforesuff,aftersuff)                             @@\
CAT2(beforesuff,aftersuff):                                             @@\
        $(RM) $@                                                        @@\
        $(LIT2PGM) $(LIT2PGMFLAGS) -o $@ $<                             @@\
        @chmod 444 $@                                                   @@\
                                                                        @@\
beforesuff.itxi:                                                        @@\
        $(RM) $@                                                        @@\
        $(LIT2TEXI) -c $(LIT2TEXIFLAGS) -o $@ $<                        @@\
        @chmod 444 $@                                                   @@\
                                                                        @@\
beforesuff.itex:                                                        @@\
        $(RM) $@                                                        @@\
        $(LIT2LATEX) -c $(LIT2LATEXFLAGS) -o $@ $<                      @@\
        @chmod 444 $@
#endif /* LitSuffixRule */
# line 59 "suffixes-GEN.ljm"
#ifndef NormalLibraryObjectRule
#define NormalLibraryObjectRule()                                       @@\
.c.o:                                                                   @@\
        RemoveTarget ($@)                                               @@\
        $(CC) -c $(CFLAGS) $*.c
#endif
# line 84 "suffixes-GEN.ljm"
#ifndef HaskellSuffixRules 
#define HaskellSuffixRules()                            @@\
SuffixRule_o_hi()                                       @@\
SuffixRule_lhs_o()                                      @@\
SuffixRule_hs_o()
#endif /* !HaskellSuffixRules */
# line 97 "suffixes-GEN.ljm"
#ifndef SuffixRule_o_hi
#define SuffixRule_o_hi()                                                       @@\
.o.hi:                                                                          @@\
        @if [ ! -f $@ ] ; then \                                                @@\
            echo $(RM) $< ; \                                                   @@\
            $(RM) $< ; \                                                        @@\
            set +e ; \                                                          @@\
            echo $(MAKE) HC="$(HC)" HCFLAGS="$(HCFLAGS)" $(MFLAGS) $< ; \       @@\
            $(MAKE) HC="$(HC)" HCFLAGS="$(HCFLAGS)" $(MFLAGS) $< ; \            @@\
            if [ $$? -ne 0 ] ; then \                                           @@\
                exit 1; \                                                       @@\
            fi ; \                                                              @@\
        fi
#endif /* !SuffixRule_o_hi */
# line 114 "suffixes-GEN.ljm"
#ifndef SuffixRule_hs_o
#define SuffixRule_hs_o()                                                       @@\
.hs.o:                                                                          \
_body_HaskellCompileWithSpecifiedFlags($<,$*,hs,-c $(HCFLAGS))
#endif /* !SuffixRule_hs_o */

#ifndef SuffixRule_lhs_o
#define SuffixRule_lhs_o()                                                      @@\
.lhs.o:                                                                         \
_body_HaskellCompileWithSpecifiedFlags($<,$*,lhs,-c $(HCFLAGS))
#endif /* !SuffixRule_lhs_o */
# line 136 "suffixes-GEN.ljm"
#ifndef DocProcessingSuffixRules
#define DocProcessingSuffixRules()                      @@\
.tex.dvi:                                               @@\
        $(RM) $@                                        @@\
        $(LTX) $<                                       @@\
                                                        @@\
.verb.tex:                                              @@\
        $(RM) $*.tex                                    @@\
        expand $*.verb | $(VERBATIM) > $*.tex           @@\
                                                        @@\
.tib.tex:                                               @@\
        $(RM) $*.tex $*.verb-t.tex                      @@\
        $(TIB) $*.tib                                   @@\
        expand $*.tib-t.tex | $(VERBATIM) > $*.tex      @@\
        $(RM) $*.tib-t.tex                              @@\
                                                        @@\
.fig.ps:                                                @@\
        $(RM) $@                                        @@\
        fig2dev -L ps $< $@                             @@\
                                                        @@\
.fig.tex:                                               @@\
        $(RM) $@                                        @@\
        fig2dev -L latex $< $@

#endif /* ! DocProcessingSuffixRules */
# line 170 "suffixes-GEN.ljm"
.SUFFIXES: .xdvi .ps .dvi .tex .fig .tib .verb .itex .itxi .lit \
        _p.o .o .s .hi .hc .lhc .lhs .hs \
        .prl .lprl \
        .sh .lsh \
        .c .lc .h .lh .lex .llex .y \
        .ljm .jm
# line 185 "suffixes-GEN.ljm"
.s.o:
        $(RM) $@
        $(AS) $(ASFLAGS) -o $@ $< || $(RM) $@
# line 200 "suffixes-GEN.ljm"
LitSuffixRule(.ljm,.jm)         /* mkworld */

#if SuffixRules_WantLiterate == YES

LitSuffixRule(.lit,/*none*/)    /* no language really */
LitSuffixRule(.lhs,.hs)         /* Haskell */
LitSuffixRule(.lhc,.hc)         /* Haskell assembler (C) */
LitSuffixRule(.lprl,.prl)       /* Perl */
LitSuffixRule(.lsh,.sh)         /* Bourne shell */
LitSuffixRule(.lc,.c)           /* C */
LitSuffixRule(.lh,.h)
LitSuffixRule(.llex,.lex)       /* Lex */

/* extra rule... flex can't handle #line's yet */
/* also: save the .lex file in case of some debugging need */
.llex.c:
        $(RM) $@ $*.lex $*.lex.save
        $(LIT2PGM) $(LIT2PGMFLAGS) $< > $*.lex
        $(FLEX) $*.lex && mv $*.lex $*.lex.save && mv lex.yy.c $*.c

#endif /* SuffixRules_WantLiterate */
# line 234 "suffixes-GEN.ljm"
.y.c:
        @echo please use an explicit "YaccRunWithExpectMsg" macro

.lex.c: /* ToDo: should make it do flex */
        $(RM) $@
        $(LEX) -t $(LFLAGS) $< > $@ || ( $(RM) $@ && exit 1 )
# line 244 "suffixes-GEN.ljm"
#if CCompilerGroksMinusCMinusO == YES
.c.o:
        $(RM) $@
        $(CC) $(CFLAGS) -c $< -o $@
.c.s:
        $(RM) $@
        $(CC) $(CFLAGS) -S $< -o $@

#else /* ! CCompilerGroksMinusCMinusO */
.c.o:
        $(RM) $@
        $(CC) $(CFLAGS) -c $<
        @if [ \( $(@D) != '.' \) -a \( $(@D) != './' \) ] ; then \
            echo mv $(@F) $@ ; \
            mv $(@F) $@ ; \
        fi
.c.s:
        $(RM) $@
        $(CC) $(CFLAGS) -S $<
        @if [ \( $(@D) != '.' \) -a \( $(@D) != './' \) ] ; then \
            echo mv $(@F) $@ ; \
            mv $(@F) $@ ; \
        fi
#endif /* ! CCompilerGroksMinusCMinusO */
# line 287 "suffixes-GEN.ljm"
#if SuffixRules_WantDocProcessing == YES
DocProcessingSuffixRules()
#endif /* SuffixRules_WantDocProcessing */