home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-dist / ptx-0.4-src.tgz / ptx-0.4-src.tar / fsf / ptx / Makefile.in < prev    next >
Makefile  |  1996-09-28  |  6KB  |  207 lines

  1. # Makefile for GNU permuted indexer.
  2. # Copyright (C) 1990, 1991, 1993, 1994 Free Software Foundation, Inc.
  3. # Francois Pinard <pinard@iro.umontreal.ca>, 1990.
  4.  
  5. # This program is free software; you can redistribute it and/or modify
  6. # it under the terms of the GNU General Public License as published by
  7. # the Free Software Foundation; either version 2, or (at your option)
  8. # any later version.
  9.  
  10. # This program 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.  
  15. # You should have received a copy of the GNU General Public License
  16. # along with this program; if not, write to the Free Software
  17. # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  18.  
  19. PRODUCT = @PRODUCT@
  20. VERSION = @VERSION@
  21. PROGRAMS = @PROGRAMS@
  22.  
  23. SHELL = /bin/sh
  24. srcdir = @srcdir@
  25. VPATH = @srcdir@
  26.  
  27. AR = ar
  28. CC = @CC@
  29. CFLAGS = @CFLAGS@
  30. CPPFLAGS = @CPPFLAGS@
  31. DEFS = @DEFS@
  32. INSTALL = @INSTALL@
  33. INSTALL_DATA = @INSTALL_DATA@
  34. INSTALL_PROGRAM = @INSTALL_PROGRAM@
  35. LDFLAGS = @LDFLAGS@
  36. LIBS = @LIBS@
  37. MAKEINFO = makeinfo
  38. RANLIB = @RANLIB@
  39. TEXI2DVI = texi2dvi
  40.  
  41. prefix = @prefix@
  42. exec_prefix = @exec_prefix@
  43. transform = @program_transform_name@
  44. bindir = $(exec_prefix)/bin
  45. datadir = $(prefix)/share
  46. infodir = $(prefix)/info
  47.  
  48. COMPILE = $(CC) -c -DDEFAULT_IGNORE_FILE=\"$(datadir)/eign\" \
  49. $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
  50.  
  51. LINK = $(CC) $(LDFLAGS) -o $@
  52.  
  53. .SUFFIXES:
  54. .SUFFIXES: .c .o
  55. .c.o:
  56.     $(COMPILE) $<
  57.  
  58. ANSI2KNR = @ANSI2KNR@
  59. O = .@U@o
  60.  
  61. .SUFFIXES: ._c ._o
  62. .c._c:
  63.     ./ansi2knr $< > $@
  64. ._c._o:
  65.     @echo $(COMPILE) $<
  66.     @rm -f _$*.c
  67.     @ln $< _$*.c && $(COMPILE) _$*.c && mv _$*.o $@ && rm _$*.c
  68. .c._o:
  69.     ./ansi2knr $< > $*._c
  70.     @echo $(COMPILE) $*._c
  71.     @rm -f _$*.c
  72.     @ln $*._c _$*.c && $(COMPILE) _$*.c && mv _$*.o $@ && rm _$*.c
  73.  
  74. INCLUDES = -I. -I$(srcdir)
  75.  
  76. HEADERS = bumpalloc.h diacrit.h
  77. SOURCES = ptx.c diacrit.c
  78. OBJECTS = ptx$O diacrit$O
  79. LIBHDRS = getopt.h regex.h
  80. LIBSRCS = regex.c argmatch.c error.c xmalloc.c getopt.c getopt1.c alloca.c
  81. LIBOBJS = regex.o argmatch.o error.o xmalloc.o getopt.o getopt1.o @ALLOCA@
  82.  
  83. DISTFILES = README NEWS TODO THANKS COPYING INSTALL ChangeLog \
  84. configure.in aclocal.m4 acconfig.h mkinstalldirs install-sh Makefile.in \
  85. ptx.texinfo texinfo.tex eign ansi2knr.c ansi2knr.1 c-boxes.el \
  86. $(HEADERS) $(SOURCES) $(LIBHDRS) $(LIBSRCS) check-out \
  87. stamp-h.in config.h.in configure stamp-vti version.texi ptx.info TAGS BACKLOG
  88.  
  89. all: ptx.info ptx
  90.  
  91. info: ptx.info
  92.  
  93. ptx.info: ptx.texinfo version.texi
  94.     cd $(srcdir) && $(MAKEINFO) --no-split ptx.texinfo
  95.  
  96. dvi: ptx.dvi
  97.  
  98. ptx.dvi: ptx.texinfo
  99.     $(TEXI2DVI) $(srcdir)/ptx.texinfo
  100.  
  101. version.texi: stamp-vti
  102. stamp-vti: ptx.texinfo configure.in
  103.     echo "@set EDITION $(VERSION)" > version.tmp
  104.     echo "@set UPDATED `date '+%B %Y'`" >> version.tmp
  105.     echo "@set VERSION $(VERSION)" >> version.tmp
  106.     if cmp -s version.tmp $(srcdir)/version.texi; then rm version.tmp; \
  107.     else mv version.tmp $(srcdir)/version.texi; fi
  108.     date > $(srcdir)/stamp-vti
  109.  
  110. ptx: $(OBJECTS) libptx.a
  111.     $(LINK) $(OBJECTS) libptx.a $(LIBS)
  112.  
  113. $(OBJECTS): $(ANSI2KNR) config.h
  114. ptx$O: bumpalloc.h diacrit.h getopt.h regex.h
  115. diacrit$O: diacrit.h
  116.  
  117. ansi2knr: ansi2knr.o
  118.     $(LINK) ansi2knr.o $(LIBS)
  119.  
  120. libptx.a: $(LIBOBJS)
  121.     rm -f libptx.a
  122.     $(AR) cru libptx.a $(LIBOBJS)
  123.     $(RANLIB) libptx.a
  124.  
  125. $(LIBOBJS): config.h
  126. getopt.o getopt1.o: getopt.h
  127. regex.o: regex.h
  128.  
  129. CHECK_OPTIONS = -i /dev/null -AfW i.i
  130.  
  131. check: ptx
  132.     ./ptx $(CHECK_OPTIONS) < $(srcdir)/COPYING > check-out.tmp
  133.     cmp $(srcdir)/check-out check-out.tmp
  134.     rm check-out.tmp
  135.     @echo Check successful
  136.  
  137. make-check-out: ptx
  138.     ./ptx $(CHECK_OPTIONS) < $(srcdir)/COPYING > check-out.tmp
  139.     mv check-out.tmp $(srcdir)/check-out
  140.  
  141. install: all
  142.     $(srcdir)/mkinstalldirs $(bindir) $(datadir) $(infodir)
  143.     $(INSTALL_PROGRAM) ptx $(bindir)/`echo ptx | sed '$(transform)'`
  144.     $(INSTALL_DATA) $(srcdir)/eign $(datadir)/eign
  145.     $(INSTALL_DATA) $(srcdir)/ptx.info $(infodir)/ptx.info
  146.  
  147. uninstall:
  148.     rm -f $(bindir)/`echo ptx | sed '$(transform)'`
  149.     rm -f $(datadir)/eign
  150.     rm -f $(infodir)/ptx.info
  151.  
  152. tags: TAGS
  153.  
  154. TAGS: $(HEADERS) $(SOURCES) $(LIBHDRS) $(LIBSRCS)
  155.     cd $(srcdir) && etags $(HEADERS) $(SOURCES) $(LIBHDRS) $(LIBSRCS)
  156.  
  157. mostlyclean:
  158.     rm -f *.aux *.cp *.cps *.dvi *.fn *.fns *.ky *.log *.pg *.toc *.tp *.vr
  159.     rm -f *.a *.o *._c *._o core core.*
  160.     rm -f *.tmp
  161.  
  162. clean: mostlyclean
  163.     rm -f ptx
  164.  
  165. distclean: clean
  166.     rm -f ansi2knr
  167.     rm -f Makefile config.cache config.h config.log stamp-h config.status
  168.  
  169. realclean: distclean
  170.     rm -f stamp-vti version.texi ptx.info
  171.     rm -f TAGS
  172.  
  173. dist: $(DISTFILES)
  174.     rm -rf $(PRODUCT)-$(VERSION)
  175.     mkdir $(PRODUCT)-$(VERSION)
  176.     chmod 777 $(PRODUCT)-$(VERSION)
  177.     @echo "Copying distribution files"
  178.     @for file in $(DISTFILES); do \
  179.       ln $(srcdir)/$$file $(PRODUCT)-$(VERSION) 2> /dev/null \
  180.         || cp -p $(srcdir)/$$file $(PRODUCT)-$(VERSION); \
  181.     done
  182.     chmod -R a+r $(PRODUCT)-$(VERSION)
  183.     tar chozf $(PRODUCT)-$(VERSION).tar.gz $(PRODUCT)-$(VERSION)
  184.     rm -rf $(PRODUCT)-$(VERSION)
  185.  
  186. # For an explanation of the following Makefile rules, see node
  187. # `Automatic Remaking' in GNU Autoconf documentation.
  188. Makefile: Makefile.in config.status
  189.     CONFIG_FILES=$@ CONFIG_HEADERS= ./config.status
  190. config.status: configure
  191.     ./config.status --recheck
  192. configure: configure.in aclocal.m4
  193.     cd $(srcdir) && autoconf
  194.  
  195. config.h: stamp-h
  196. stamp-h: config.h.in config.status
  197.     CONFIG_FILES= CONFIG_HEADERS=config.h ./config.status
  198.     date > stamp-h
  199. config.h.in: stamp-h.in
  200. stamp-h.in: configure.in aclocal.m4 acconfig.h
  201.     cd $(srcdir) && autoheader
  202.     date > $(srcdir)/stamp-h.in
  203.  
  204. # Tell versions [3.59,3.63) of GNU make not to export all variables.
  205. # Otherwise a system limit (for SysV at least) may be exceeded.
  206. .NOEXPORT:
  207.