1 # $Id: makefile.in,v 1.18 2012/09/29 13:10:15 Adrian.Bunk 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 datarootdir = @datarootdir@
35 bindir = $(DESTDIR)@bindir@
36 mandir = $(DESTDIR)@mandir@/man1
39 testdir = $(srcdir)/test
44 #### End of system configuration section. ####
82 TRANSFORM_BIN = sed 's/$x$$//' |sed '$(transform)'|sed 's/$$/$x/'
83 TRANSFORM_MAN = sed 's/$(manext)$$//'|sed '$(transform)'|sed 's/$$/$(manext)/'
85 actual_bin = `echo $(THIS)$x | $(TRANSFORM_BIN)`
86 actual_man = `echo $(THIS).$(manext)| $(TRANSFORM_MAN)`
90 install: all installdirs
91 $(INSTALL_PROGRAM) $(THIS)$x $(bindir)/$(actual_bin)
92 - $(INSTALL_DATA) $(srcdir)/$(THIS).1 $(mandir)/$(actual_man)
99 - rm -f $(bindir)/$(actual_bin)
100 - rm -f $(mandir)/$(actual_man)
102 ################################################################################
103 .SUFFIXES : $o .i .html .$(manext) .cat .ps .pdf .txt
107 @ECHO_CC@$(CC) -c $(CFLAGS) $<
111 @ECHO_CC@$(CPP) -C $(CPPFLAGS) $*.c >$@
114 - nroff -man $(srcdir)/$(THIS).$(manext) >$@
117 GROFF_NO_SGR=stupid $(SHELL) -c "tbl $*.$(manext) | groff -Thtml -man" >$@
120 $(SHELL) -c "tbl $*.$(manext) | groff -man" >$@
123 GROFF_NO_SGR=stupid $(SHELL) -c "tbl $*.$(manext) | nroff -Tascii -man | col -bx" >$@
128 ################################################################################
131 @ECHO_LD@$(CC) $(LDFLAGS) $(CFLAGS) -o $@ $(OBJS) $(LIBS)
134 - rm -f core .nfs* *$o *.bak *.BAK *.out
140 - rm -f config.log config.cache config.status config.h makefile
141 - rm -f *.html *.cat *.pdf *.ps *.txt
142 - cd test && rm -f test-*
147 ################################################################################
148 docs :: $(THIS).html \
152 $(THIS).html : $(THIS).$(manext)
153 $(THIS).pdf : $(THIS).ps
154 $(THIS).ps : $(THIS).$(manext)
155 $(THIS).txt : $(THIS).$(manext)
156 ################################################################################
158 $(SHELL) $(testdir)/run_test.sh $(testdir)
160 check_make: $(THIS)$x
161 $(SHELL) $(testdir)/run_make.sh $(testdir)
164 $(SHELL) $(testdir)/run_lint.sh $(testdir)
165 ################################################################################
166 tags: $(H_FILES) $(C_FILES)
167 $(CTAGS) $(C_FILES) $(H_FILES)
170 $(LINT) $(CPPFLAGS) $(C_FILES)
172 @MAKE_UPPER_TAGS@TAGS: $(H_FILES) $(C_FILES)
173 @MAKE_UPPER_TAGS@ $(ETAGS) $(C_FILES) $(H_FILES)
176 makedepend -- $(CPPFLAGS) -- $(C_FILES)
181 skeleton$o : makefile VERSION
183 # DO NOT DELETE THIS LINE -- make depend depends on it.