home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-dist / indent-1.9.1-base.tgz / indent-1.9.1-base.tar / fsf / indent / makefile.in < prev    next >
Makefile  |  1994-01-29  |  5KB  |  186 lines

  1. # Makefile template for GNU indent
  2. # Copyright (C) 1994, Joseph Arceneaux.  All rights reserved
  3. # Copyright (C) 1992, Free Software Foundation, Inc.
  4. #
  5. # This file is part of GNU indent.
  6. #
  7. # GNU indent is free software; you can redistribute it and/or modify
  8. # it under the terms of the GNU General Public License as published by
  9. # the Free Software Foundation; either version 2, or (at your option)
  10. # any later version.
  11. # GNU indent is distributed in the hope that it will be useful,
  12. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14. # GNU General Public License for more details.
  15. # You should have received a copy of the GNU General Public License
  16. # along with GNU indent; see the file COPYING.  If not, write to
  17. # the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  18.  
  19. #### Start of system configuration section. ####
  20.  
  21. srcdir = @srcdir@
  22. VPATH = @srcdir@
  23.  
  24. CC = @CC@
  25.  
  26. INSTALL = @INSTALL@
  27. INSTALL_PROGRAM = @INSTALL_PROGRAM@
  28. INSTALL_DATA = @INSTALL_DATA@
  29.  
  30. AWK = awk
  31. MAKEINFO = makeinfo
  32.  
  33. # Used in making distributions.  GNU now uses the utility `gzip'
  34. # form compaction.
  35. TAR = tar
  36. ZIP = gzip
  37.  
  38. DVITOGHOSTSCRIPT = dvi2ps indent.dvi > indent.ps
  39. CTAGS = etags
  40.  
  41. CFLAGS = -O
  42. LDFLAGS = -g
  43.  
  44. # C compiler -D options.
  45. DEFS = @DEFS@
  46.  
  47. # Where to install indent and its documentation.
  48. prefix = /usr/local
  49. exec_prefix = ${prefix}
  50. bindir = $(exec_prefix)/bin
  51. infodir = ${prefix}/info
  52.  
  53. #### End of system configuration section. ####
  54.  
  55. SHELL =   /bin/sh
  56. SRC =      indent.c io.c lexi.c parse.c comments.c args.c globs.c \
  57.       backup.c memcpy.c
  58. OBJ =      indent.o io.o lexi.o parse.o comments.o args.o globs.o \
  59.       backup.o @LIBOBJS@
  60. HEADERS = indent.h sys.h version.h backup.h
  61. MAN =      indent.texinfo texinfo.tex
  62. NOTES =   ChangeLog OChangeLog Projects COPYING
  63. VMSFILES= VMS-README gnuc-make.com vaxc-make.com
  64.  
  65. CONFIG = configure.in configure CONF-README
  66.  
  67. MANJUNK = indent.dvi indent.cp indent.cps indent.aux indent.dlog \
  68. indent.fn indent.fns indent.ky indent.kys indent.log indent.pg   \
  69. indent.pgs indent.toc indent.tp indent.tps indent.vr indent.vrs indent.ps 
  70.  
  71. # What to put in a distribution
  72. TARFILES = ${SRC} Makefile makefile.in ${MAN} indent.info ${HEADERS} \
  73. ${NOTES} indent.gperf ${CONFIG} indent.1 ${VMSFILES} NEWS README
  74.  
  75.  
  76. # Make the program and documentation
  77. #
  78. all: indent indent.info
  79.  
  80. indent: ${OBJ}
  81.     ${CC} -o indent ${LDFLAGS} ${OBJ}
  82.  
  83. .c.o:
  84.     ${CC} -c ${DEFS} ${CPPFLAGS} ${CFLAGS} $<
  85.  
  86.  
  87. backup.o: backup.c backup.h sys.h makefile
  88. globs.o: globs.c sys.h makefile
  89.  
  90. indent.o: indent.c indent.h sys.h makefile
  91. args.o: args.c version.h indent.h sys.h makefile
  92. io.o: io.c indent.h sys.h makefile
  93. lexi.o: lexi.c indent.h sys.h makefile
  94. parse.o: parse.c indent.h sys.h makefile
  95. comments.o: comments.c indent.h sys.h makefile
  96. memcpy.o: memcpy.c indent.h sys.h makefile
  97.  
  98.  
  99. # Build tag tables
  100. tags: ${SRC}
  101.     ${CTAGS} -t ${SRC} ${HEADERS}
  102. TAGS: tags
  103.  
  104.  
  105.  
  106. # Documents
  107. #
  108. indent.ps: indent.dvi
  109.     ${DVITOGHOSTSCRIPT}
  110.  
  111. indent.dvi: indent.toc
  112.     tex ${srcdir}/indent.texinfo
  113.  
  114. indent.toc: ${MAN}
  115.     tex ${srcdir}/indent.texinfo
  116.  
  117. indent.info: ${MAN}
  118.     ${MAKEINFO} ${srcdir}/indent.texinfo
  119.  
  120.  
  121.  
  122. # Installation of indent
  123. #
  124. install: all
  125.     ${INSTALL_PROGRAM} indent ${bindir}/indent
  126.     ${INSTALL_DATA} ${srcdir}/indent.info ${infodir}/indent.info
  127.  
  128.  
  129. # Cleaning up
  130. #
  131.  
  132. # Delete all files generated by building indent or making the manual
  133. clean: mostlyclean
  134.     rm -f ${MANJUNK}
  135.  
  136. # Delete all files created by configuring or building indent
  137. distclean: clean
  138.     rm -f makefile indent-*.tar* config.status
  139.     rm -rf indent-*
  140.  
  141. # Clean up the .o files, leaving the man stuff
  142. mostlyclean:
  143.     rm -f ${OBJ} indent
  144.  
  145. # Clean up tar files, indent-generated backup files, and indent
  146. # subdirectories
  147. realclean: distclean
  148.     rm -f indent.info TAGS core
  149.  
  150.  
  151.  
  152. # Create a distribution file
  153. #
  154. DISTDIR = indent-${VERSION}
  155. TARFILE = indent-${VERSION}.tar
  156. DISTFILE = ${TARFILE}.gz
  157. AWKVERSION = ${AWK} '/define VERSION_STRING/ {printf "%s", \
  158.                      substr($$NF, 1, length($$NF) - 1)}' version.h
  159.  
  160.  
  161. dist: ${TARFILES}
  162.     @export VERSION ; VERSION=`${AWKVERSION}` ; \
  163.     ${MAKE} tarfile
  164. #    @unset VERSION
  165.  
  166. tar: dist
  167.  
  168. # NOTE: GNU tar has a compress option, -z, which used to be used below.
  169. # However, GNU is now using `gzip' as it's compaction utility, and this
  170. # function has not yet been integrated into GNU `tar'.
  171. #    tar -c -h -f ${TARFILE} ${DISTDIR}
  172. #    compress ${TARFILE}
  173. tarfile:
  174.     @echo Making compressed tar file, indent ${VERSION}
  175.     @echo
  176.     @rm -rf ${DISTDIR}
  177.     @rm -f ${DISTFILE}
  178.     @mkdir ${DISTDIR}
  179.     @cd ${DISTDIR} ; for i in ${TARFILES}  ; do ln -s ../$$i . ; done
  180.     @${TAR} -c -v -h -f ${TARFILE} ${DISTDIR}
  181.     ${ZIP} --verbose --best ${TARFILE}
  182.     @rm -rf ${DISTDIR}
  183.  
  184.