home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 22 gnu / 22-gnu.zip / gnudiff.zip / Makefile.in < prev    next >
Makefile  |  1994-11-14  |  6KB  |  225 lines

  1. # Makefile for GNU DIFF
  2. # Copyright (C) 1988,1989,1991,1992,1993,1994 Free Software Foundation, Inc.
  3. #
  4. # This file is part of GNU DIFF.
  5. #
  6. # GNU DIFF 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, or (at your option)
  9. # any later version.
  10. #
  11. # GNU DIFF 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. #
  16. # You should have received a copy of the GNU General Public License
  17. # along with GNU DIFF; see the file COPYING.  If not, write to
  18. # the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  19.  
  20. #### Start of system configuration section.  ####
  21.  
  22. PACKAGE = diffutils
  23. VERSION = 2.7.1
  24.  
  25. srcdir = @srcdir@
  26. VPATH = @srcdir@
  27.  
  28. CC = @CC@
  29. INSTALL = @INSTALL@
  30. INSTALL_PROGRAM = @INSTALL_PROGRAM@
  31. INSTALL_DATA = @INSTALL_DATA@
  32. MAKEINFO = makeinfo
  33. TEXI2DVI = texi2dvi
  34.  
  35. CPPFLAGS = @CPPFLAGS@
  36. DEFS = @DEFS@
  37. CFLAGS = @CFLAGS@
  38. LDFLAGS = @LDFLAGS@
  39. LIBS = @LIBS@
  40. LIBOBJS = @LIBOBJS@
  41.  
  42. # Some System V machines do not come with libPW.
  43. # If this is true for you, use the GNU alloca.o here.
  44. ALLOCA = @ALLOCA@
  45.  
  46. prefix = @prefix@
  47. exec_prefix = @exec_prefix@
  48. edit_program_name = sed '@program_transform_name@'
  49.  
  50. bindir = $(exec_prefix)/bin
  51.  
  52. infodir = $(prefix)/info
  53.  
  54. DEFAULT_EDITOR_PROGRAM = ed
  55. DIFF_PROGRAM = $(bindir)/`echo diff | $(edit_program_name)`
  56. NULL_DEVICE = /dev/null
  57. PR_PROGRAM = /bin/pr
  58.  
  59. #### End of system configuration section.  ####
  60.  
  61. SHELL = /bin/sh
  62.  
  63. # The source files for all of the programs.
  64. diffutils_srcs = \
  65.     analyze.c cmp.c cmpbuf.c cmpbuf.h context.c \
  66.     diff.c diff.h diff3.c dir.c ed.c ifdef.c io.c \
  67.     memchr.c normal.c quote.c sdiff.c side.c system.h \
  68.     util.c waitpid.c
  69. srcs = $(diffutils_srcs) \
  70.     alloca.c error.c fnmatch.c fnmatch.h \
  71.     getopt.c getopt.h getopt1.c regex.c regex.h xmalloc.c
  72. distfiles = $(srcs) README INSTALL NEWS diagmeet.note Makefile.in \
  73.     stamp-h.in config.hin configure configure.in COPYING ChangeLog \
  74.     diff.texi diff.info texinfo.tex \
  75.     install-sh mkinstalldirs getmsgids messages.po version.c version.texi \
  76.     pc/COPYING pc/INSTALL pc/config.h pc/makefile pc/makefile.sed pc/pc.c \
  77.     pc/djgpp/config.h pc/djgpp/makefile.sed \
  78.     pc/emx/config.h pc/emx/diff.def pc/emx/gnuregex.def pc/emx/makefile.sed
  79.  
  80. PROGRAMS = cmp diff diff3 sdiff
  81.  
  82. all: $(PROGRAMS) info
  83.  
  84. version.c:
  85.     (echo '#include <config.h>' && \
  86.      echo 'char const version_string[] = "GNU $(PACKAGE) $(VERSION)";') >$@
  87.  
  88. version.texi: diff.texi
  89.     (echo '@set VERSION $(VERSION)' && \
  90.      set `sed -n '/^.*\$$Id: diff.texi,v \([^ ]*\) \([^ ]*\).*/{ s//\1 \2/; s|/|-|g; p; q; }' diff.texi` && \
  91.      echo "@set EDITION $$1" && \
  92.      echo "@set UPDATED $$2") >$@
  93.  
  94. COMPILE = $(CC) -c $(CPPFLAGS) $(DEFS) -I. -I$(srcdir) $(CFLAGS)
  95.  
  96. .c.o:
  97.     $(COMPILE) $<
  98.  
  99. common_o = error.o getopt.o getopt1.o version.o xmalloc.o
  100.  
  101. diff_o = diff.o analyze.o cmpbuf.o dir.o io.o util.o \
  102.     context.o ed.o ifdef.o normal.o side.o \
  103.     fnmatch.o regex.o quote.o $(common_o) $(ALLOCA) $(LIBOBJS)
  104. diff: $(diff_o)
  105.     $(CC) -o $@ $(CFLAGS) $(LDFLAGS) $(diff_o) $(LIBS)
  106.  
  107. diff3_o = diff3.o quote.o $(common_o) $(LIBOBJS)
  108. diff3: $(diff3_o)
  109.     $(CC) -o $@ $(CFLAGS) $(LDFLAGS) $(diff3_o) $(LIBS)
  110.  
  111. sdiff_o = sdiff.o quote.o $(common_o) $(LIBOBJS)
  112. sdiff: $(sdiff_o)
  113.     $(CC) -o $@ $(CFLAGS) $(LDFLAGS) $(sdiff_o) $(LIBS)
  114.  
  115. cmp_o = cmp.o cmpbuf.o $(common_o) $(LIBOBJS)
  116. cmp: $(cmp_o)
  117.     $(CC) -o $@ $(CFLAGS) $(LDFLAGS) $(cmp_o) $(LIBS)
  118.  
  119. info: diff.info
  120. diff.info: diff.texi version.texi
  121.     $(MAKEINFO) --no-split $(srcdir)/diff.texi --output=$@
  122.  
  123. dvi: diff.dvi
  124. diff.dvi: diff.texi
  125.     $(TEXI2DVI) $(srcdir)/diff.texi
  126.  
  127. $(diff_o): diff.h system.h
  128. cmp.o diff3.o sdiff.o: system.h
  129. context.o diff.o regex.o: regex.h
  130. cmp.o diff.o diff3.o sdiff.o getopt.o getopt1.o: getopt.h
  131. diff.o fnmatch.o: fnmatch.h
  132. analyze.o cmpbuf.o cmp.o: cmpbuf.h
  133.  
  134. cmp.o: cmp.c
  135.     $(COMPILE) -DNULL_DEVICE=\"$(NULL_DEVICE)\" $(srcdir)/cmp.c
  136.  
  137. diff3.o: diff3.c
  138.     $(COMPILE) -DDIFF_PROGRAM=\"$(DIFF_PROGRAM)\" $(srcdir)/diff3.c
  139.  
  140. sdiff.o: sdiff.c
  141.     $(COMPILE) -DDEFAULT_EDITOR_PROGRAM=\"$(DEFAULT_EDITOR_PROGRAM)\" \
  142.         -DDIFF_PROGRAM=\"$(DIFF_PROGRAM)\" $(srcdir)/sdiff.c
  143.  
  144. util.o: util.c
  145.     $(COMPILE) -DPR_PROGRAM=\"$(PR_PROGRAM)\" $(srcdir)/util.c
  146.  
  147. TAGS: $(srcs)
  148.     etags $(srcs)
  149.  
  150. messages.po: getmsgids $(diffutils_srcs)
  151.     ./getmsgids $(diffutils_srcs) >$@
  152.  
  153. clean:
  154.     rm -f *.o $(PROGRAMS) core
  155.     rm -f *.aux *.cp *.cps *.dvi *.fn *.fns *.ky *.kys *.log
  156.     rm -f *.pg *.pgs *.toc *.tp *.tps *.vr *.vrs
  157.  
  158. mostlyclean: clean
  159.  
  160. distclean: clean
  161.     rm -f Makefile config.cache config.h config.log config.status stamp-h
  162.  
  163. realclean: distclean
  164.     rm -f TAGS *.info messages.po version.*
  165.  
  166. install: all installdirs
  167.     for p in $(PROGRAMS); do \
  168.       $(INSTALL_PROGRAM) $$p $(bindir)/`echo $$p | $(edit_program_name)`; \
  169.     done
  170.     { test -f diff.info || cd $(srcdir); } && \
  171.     $(INSTALL_DATA) diff.info $(infodir)
  172.  
  173. installdirs:
  174.     $(SHELL) ${srcdir}/mkinstalldirs $(bindir) $(infodir)
  175.  
  176. # We need more tests.
  177. check: $(PROGRAMS)
  178.     ./cmp cmp cmp
  179.     ./diff diff diff
  180.     ./diff3 diff3 diff3 diff3
  181.     ./sdiff sdiff sdiff
  182.  
  183. uninstall:
  184.     for p in $(PROGRAMS); do \
  185.       rm -f $(bindir)/`echo $$p | $(edit_program_name)`; \
  186.     done
  187.     rm -f $(infodir)/diff.info*
  188.  
  189. configure: configure.in
  190.     cd $(srcdir) && autoconf
  191.  
  192. # autoheader might not change config.hin.
  193. config.hin: stamp-h.in
  194. stamp-h.in: configure.in
  195.     cd $(srcdir) && autoheader
  196.     date > $(srcdir)/stamp-h.in
  197.  
  198. config.status: configure
  199.     ./config.status --recheck
  200.  
  201. # config.status might not change config.h, but it changes stamp-h.
  202. config.h: stamp-h
  203. stamp-h: config.hin config.status
  204.     ./config.status
  205. Makefile: Makefile.in config.status
  206.     ./config.status
  207.  
  208. D = $(PACKAGE)-$(VERSION)
  209. D_dirs = $D $D/pc $D/pc/djgpp $D/pc/emx
  210.  
  211. dist: $D.tar.gz
  212.  
  213. $D.tar.gz: $(distfiles)
  214.     rm -rf $D
  215.     mkdir $(D_dirs)
  216.     chmod a+rwx $(D_dirs)
  217.     for file in $(distfiles); do \
  218.       ln $$file $D/$$file 2>/dev/null || cp -p $$file $D/$$file; \
  219.     done
  220.     tar -chf - $D | gzip >$@
  221.     rm -rf $D
  222.  
  223. # Prevent GNU make v3 from overflowing arg limit on SysV.
  224. .NOEXPORT:
  225.