home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 6 / FreshFish_September1994.bin / bbs / gnu / gawk-2.15.5-src.lha / GNU / src / amiga / gawk-2.15.5 / Makefile.in < prev    next >
Encoding:
Makefile  |  1994-06-13  |  6.6 KB  |  243 lines

  1. # Makefile for GNU Awk.
  2. #
  3. # Copyright (C) 1986, 1988-1993 the Free Software Foundation, Inc.
  4. # This file is part of GAWK, the GNU implementation of the
  5. # AWK Progamming Language.
  6. # GAWK is free software; you can redistribute it and/or modify
  7. # it under the terms of the GNU General Public License as published by
  8. # the Free Software Foundation; either version 2 of the License, or
  9. # (at your option) any later version.
  10. # GAWK is distributed in the hope that it will be useful,
  11. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13. # GNU General Public License for more details.
  14. # You should have received a copy of the GNU General Public License
  15. # along with GAWK; see the file COPYING.  If not, write to
  16. # the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  17.  
  18. #### Start of system configuration section. ####
  19.  
  20. VPATH = @srcdir@
  21. srcdir = @srcdir@
  22.  
  23. # Common prefix for machine-independent installed files.
  24. prefix = /gnu
  25. # Common prefix for machine-dependent installed files.
  26. exec_prefix = $(prefix)
  27.  
  28. # Directory to install executables in.
  29. bindir = $(exec_prefix)/bin
  30. # Directory to install libraries in.
  31. libdir = $(exec_prefix)/lib
  32. # Directory to install the Info files in.
  33. infodir = $(prefix)/info
  34. # Directory to install the man page in.
  35. mandir = $(prefix)/man/man$(manext)
  36. # Number to put on the man page filename.
  37. manext = 1
  38.  
  39. # Program to install executables.
  40. INSTALL_PROGRAM = @INSTALL_PROGRAM@
  41. # Program to install data like man pages.
  42. INSTALL_DATA = @INSTALL_DATA@
  43. # Generic install program.
  44. INSTALL = @INSTALL@
  45.  
  46. CC = @CC@
  47. DEFS = @DEFS@
  48. CFLAGS = @CFLAGS@
  49.  
  50. LDFLAGS = @LDFLAGS@
  51. LIBS = @LIBS@
  52.  
  53. YACC = @YACC@
  54.  
  55. #### End of system configuration section. ####
  56.  
  57. # "-I." is needed to find config.h in the build directory.
  58. .c.o:
  59.     $(CC) -c -I. -I$(srcdir) $(DEFS) $(CFLAGS) $< $(OUTPUT_OPTION)
  60.  
  61. # object files
  62. AWKOBJS = main.o eval.o builtin.o msg.o iop.o io.o field.o array.o \
  63.     node.o version.o missing.o re.o getopt.o getopt1.o
  64.  
  65. ALLOBJS = $(AWKOBJS) awktab.o
  66.  
  67. # GNUOBJS
  68. #    GNU stuff that gawk uses as library routines.
  69. GNUOBJS= regex.o dfa.o $(ALLOCA)
  70.  
  71. # source and documentation files
  72. SRC =    main.c eval.c builtin.c msg.c version.c \
  73.     iop.c io.c field.c array.c node.c missing.c re.c getopt.c getopt1.c
  74.  
  75. ALLSRC= $(SRC) awktab.c
  76.  
  77. AWKSRC= awk.h awk.y $(ALLSRC) patchlevel.h protos.h config.in getopt.h
  78.  
  79. GNUSRC = alloca.c alloca.s dfa.c dfa.h regex.c regex.h
  80.  
  81. COPIES = missing/system.c missing/tzset.c \
  82.     missing/memcmp.c missing/memcpy.c missing/memset.c \
  83.     missing/random.c missing/strncasecmp.c missing/strchr.c \
  84.     missing/strerror.c missing/strtod.c \
  85.     missing/strftime.c missing/strftime.3 
  86.  
  87. SUPPORT = support/texindex.c support/texinfo.tex
  88.  
  89. DOCS= gawk.1 gawk.texi
  90.  
  91. TEXFILES= gawk.aux gawk.cp gawk.cps gawk.fn gawk.fns gawk.ky gawk.kys \
  92.        gawk.pg gawk.pgs gawk.toc gawk.tp gawk.tps gawk.vr gawk.vrs
  93.  
  94. MISC =    NEWS COPYING FUTURES Makefile.* PROBLEMS README* PORTS POSIX \
  95.     mungeconf configure ACKNOWLEDGMENT LIMITATIONS INSTALL
  96.  
  97. OTHERS= pc/* atari/* vms/*
  98.  
  99. ALLDOC= gawk.dvi $(TEXFILES) gawk.info*
  100.  
  101. # Release of gawk.  There can be no leading or trailing white space here!
  102. REL=2.15
  103.  
  104. all:    gawk
  105.  
  106. # rules to build gawk
  107. gawk:    $(ALLOBJS) $(GNUOBJS) $(REOBJS)
  108.     $(CC) -o gawk $(LDFLAGS) $(ALLOBJS) $(GNUOBJS) $(REOBJS) -lm $(LIBS)
  109.  
  110. $(AWKOBJS) regex.o dfa.o:    awk.h dfa.h regex.h
  111.  
  112. getopt.o:    getopt.h
  113.  
  114. getopt1.o:    getopt.h
  115.  
  116. main.o:    patchlevel.h
  117.  
  118. awktab.c:    awk.y
  119.     @echo "expect 40 shift/reduce conflicts"
  120.     $(YACC) -v $(srcdir)/awk.y
  121.     @sed '/extern char.*malloc/d' <y.tab.c >awktab.c
  122.     @rm y.tab.c
  123.  
  124. awktab.o:    awk.h
  125.  
  126. # On AmigaDOS, there is no "native awk", so install gawk as both
  127. # /bin/gawk and /bin/awk.
  128.  
  129. install:    gawk gawk.info
  130.     $(INSTALL_PROGRAM) gawk $(bindir)/awk
  131.     $(INSTALL_PROGRAM) gawk $(bindir)/gawk
  132.     $(INSTALL_DATA) $(srcdir)/gawk.1 $(mandir)/gawk$(manext)
  133.     cd $(srcdir); for f in gawk.info*; \
  134.     do $(INSTALL_DATA) $$f $(infodir)/$$f; done
  135.  
  136. uninstall:
  137.     rm -f $(bindir)/gawk $(mandir)/gawk$(manext) $(infodir)/gawk.info*
  138.  
  139. # ALLOCA: uncomment this if your system (notably System V boxen)
  140. # does not have alloca in /lib/libc.a or /lib/libPW.a
  141. #
  142. # If your machine is not supported by the assembly version of alloca.s,
  143. # use the C version which follows instead.  It uses the default rules to
  144. # make alloca.o.
  145. #
  146. # One of these rules should have already been selected by running configure.
  147.  
  148.  
  149. # auxiliary rules for release maintenance
  150. lint:    $(ALLSRC)
  151.     lint -hcbax $(FLAGS) $(ALLSRC)
  152.  
  153. xref:
  154.     cxref -c $(FLAGS) $(ALLSRC) | grep -v '    /' >xref
  155.  
  156. clean:
  157.     rm -rf gawk *.o core
  158.     cd test && make clean
  159.  
  160. distclean:    clean
  161.     rm -f Makefile *.orig *.rej */*.orig */*.rej awk.output gmon.out \
  162.         make.out y.output config.h
  163.  
  164. mostlyclean:    clean
  165.  
  166. realclean:    distclean
  167.     rm -f awktab.c $(ALLDOC)
  168.  
  169. cleaner:    clean
  170.     rm -f gawk awktab.c Makefile config.h
  171.  
  172. clobber:    clean
  173.     rm -f $(ALLDOC) gawk.log config.h
  174.  
  175. gawk.dvi:    gawk.texi
  176.     cp $(srcdir)/support/texinfo.tex .
  177.     tex $(srcdir)/gawk.texi; texindex gawk.??
  178.     tex $(srcdir)/gawk.texi; texindex gawk.??
  179.     tex $(srcdir)/gawk.texi
  180.     rm -f texinfo.tex
  181.  
  182. gawk.info:    gawk.texi
  183.     makeinfo $(srcdir)/gawk.texi
  184.  
  185. dist:    $(AWKSRC) $(GNUSRC) $(DOCS) $(MISC) $(COPIES) $(SUPPORT) distclean
  186.     -rm -rf gawk-$(REL)*
  187.     dir=gawk-$(REL).`gawk '{print $$3}' patchlevel.h` && \
  188.     mkdir $$dir && \
  189.     cp -p $(AWKSRC) $(GNUSRC) $(DOCS) $(MISC) $$dir && \
  190.     mkdir $$dir/missing && cp -p $(COPIES) $$dir/missing && \
  191.     mkdir $$dir/atari && cp -p  atari/* $$dir/atari && \
  192.     mkdir $$dir/pc && cp -p pc/* $$dir/pc && \
  193.     mkdir $$dir/vms && cp -p vms/* $$dir/vms && \
  194.     mkdir $$dir/config && cp -p config/* $$dir/config && \
  195.     mkdir $$dir/support && cp -p support/* $$dir/support && \
  196.     cp -pr test $$dir && \
  197.     chmod -R a+r $$dir && \
  198.     chmod -R a-w $$dir && \
  199.     find $$dir -type d -exec chmod 755 {} ';' && \
  200.     find $$dir -print | doschk && \
  201.     tar -cf - $$dir | gzip > $$dir.tar.gz && \
  202.     rm -fr $$dir
  203.  
  204. gawk-doc-$(REL).tar.gz:    gawk.info gawk.dvi gawk.1
  205.     -rm -rf gawk-doc-$(REL) gawk-doc-$(REL).tar.gz
  206.     -mkdir gawk-doc-$(REL)
  207.     cp -p $(ALLDOC) gawk-doc-$(REL)
  208.     groff -Tascii -man gawk.1 > gawk-doc-$(REL)/gawk.1.pr
  209.     tar -cf - gawk-doc-$(REL) | gzip > gawk-doc-$(REL).tar.gz
  210.  
  211. gawk-ps-$(REL).tar.gz:    gawk.dvi gawk.1
  212.     -rm -rf gawk-ps-$(REL) gawk-ps-$(REL).tar.gz
  213.     -mkdir gawk-ps-$(REL)
  214.     dvips -o gawk-ps-$(REL)/gawk.postscript gawk.dvi
  215.     groff -man gawk.1 > gawk-ps-$(REL)/gawk.1.ps
  216.     tar -cf - gawk-ps-$(REL) | gzip > gawk-ps-$(REL).tar.gz
  217.  
  218. release:    dist gawk-doc-$(REL).tar.gz gawk-ps-$(REL).tar.gz
  219.  
  220. test:    gawk
  221.     cd test; make -k
  222.  
  223. check:    test
  224.  
  225. Makefile:    config.status $(srcdir)/Makefile.in
  226.         $(SHELL) config.status
  227.  
  228. config.h:    stamp-config ;
  229.  
  230. stamp-config:    config.status $(srcdir)/config.h.in
  231.         $(SHELL) config.status
  232.         touch stamp-config
  233.  
  234. configure:    configure.in
  235.         autoconf $(ACFLAGS)
  236.  
  237. config.h.in:    configure.in
  238.         autoheader $(ACFLAGS)
  239.