home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 4 / FreshFish_May-June1994.bin / bbs / gnu / find-3.8-src.lha / src / amiga / find-3.8 / locate / Makefile.in < prev    next >
Encoding:
Makefile  |  1992-09-11  |  2.3 KB  |  87 lines

  1. # Makefile for GNU locate.
  2. # Do not use this makefile directly, but only from `../Makefile'.
  3. # Copyright (C) 1990 Free Software Foundation, Inc.
  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. SHELL = /bin/sh
  20.  
  21. srcdir = @srcdir@
  22. VPATH = @srcdir@
  23.  
  24. LIBPROGS = updatedb bigram code
  25. SOURCES = locate.c bigram.c code.c
  26. DISTFILES = Makefile.in updatedb.sh $(SOURCES)
  27.  
  28. all: locate $(LIBPROGS)
  29.  
  30. .c.o:
  31.     $(CC) -c $(CFLAGS) $(CPPFLAGS) $(DEFS) -I$(srcdir)/../lib $<
  32.  
  33. install: all
  34.     $(INSTALL_PROGRAM) locate $(bindir)/$(binprefix)locate
  35.     -mkdir $(libdir)
  36.     -mkdir $(datadir)
  37.     for f in $(LIBPROGS); do $(INSTALL_PROGRAM) $$f $(libdir)/$$f; done
  38.  
  39. uninstall:
  40.     rm -f $(bindir)/$(binprefix)locate
  41.     for f in $(LIBPROGS); do rm -f $(libdir)/$$f; done
  42.     -rmdir $(libdir)
  43.     -rmdir $(datadir)
  44.  
  45. TAGS: $(SOURCES)
  46.     etags $(SOURCES)
  47.  
  48. clean:
  49.     rm -f locate $(LIBPROGS) *.o core
  50. .PHONEY: clean
  51.  
  52. mostlyclean: clean
  53.  
  54. distclean: clean
  55.     rm -f Makefile
  56.  
  57. realclean: distclean
  58.     rm -f TAGS
  59.  
  60. dist:
  61.     ln $(DISTFILES) ../`cat ../.fname`/locate
  62.  
  63. locate:    locate.o ../lib/libfind.a
  64.     $(CC) -o $@ $(LDFLAGS) locate.o ../lib/libfind.a $(LIBS)
  65.  
  66. locate.o: locate.c
  67.     $(CC) -c $(CFLAGS) $(CPPFLAGS) $(DEFS) -I$(srcdir)/../lib -DLOCATE_DB=\"$(LOCATE_DB)\" $(srcdir)/locate.c
  68.  
  69. bigram: bigram.o ../lib/libfind.a
  70.     $(CC) -o $@ $(LDFLAGS) bigram.o ../lib/libfind.a $(LIBS)
  71.  
  72. code: code.o ../lib/libfind.a
  73.     $(CC) -o $@ $(LDFLAGS) code.o ../lib/libfind.a $(LIBS)
  74.  
  75. updatedb: updatedb.sh
  76.     rm -f $@
  77.     sed -e "s,@libdir@,$(libdir)," -e "s,@LOCATE_DB@,$(LOCATE_DB)," \
  78.     -e "s,@bindir@,$(bindir)," -e "s,@binprefix@,$(binprefix)," \
  79.     $(srcdir)/updatedb.sh > $@
  80.     chmod +x $@
  81.  
  82. bigram.o code.o locate.o: ../lib/pathmax.h
  83. locate.o: ../lib/fnmatch.h ../lib/getopt.h
  84.  
  85. # Prevent GNU make v3 from overflowing arg limit on SysV.
  86. .NOEXPORT:
  87.