1 # $Id: makefile.in,v 1.17 2012/01/15 19:11:21 tom Exp $
3 # UNIX template-makefile for Berkeley Yacc
7 #### Start of system configuration section. ####
15 INSTALL_PROGRAM = @INSTALL_PROGRAM@
16 INSTALL_DATA = @INSTALL_DATA@
17 transform = @program_transform_name@
20 EXTRA_CFLAGS = @EXTRA_CFLAGS@
21 CPPFLAGS = -I. -I$(srcdir) $(DEFINES) -DHAVE_CONFIG_H -DYYPATCH=`cat $(srcdir)/VERSION` @CPPFLAGS@
22 CFLAGS = @CFLAGS@ $(CPPFLAGS) $(EXTRA_CFLAGS)
32 exec_prefix = @exec_prefix@
34 bindir = $(DESTDIR)@bindir@
35 mandir = $(DESTDIR)@mandir@/man1
38 testdir = $(srcdir)/test
43 #### End of system configuration section. ####
81 TRANSFORM_BIN = sed 's/$x$$//' |sed '$(transform)'|sed 's/$$/$x/'
82 TRANSFORM_MAN = sed 's/$(manext)$$//'|sed '$(transform)'|sed 's/$$/$(manext)/'
84 actual_bin = `echo $(THIS)$x | $(TRANSFORM_BIN)`
85 actual_man = `echo $(THIS).$(manext)| $(TRANSFORM_MAN)`
89 install: all installdirs
90 $(INSTALL_PROGRAM) $(THIS)$x $(bindir)/$(actual_bin)
91 - $(INSTALL_DATA) $(srcdir)/$(THIS).1 $(mandir)/$(actual_man)
98 - rm -f $(bindir)/$(actual_bin)
99 - rm -f $(mandir)/$(actual_man)
101 ################################################################################
102 .SUFFIXES : $o .i .html .$(manext) .cat .ps .pdf .txt
106 @ECHO_CC@$(CC) -c $(CFLAGS) $<
110 @ECHO_CC@$(CPP) -C $(CPPFLAGS) $*.c >$@
113 - nroff -man $(srcdir)/$(THIS).$(manext) >$@
116 GROFF_NO_SGR=stupid $(SHELL) -c "tbl $*.$(manext) | groff -Thtml -man" >$@
119 $(SHELL) -c "tbl $*.$(manext) | groff -man" >$@
122 GROFF_NO_SGR=stupid $(SHELL) -c "tbl $*.$(manext) | nroff -Tascii -man | col -bx" >$@
127 ################################################################################
130 @ECHO_LD@$(CC) $(LDFLAGS) $(CFLAGS) -o $@ $(OBJS) $(LIBS)
133 - rm -f core .nfs* *$o *.bak *.BAK *.out
139 - rm -f config.log config.cache config.status config.h makefile
140 - rm -f *.html *.cat *.pdf *.ps *.txt
141 - cd test && rm -f test-*
146 ################################################################################
147 docs :: $(THIS).html \
151 $(THIS).html : $(THIS).$(manext)
152 $(THIS).pdf : $(THIS).ps
153 $(THIS).ps : $(THIS).$(manext)
154 $(THIS).txt : $(THIS).$(manext)
155 ################################################################################
157 $(SHELL) $(testdir)/run_test.sh $(testdir)
159 check_make: $(THIS)$x
160 $(SHELL) $(testdir)/run_make.sh $(testdir)
163 $(SHELL) $(testdir)/run_lint.sh $(testdir)
164 ################################################################################
165 tags: $(H_FILES) $(C_FILES)
166 $(CTAGS) $(C_FILES) $(H_FILES)
169 $(LINT) $(CPPFLAGS) $(C_FILES)
171 @MAKE_UPPER_TAGS@TAGS: $(H_FILES) $(C_FILES)
172 @MAKE_UPPER_TAGS@ $(ETAGS) $(C_FILES) $(H_FILES)
175 makedepend -- $(CPPFLAGS) -- $(C_FILES)
180 skeleton$o : makefile VERSION
182 # DO NOT DELETE THIS LINE -- make depend depends on it.