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

  1. # Makefile for GNU wdiff.
  2. # Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc.
  3. # Francois Pinard <pinard@iro.umontreal.ca>, 1992.
  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. infodir = $(prefix)/info
  46. guidedir = $(prefix)/guide
  47. mandir = $(prefix)/man/man1
  48. manext = .1
  49.  
  50. COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
  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 --varargs $< > $@
  64. ._c._o:
  65.     @echo $(COMPILE) $<
  66.     @rm -f _$*.c
  67.     @ln $< _$*.c && $(COMPILE) _$*.c && mv _$*.o $@ && rm _$*.c
  68. .c._o:
  69.     ./ansi2knr --varargs $< > $*._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 =
  77. SOURCES = wdiff.c readpipe.c writepipe.c
  78. OBJECTS = wdiff$O readpipe$O writepipe$O
  79. LIBHDRS = getopt.h pathmax.h
  80. LIBSRCS = error.c getopt.c getopt1.c alloca.c strstr.c xmalloc.c
  81. LIBOBJS = error.o getopt.o getopt1.o @ALLOCA@ @LIBOBJS@
  82.  
  83. DISTFILES = README NEWS TODO THANKS COPYING INSTALL ChangeLog \
  84. configure.in aclocal.m4 acconfig.h mkinstalldirs install-sh Makefile.in \
  85. wdiff.texi texinfo.tex wdiff.1 ansi2knr.c ansi2knr.1 c-boxes.el \
  86. $(HEADERS) $(SOURCES) $(LIBHDRS) $(LIBSRCS) cbars.sh check_it \
  87. stamp-h.in config.h.in configure stamp-vti version.texi wdiff.info TAGS BACKLOG
  88.  
  89. all: wdiff.info wdiff.guide $(PROGRAMS)
  90.  
  91. info: wdiff.info
  92.  
  93. wdiff.info: wdiff.texi version.texi
  94.     $(MAKEINFO) --no-split -I$(srcdir) $(srcdir)/wdiff.texi -o $@
  95.  
  96. guide: wdiff.guide
  97.  
  98. wdiff.guide: wdiff.texi version.texi
  99.     $(MAKEINFO) --amiga-39 --no-split -I$(srcdir) $(srcdir)/wdiff.texi -o wdiff.guide
  100.  
  101. dvi: wdiff.dvi
  102.  
  103. wdiff.dvi: wdiff.texi
  104.     $(TEXI2DVI) $(srcdir)/wdiff.texi
  105.  
  106. version.texi: stamp-vti
  107. stamp-vti: wdiff.texi configure.in
  108.     echo "@set EDITION $(VERSION)" > version.tmp
  109.     echo "@set UPDATED `date '+%B %Y'`" >> version.tmp
  110.     echo "@set VERSION $(VERSION)" >> version.tmp
  111.     if cmp -s version.tmp $(srcdir)/version.texi; then rm version.tmp; \
  112.     else mv version.tmp $(srcdir)/version.texi; fi
  113.     date > $(srcdir)/stamp-vti
  114.  
  115. wdiff: $(OBJECTS) libwd.a
  116.     $(LINK) $(OBJECTS) libwd.a $(LIBS)
  117.  
  118. cbars: cbars.sh
  119.     # Amiga hack - avoid autoconf substitution of @bindir@
  120.     sed -e 's|@bin.*dir@|$(bindir)|' cbars.sh > cbars
  121.     
  122. $(OBJECTS): $(ANSI2KNR) config.h
  123. wdiff$O: getopt.h pathmax.h
  124.  
  125. ansi2knr: ansi2knr.o
  126.     $(LINK) ansi2knr.o $(LIBS)
  127.  
  128. libwd.a: $(LIBOBJS)
  129.     rm -f libwd.a
  130.     $(AR) cru libwd.a $(LIBOBJS)
  131.     $(RANLIB) libwd.a
  132.  
  133. $(LIBOBJS): config.h
  134. getopt.o getopt1.o: getopt.h
  135.  
  136. check: wdiff
  137.     $(srcdir)/check_it
  138.  
  139. install: all
  140.     $(srcdir)/mkinstalldirs $(bindir) $(infodir) $(guidedir)
  141.     for name in $(PROGRAMS); do \
  142.       $(INSTALL_PROGRAM) $$name \
  143.         $(bindir)/`echo $$name | sed '$(transform)'`; \
  144.     done
  145.     $(INSTALL_DATA) wdiff.info $(infodir)/wdiff.info
  146.     $(INSTALL_DATA) wdiff.guide $(guidedir)/wdiff.guide
  147.  
  148. uninstall:
  149.     for name in $(PROGRAMS); do
  150.       rm -f $(bindir)/`echo $$name | sed '$(transform)'`; \
  151.     done
  152.     rm -f $(infodir)/wdiff.info $(guidedir)/wdiff.guide
  153.  
  154. # man page installation is kept separate from install.  Better think
  155. # GNU and switch to Info.  The following is for irreductible fellows.
  156.  
  157. install-man:
  158.     $(srcdir)/mkinstalldirs $(mandir)
  159.     $(INSTALL_DATA) $(srcdir)/wdiff.1 \
  160.         $(mandir)/`echo wdiff | sed '$(transform)'`$(manext)
  161.  
  162. uninstall-man:
  163.     rm -f $(mandir)/`echo wdiff | sed '$(transform)'`$(manext); \
  164.  
  165. tags: TAGS
  166.  
  167. TAGS: $(HEADERS) $(SOURCES) $(LIBHDRS) $(LIBSRCS)
  168.     cd $(srcdir) && etags $(HEADERS) $(SOURCES) $(LIBHDRS) $(LIBSRCS)
  169.  
  170. mostlyclean:
  171.     rm -f *.aux *.cp *.cps *.dvi *.fn *.fns *.ky *.log *.pg *.toc *.tp *.vr
  172.     rm -f *.a *.o *._c *._o core core.*
  173.     rm -f test.out
  174.  
  175. clean: mostlyclean
  176.     rm -f cbars wdiff
  177.  
  178. distclean: clean
  179.     rm -f ansi2knr
  180.     rm -f Makefile config.cache config.h config.log stamp-h config.status
  181.  
  182. realclean: distclean
  183.     rm -f stamp-vti version.texi wdiff.info
  184.     rm -f TAGS
  185.  
  186. dist: $(DISTFILES)
  187.     rm -rf $(PRODUCT)-$(VERSION)
  188.     mkdir $(PRODUCT)-$(VERSION)
  189.     chmod 777 $(PRODUCT)-$(VERSION)
  190.     @echo "Copying distribution files"
  191.     @for file in $(DISTFILES); do \
  192.       ln $(srcdir)/$$file $(PRODUCT)-$(VERSION) 2> /dev/null \
  193.         || cp -p $(srcdir)/$$file $(PRODUCT)-$(VERSION); \
  194.     done
  195.     chmod -R a+r $(PRODUCT)-$(VERSION)
  196.     tar chozf $(PRODUCT)-$(VERSION).tar.gz $(PRODUCT)-$(VERSION)
  197.     rm -rf $(PRODUCT)-$(VERSION)
  198.  
  199. # For an explanation of the following Makefile rules, see node
  200. # `Automatic Remaking' in GNU Autoconf documentation.
  201. Makefile: Makefile.in config.status
  202.     CONFIG_FILES=$@ CONFIG_HEADERS= ./config.status
  203. config.status: configure
  204.     ./config.status --recheck
  205. configure: configure.in aclocal.m4
  206.     cd $(srcdir) && autoconf
  207.  
  208. config.h: stamp-h
  209. stamp-h: config.h.in config.status
  210.     CONFIG_FILES= CONFIG_HEADERS=config.h ./config.status
  211.     date > stamp-h
  212. config.h.in: stamp-h.in
  213. stamp-h.in: configure.in aclocal.m4 acconfig.h
  214.     cd $(srcdir) && autoheader
  215.     date > $(srcdir)/stamp-h.in
  216.  
  217. # Tell versions [3.59,3.63) of GNU make not to export all variables.
  218. # Otherwise a system limit (for SysV at least) may be exceeded.
  219. .NOEXPORT:
  220.