home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 8 / FreshFishVol8-CD2.bin / bbs / gnu / textutils-1.11-src.lha / textutils-1.11 / lib / Makefile.in < prev    next >
Encoding:
Makefile  |  1994-11-04  |  3.0 KB  |  120 lines

  1. # Makefile for library files used by GNU text utilities.
  2. # Copyright (C) 1991, 1992, 1993, 1994 Free Software Foundation, Inc.
  3.  
  4. # This program is free software; you can redistribute it and/or modify
  5. # it under the terms of the GNU General Public License as published by
  6. # the Free Software Foundation; either version 2, or (at your option)
  7. # any later version.
  8.  
  9. # This program is distributed in the hope that it will be useful,
  10. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  12. # GNU General Public License for more details.
  13.  
  14. # You should have received a copy of the GNU General Public License
  15. # along with this program; if not, write to the Free Software
  16. # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  17.  
  18. SHELL = /bin/sh
  19.  
  20. srcdir = @srcdir@
  21. VPATH = @srcdir@
  22.  
  23. CC = @CC@
  24. AR = ar
  25. RANLIB = @RANLIB@
  26. DEFS = @DEFS@
  27. CFLAGS = @CFLAGS@
  28. YACC = @YACC@
  29.  
  30. SOURCES = regex.c error.c full-write.c getopt.c getopt1.c \
  31. linebuffer.c long-options.c memchr.c safe-read.c xmalloc.c xwrite.c \
  32. alloca.c bcopy.c memcmp.c memset.c stpcpy.c strtol.c strtoul.c
  33.  
  34. # Always link in the fast GNU memchr; it speeds up sort, especially on HP-UX.
  35. OBJECTS = regex.o error.o full-write.o getopt.o getopt1.o \
  36. linebuffer.o long-options.o memchr.o safe-read.o safe-lstat.o safe-stat.o \
  37. xmalloc.o xwrite.o @LIBOBJS@ @ALLOCA@
  38.  
  39. DISTFILES = Makefile.in getopt.h linebuffer.h long-options.h regex.h \
  40. safe-xstat.cin safe-xstat.hin $(SOURCES)
  41.  
  42. all: libtu.a
  43.  
  44. .SUFFIXES:
  45. .SUFFIXES: .c .o
  46.  
  47. .c.o:
  48.     $(CC) -c $(CPPFLAGS) $(DEFS) -I. -I.. -I$(srcdir) $(CFLAGS) $<
  49.  
  50. subdir = lib
  51. Makefile: ../config.status Makefile.in
  52.     cd .. && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status
  53.  
  54. installdirs:
  55.  
  56. install: all
  57.  
  58. uninstall:
  59.  
  60. TAGS: $(SOURCES)
  61.     etags $(SOURCES)
  62.  
  63. check:
  64.  
  65. clean:
  66.     rm -f *.a *.o
  67.  
  68. mostlyclean: clean
  69.  
  70. distclean: clean
  71.     rm -f Makefile \
  72.       safe-stat.c safe-stat.h safe-lstat.c safe-lstat.h
  73.  
  74. realclean: distclean
  75.     rm -f TAGS
  76.  
  77. distdir = ../`cat ../distname`/$(subdir)
  78. dist: $(DISTFILES)
  79.     for file in $(DISTFILES); do \
  80.       ln $$file $(distdir) \
  81.         || { echo copying $$file instead; cp -p $$file $(distdir);}; \
  82.     done
  83.  
  84. libtu.a: $(OBJECTS)
  85.     rm -f $@
  86.     $(AR) cr $@ $(OBJECTS)
  87.     -$(RANLIB) $@
  88.  
  89. extract_stat = sed 's/@l@//g; s/@L@//g; /@LSTAT_ONLY@/d'
  90. extract_lstat = sed 's/@l@/l/g; s/@L@/L/g; s/    *@LSTAT_ONLY@//'
  91.  
  92. safe-lstat.c: safe-xstat.cin
  93.     $(extract_lstat) $(srcdir)/safe-xstat.cin > $@-t
  94.     mv $@-t $@
  95.  
  96. safe-lstat.h: safe-xstat.hin
  97.     $(extract_lstat) $(srcdir)/safe-xstat.hin > $@-t
  98.     mv $@-t $@
  99.  
  100. safe-stat.c: safe-xstat.cin
  101.     $(extract_stat) $(srcdir)/safe-xstat.cin > $@-t
  102.     mv $@-t $@
  103.  
  104. safe-stat.h: safe-xstat.hin
  105.     $(extract_stat) $(srcdir)/safe-xstat.hin > $@-t
  106.     mv $@-t $@
  107.  
  108. safe-stat.o: safe-stat.h
  109. safe-lstat.o: safe-lstat.h safe-stat.h
  110.  
  111. $(OBJECTS): ../config.h
  112.  
  113. getopt1.o: getopt.h
  114. regex.o: regex.h
  115. linebuffer.o: linebuffer.h
  116.  
  117. # Tell versions [3.59,3.63) of GNU make not to export all variables.
  118. # Otherwise a system limit (for SysV at least) may be exceeded.
  119. .NOEXPORT:
  120.