fpc/utils/h2pas/Makefile.fpc
2001-05-03 21:35:04 +00:00

61 lines
827 B
Makefile

#
# Makefile.fpc for h2pas
#
[target]
programs=h2pas h2paspp
[clean]
units=options lexlib scan yacclib converu
[compiler]
options=-Sg
[install]
fpcpackage=y
[default]
fpcdir=../..
[rules]
# 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 options.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