2016-02-29 19:40:54 +00:00
|
|
|
# $Id: makefile.in,v 1.24 2015/07/05 22:12:29 tom Exp $
|
2012-05-03 09:57:52 +00:00
|
|
|
#
|
|
|
|
# UNIX template-makefile for Berkeley Yacc
|
|
|
|
|
|
|
|
THIS = yacc
|
|
|
|
|
|
|
|
#### Start of system configuration section. ####
|
|
|
|
|
|
|
|
srcdir = @srcdir@
|
|
|
|
VPATH = @srcdir@
|
|
|
|
|
|
|
|
CC = @CC@
|
|
|
|
|
|
|
|
INSTALL = @INSTALL@
|
|
|
|
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
|
|
|
INSTALL_DATA = @INSTALL_DATA@
|
|
|
|
transform = @program_transform_name@
|
|
|
|
|
|
|
|
DEFINES =
|
|
|
|
EXTRA_CFLAGS = @EXTRA_CFLAGS@
|
|
|
|
CPPFLAGS = -I. -I$(srcdir) $(DEFINES) -DHAVE_CONFIG_H -DYYPATCH=`cat $(srcdir)/VERSION` @CPPFLAGS@
|
|
|
|
CFLAGS = @CFLAGS@ $(CPPFLAGS) $(EXTRA_CFLAGS)
|
|
|
|
|
|
|
|
LDFLAGS = @LDFLAGS@
|
|
|
|
LIBS = @LIBS@
|
|
|
|
|
2014-04-22 22:11:22 +00:00
|
|
|
AWK = @AWK@
|
2012-05-03 09:57:52 +00:00
|
|
|
CTAGS = @CTAGS@
|
|
|
|
ETAGS = @ETAGS@
|
|
|
|
LINT = @LINT@
|
2014-04-22 22:11:22 +00:00
|
|
|
LINTFLAGS = @LINT_OPTS@
|
2012-05-03 09:57:52 +00:00
|
|
|
|
|
|
|
prefix = @prefix@
|
|
|
|
exec_prefix = @exec_prefix@
|
|
|
|
|
2013-05-30 13:10:38 +00:00
|
|
|
datarootdir = @datarootdir@
|
2012-05-03 09:57:52 +00:00
|
|
|
bindir = $(DESTDIR)@bindir@
|
|
|
|
mandir = $(DESTDIR)@mandir@/man1
|
|
|
|
manext = 1
|
|
|
|
|
|
|
|
testdir = $(srcdir)/test
|
|
|
|
|
2014-04-22 22:11:22 +00:00
|
|
|
SKELETON = @SKELETON@
|
2012-05-03 09:57:52 +00:00
|
|
|
x = @EXEEXT@
|
|
|
|
o = .@OBJEXT@
|
|
|
|
|
|
|
|
#### End of system configuration section. ####
|
|
|
|
|
|
|
|
SHELL = /bin/sh
|
|
|
|
@SET_MAKE@
|
|
|
|
|
|
|
|
H_FILES = \
|
|
|
|
defs.h
|
|
|
|
|
|
|
|
C_FILES = \
|
|
|
|
closure.c \
|
|
|
|
error.c \
|
|
|
|
graph.c \
|
|
|
|
lalr.c \
|
|
|
|
lr0.c \
|
|
|
|
main.c \
|
|
|
|
mkpar.c \
|
2014-04-22 22:11:22 +00:00
|
|
|
mstring.c \
|
2012-05-03 09:57:52 +00:00
|
|
|
output.c \
|
|
|
|
reader.c \
|
2014-04-22 22:11:22 +00:00
|
|
|
$(SKELETON).c \
|
2012-05-03 09:57:52 +00:00
|
|
|
symtab.c \
|
|
|
|
verbose.c \
|
|
|
|
warshall.c
|
|
|
|
|
|
|
|
OBJS = \
|
|
|
|
closure$o \
|
|
|
|
error$o \
|
|
|
|
graph$o \
|
|
|
|
lalr$o \
|
|
|
|
lr0$o \
|
|
|
|
main$o \
|
|
|
|
mkpar$o \
|
2014-04-22 22:11:22 +00:00
|
|
|
mstring$o \
|
2012-05-03 09:57:52 +00:00
|
|
|
output$o \
|
|
|
|
reader$o \
|
2014-04-22 22:11:22 +00:00
|
|
|
$(SKELETON)$o \
|
2012-05-03 09:57:52 +00:00
|
|
|
symtab$o \
|
|
|
|
verbose$o \
|
|
|
|
warshall$o
|
|
|
|
|
2014-04-22 22:11:22 +00:00
|
|
|
YACCPAR = \
|
|
|
|
btyaccpar.c \
|
|
|
|
yaccpar.c
|
|
|
|
|
2012-05-03 09:57:52 +00:00
|
|
|
TRANSFORM_BIN = sed 's/$x$$//' |sed '$(transform)'|sed 's/$$/$x/'
|
|
|
|
TRANSFORM_MAN = sed 's/$(manext)$$//'|sed '$(transform)'|sed 's/$$/$(manext)/'
|
|
|
|
|
|
|
|
actual_bin = `echo $(THIS)$x | $(TRANSFORM_BIN)`
|
|
|
|
actual_man = `echo $(THIS).$(manext)| $(TRANSFORM_MAN)`
|
|
|
|
|
|
|
|
all : $(THIS)$x
|
|
|
|
|
|
|
|
install: all installdirs
|
|
|
|
$(INSTALL_PROGRAM) $(THIS)$x $(bindir)/$(actual_bin)
|
|
|
|
- $(INSTALL_DATA) $(srcdir)/$(THIS).1 $(mandir)/$(actual_man)
|
|
|
|
|
|
|
|
installdirs:
|
|
|
|
mkdir -p $(bindir)
|
|
|
|
- mkdir -p $(mandir)
|
|
|
|
|
|
|
|
uninstall:
|
|
|
|
- rm -f $(bindir)/$(actual_bin)
|
|
|
|
- rm -f $(mandir)/$(actual_man)
|
|
|
|
|
|
|
|
################################################################################
|
2014-04-22 22:11:22 +00:00
|
|
|
.SUFFIXES : .c $o .i .skel
|
2012-05-03 09:57:52 +00:00
|
|
|
|
|
|
|
.c$o:
|
|
|
|
@RULE_CC@
|
|
|
|
@ECHO_CC@$(CC) -c $(CFLAGS) $<
|
|
|
|
|
|
|
|
.c.i :
|
|
|
|
@RULE_CC@
|
|
|
|
@ECHO_CC@$(CPP) -C $(CPPFLAGS) $*.c >$@
|
|
|
|
|
2014-04-22 22:11:22 +00:00
|
|
|
.skel.c :
|
|
|
|
$(AWK) -f $(srcdir)/skel2c $*.skel > $@
|
|
|
|
|
2012-05-03 09:57:52 +00:00
|
|
|
################################################################################
|
|
|
|
|
|
|
|
$(THIS)$x : $(OBJS)
|
|
|
|
@ECHO_LD@$(CC) $(LDFLAGS) $(CFLAGS) -o $@ $(OBJS) $(LIBS)
|
|
|
|
|
|
|
|
mostlyclean :
|
|
|
|
- rm -f core .nfs* *$o *.bak *.BAK *.out
|
|
|
|
|
2014-01-08 08:02:27 +00:00
|
|
|
clean :: mostlyclean
|
2012-05-03 09:57:52 +00:00
|
|
|
- rm -f $(THIS)$x
|
|
|
|
|
2014-01-08 08:02:27 +00:00
|
|
|
distclean :: clean
|
2016-02-29 19:40:54 +00:00
|
|
|
- rm -f config.log config.cache config.status config.h makefile man2html.tmp
|
2014-04-22 22:11:22 +00:00
|
|
|
- rm -f $(testdir)/yacc/test-* $(testdir)/btyacc/test-*
|
2012-05-03 09:57:52 +00:00
|
|
|
|
2014-01-08 08:02:27 +00:00
|
|
|
realclean :: distclean
|
2012-05-03 09:57:52 +00:00
|
|
|
- rm -f tags TAGS
|
|
|
|
|
2014-04-22 22:11:22 +00:00
|
|
|
sources : $(YACCPAR)
|
|
|
|
|
|
|
|
maintainer-clean :: realclean
|
|
|
|
rm -f $(YACCPAR)
|
|
|
|
|
2012-05-03 09:57:52 +00:00
|
|
|
################################################################################
|
|
|
|
check: $(THIS)$x
|
|
|
|
$(SHELL) $(testdir)/run_test.sh $(testdir)
|
|
|
|
|
|
|
|
check_make: $(THIS)$x
|
|
|
|
$(SHELL) $(testdir)/run_make.sh $(testdir)
|
|
|
|
|
|
|
|
check_lint:
|
|
|
|
$(SHELL) $(testdir)/run_lint.sh $(testdir)
|
|
|
|
################################################################################
|
|
|
|
tags: $(H_FILES) $(C_FILES)
|
|
|
|
$(CTAGS) $(C_FILES) $(H_FILES)
|
|
|
|
|
|
|
|
lint: $(C_FILES)
|
2014-04-22 22:11:22 +00:00
|
|
|
$(LINT) $(LINTFLAGS) $(CPPFLAGS) $(C_FILES)
|
2012-05-03 09:57:52 +00:00
|
|
|
|
|
|
|
@MAKE_UPPER_TAGS@TAGS: $(H_FILES) $(C_FILES)
|
|
|
|
@MAKE_UPPER_TAGS@ $(ETAGS) $(C_FILES) $(H_FILES)
|
|
|
|
|
|
|
|
depend:
|
|
|
|
makedepend -- $(CPPFLAGS) -- $(C_FILES)
|
|
|
|
|
2014-04-22 22:11:22 +00:00
|
|
|
$(OBJS) : defs.h makefile
|
2012-05-03 09:57:52 +00:00
|
|
|
|
|
|
|
main$o \
|
2014-04-22 22:11:22 +00:00
|
|
|
$(SKELETON)$o : VERSION
|
2012-05-03 09:57:52 +00:00
|
|
|
|
|
|
|
# DO NOT DELETE THIS LINE -- make depend depends on it.
|