home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / rcs567s.zip / diff / Makefile.in < prev    next >
Makefile  |  1993-09-27  |  4KB  |  155 lines

  1. # Makefile for GNU DIFF
  2. # Copyright (C) 1988, 1989, 1991, 1992, 1993 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. srcdir = @srcdir@
  23. VPATH = @srcdir@
  24.  
  25. CC = @CC@
  26. INSTALL = @INSTALL@
  27. INSTALL_PROGRAM = @INSTALL_PROGRAM@
  28. INSTALL_DATA = @INSTALL_DATA@
  29. MAKEINFO = makeinfo
  30.  
  31. CFLAGS = -g
  32. LDFLAGS = -g
  33. LIBS = @LIBS@
  34.  
  35. # Some System V machines do not come with libPW.
  36. # If this is true for you, use the GNU alloca.o here.
  37. ALLOCA = @ALLOCA@
  38.  
  39. prefix = /usr/local
  40. exec_prefix = $(prefix)
  41.  
  42. # Prefix for each installed program, normally empty or `g'.
  43. binprefix =
  44.  
  45. bindir = $(exec_prefix)/bin
  46.  
  47. infodir = $(prefix)/info
  48.  
  49. #### End of system configuration section. ####
  50.  
  51. SHELL = /bin/sh
  52.  
  53. # The source files for all of the programs.
  54. srcs=diff.c analyze.c cmpbuf.c cmpbuf.h io.c context.c ed.c normal.c ifdef.c \
  55.     util.c dir.c \
  56.     version.c diff.h regex.c regex.h side.c system.h \
  57.     diff3.c sdiff.c cmp.c error.c xmalloc.c getopt.c getopt1.c getopt.h \
  58.     fnmatch.c fnmatch.h alloca.c
  59. distfiles = $(srcs) README INSTALL NEWS diagmeet.note Makefile.in \
  60.     config.h.in configure configure.in COPYING ChangeLog \
  61.     diff.texi diff.info* texinfo.tex \
  62.     mkinstalldirs
  63.  
  64. all: diff diff3 sdiff cmp diff.info
  65.  
  66. COMPILE = $(CC) -c -DHAVE_CONFIG_H $(CPPFLAGS) -I. -I$(srcdir) $(CFLAGS)
  67.  
  68. .c.o:
  69.     $(COMPILE) $<
  70.  
  71. diff_o = diff.o analyze.o cmpbuf.o dir.o io.o util.o \
  72.     context.o ed.o ifdef.o normal.o side.o \
  73.     fnmatch.o getopt.o getopt1.o regex.o version.o $(ALLOCA)
  74. diff: $(diff_o)
  75.     $(CC) -o $@ $(LDFLAGS) $(diff_o) $(LIBS)
  76.  
  77. diff3_o = diff3.o getopt.o getopt1.o version.o
  78. diff3: $(diff3_o)
  79.     $(CC) -o $@ $(LDFLAGS) $(diff3_o) $(LIBS)
  80.  
  81. sdiff_o = sdiff.o getopt.o getopt1.o version.o
  82. sdiff: $(sdiff_o)
  83.     $(CC) -o $@ $(LDFLAGS) $(sdiff_o) $(LIBS)
  84.  
  85. cmp_o = cmp.o cmpbuf.o error.o getopt.o getopt1.o xmalloc.o version.o
  86. cmp: $(cmp_o)
  87.     $(CC) -o $@ $(LDFLAGS) $(cmp_o) $(LIBS)
  88.  
  89. diff.info: diff.texi
  90.     $(MAKEINFO) $(srcdir)/diff.texi
  91.  
  92. $(diff_o): diff.h system.h
  93. cmp.o diff3.o sdiff.o: system.h
  94. context.o diff.o regex.o: regex.h
  95. cmp.o diff.o diff3.o sdiff.o getopt.o getopt1.o: getopt.h
  96. diff.o fnmatch.o: fnmatch.h
  97. analyze.o cmpbuf.o cmp.o: cmpbuf.h
  98.  
  99. diff3.o: diff3.c
  100.     $(COMPILE) -DDIFF_PROGRAM=\"$(bindir)/$(binprefix)diff\" $(srcdir)/diff3.c
  101.  
  102. sdiff.o: sdiff.c
  103.     $(COMPILE) -DDIFF_PROGRAM=\"$(bindir)/$(binprefix)diff\" $(srcdir)/sdiff.c
  104.  
  105. TAGS: $(srcs)
  106.     etags $(srcs)
  107.  
  108. clean:
  109.     rm -f *.o diff diff3 sdiff cmp core
  110.  
  111. mostlyclean: clean
  112.  
  113. distclean: clean
  114.     rm -f Makefile config.status
  115.  
  116. realclean: distclean
  117.     rm -f TAGS *.info*
  118.  
  119. install: all installdirs
  120.     for p in diff diff3 sdiff cmp; \
  121.     do $(INSTALL_PROGRAM) $$p $(bindir)/$(binprefix)$$p; done
  122.     cd $(srcdir); for f in diff.info*; \
  123.     do $(INSTALL_DATA) $$f $(infodir)/$$f; done
  124.  
  125. installdirs:
  126.     $(SHELL) ${srcdir}/mkinstalldirs $(bindir) $(infodir)
  127.  
  128. uninstall:
  129.     for p in diff diff3 sdiff cmp; \
  130.     do rm -f $(bindir)/$(binprefix)$$p; done
  131.     rm -f $(infodir)/diff.info*
  132.  
  133. Makefile: Makefile.in config.status
  134.     $(SHELL) config.status
  135. config.status: configure
  136.     $(SHELL) $(srcdir)/configure --no-create
  137. configure: configure.in
  138.     cd $(srcdir); autoconf
  139. config.h.in: configure.in
  140.     cd $(srcdir); autoheader
  141.  
  142. dist: $(distfiles)
  143.     echo diffutils-`sed -e '/version_string/!d' -e 's/[^0-9]*\([0-9a-z.]*\).*/\1/' -e q version.c` > .fname
  144.     rm -rf `cat .fname`
  145.     mkdir `cat .fname`
  146.     -ln $(distfiles) `cat .fname`
  147.     for file in $(distfiles); do \
  148.       [ -r `cat .fname`/$$file ] || cp -p $$file `cat .fname` || exit; \
  149.     done
  150.     tar -chf - `cat .fname` | gzip >`cat .fname`.tar.gz
  151.     rm -rf `cat .fname` .fname
  152.  
  153. # Prevent GNU make v3 from overflowing arg limit on SysV.
  154. .NOEXPORT:
  155.