fpc/utils/h2pas/Makefile.fpc
1999-11-25 00:01:05 +00:00

56 lines
749 B
Makefile

#
# Makefile.fpc for h2pas
#
[targets]
programs=h2pas
[clean]
units=options lexlib scan yacclib converu
[dirs]
fpcdir=../..
[defaults]
defaultoptions=-Sg
[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$(PASEXT)
#
# Lex and Yacc (only if pyacc is found)
#
ifdef PYACC
h2pas$(PASEXT): h2pas.y
$(PYACC) h2pas.y
yacclex: yacc lex
yacc:
$(PYACC) h2pas.y
lex :
$(PLEX) scan.l
endif