summaryrefslogtreecommitdiff
path: root/solenv/inc/tg_yxx.mk
blob: a8c34d5be0c61b38303c9f7a76f28ec284cdfc0a (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

.IF "$(YACCTARGET)"!=""
$(MISC)$/%.cxx : %.y
    @echo ------------------------------
    @echo Making: $@
.IF "$(GUI)"=="UNX" || "$(USE_SHELL)" != "4nt"
    +tr -d "\015" < $< > $(MISC)$/stripped_$<
.ELSE
    +cat $< > $(MISC)$/stripped_$<
.ENDIF
    $(BISON) $(YACCFLAGS) $(YACCTARGET) $(MISC)$/stripped_$<
# removing -f switch - avoid getting nothing when copying a file to itself
    @+-$(COPY:s/-f//) $@.h $(INCCOM)$/$(@:b).hxx >& $(NULLDEV)
    @+-$(COPY:s/-f//) $(@:d)$/$(@:b).hxx $(INCCOM)$/$(@:b).hxx >& $(NULLDEV)
    +$(TYPE) $(INCCOM)$/$(@:b).hxx >& $(NULLDEV)

$(INCCOM)$/yy%.cxx : %.y
    @echo ------------------------------
    @echo Making: $@
.IF "$(GUI)"=="UNX" || "$(USE_SHELL)" != "4nt"
    +tr -d "\015" < $< > $(MISC)$/stripped_$<
.ELSE
    +cat $< > $(MISC)$/stripped_$<
.ENDIF
    $(BISON) $(YACCFLAGS) $(YACCTARGET) $(MISC)$/stripped_$<
# removing -f switch - avoid getting nothing when copying a file to itself
    @+-$(COPY:s/-f//) $@.h $(INCCOM)$/$(@:b).hxx >& $(NULLDEV)
    @+-$(COPY:s/-f//) $(@:d)$/$(@:b).hxx $(INCCOM)$/$(@:b).hxx >& $(NULLDEV)
    +$(TYPE) $(INCCOM)$/$(@:b).hxx >& $(NULLDEV)
.ENDIF