blob: d4a850649197ad792f014a4b682fb0faa2171954 (
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
|
#
# Makefile.fpc for h2pas
#
[target]
programs=h2pas h2paspp
[clean]
units=h2poptions h2plexlib scan h2pyacclib converu
[compiler]
options=-Sg
[install]
fpcpackage=y
[default]
fpcdir=../..
[rules]
.NOTPARALLEL:
# do we have pyacc?
ifndef PYACC
PYACC=$(strip $(wildcard $(addsuffix /pyacc$(EXEEXT),$(SEARCHPATH))))
ifeq ($(PYACC),)
PYACC=
else
export PYACC:=$(firstword $(PYACC))
endif
endif
# do we have plex?
ifndef PLEX
PLEX=$(strip $(wildcard $(addsuffix /plex$(EXEEXT),$(SEARCHPATH))))
ifeq ($(PLEX),)
PLEX=
else
export PLEX:=$(firstword $(PLEX))
endif
endif
h2pas$(EXEEXT): h2pas.pas scan.pas h2poptions.pas
#
# Lex and Yacc (only if pyacc is found)
#
ifdef PYACC
h2pas.pas: h2pas.y
$(PYACC) h2pas.y
yacclex: yacc lex
scan.pas: scan.l
$(PLEX) scan.l
yacc:
$(PYACC) h2pas.y
lex :
$(PLEX) scan.l
endif
|