home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 4 / FreshFish_May-June1994.bin / bbs / gnu / grep-2.0-src.lha / src / build / grep-2.0 / Makefile < prev   
Encoding:
Makefile  |  1994-02-23  |  3.5 KB  |  135 lines

  1. # Generated automatically from Makefile.in by configure.
  2. # Makefile for GNU grep
  3. # Copyright (C) 1992 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. #### Start of system configuration section. ####
  22.  
  23. srcdir=/ISO/grep/grep-2.0-amiga
  24. VPATH=/ISO/grep/grep-2.0-amiga
  25.  
  26. AWK=gawk
  27. INSTALL=/bin/install -c
  28. INSTALL_PROGRAM=$(INSTALL)
  29. INSTALL_DATA=$(INSTALL) -m 644
  30.  
  31. CC=gcc
  32. LINT=lint
  33.  
  34. # Things you might add to DEFS:
  35. # -DSTDC_HEADERS    If you have ANSI C headers and libraries.
  36. # -DHAVE_UNISTD_H    If you have unistd.h.
  37. # -DUSG            If you have System V/ANSI C string
  38. #            and memory functions and headers.
  39. # -D__CHAR_UNSIGNED__    If type `char' is unsigned.
  40. #            gcc defines this automatically.
  41. DEFS=-DGREP -DHAVE_STRING_H=1 -DHAVE_SYS_PARAM_H=1 -DHAVE_UNISTD_H=1 -DHAVE_GETPAGESIZE=1 -DHAVE_MEMCHR=1 -DHAVE_STRERROR=1 -DHAVE_VALLOC=1
  42.  
  43. # Extra libraries.
  44. LIBS=
  45. ALLOCA=
  46.  
  47. CFLAGS=-O2
  48. LDFLAGS=
  49.  
  50. prefix=/gnu
  51. exec_prefix=$(prefix)
  52.  
  53. # Prefix for installed program, normally empty or `g'.
  54. binprefix=
  55. # Prefix for installed man page, normally empty or `g'.
  56. manprefix=
  57.  
  58. # Where to install executables.
  59. bindir=$(exec_prefix)/bin
  60.  
  61. # Where to install man pages.
  62. mandir=$(prefix)/man/man1
  63.  
  64. # Extension for man pages.
  65. manext=1
  66.  
  67. # How to make a hard link.
  68. LN=ln
  69.  
  70. #### End of system configuration section. ####
  71.  
  72. SRCS=grep.c getopt.c regex.c dfa.c kwset.c obstack.c search.c
  73. OBJS=grep.o getopt.o regex.o dfa.o kwset.o obstack.o search.o
  74.  
  75. .c.o:
  76.     $(CC) $(CFLAGS) $(DEFS) -I$(srcdir) -c $<
  77.  
  78. all: grep check.done
  79.  
  80. # For Saber C.
  81. grep.load: $(SRCS)
  82.     #load $(CFLAGS) $(DEFS) -I$(srcdir) (SRCS)
  83.  
  84. # For Lint.
  85. grep.lint: $(SRCS)
  86.     $(LINT) $(CFLAGS) $(DEFS) -I$(srcdir) $(SRCS)
  87.  
  88. install: all
  89.     $(INSTALL_PROGRAM) grep $(bindir)/$(binprefix)grep
  90.     rm -f $(bindir)/$(binprefix)egrep
  91.     $(LN) $(bindir)/$(binprefix)grep $(bindir)/$(binprefix)egrep
  92.     rm -f $(bindir)/$(binprefix)fgrep
  93.     $(LN) $(bindir)/$(binprefix)grep $(bindir)/$(binprefix)fgrep    
  94.     $(INSTALL_DATA) $(srcdir)/grep.man $(mandir)/grep.$(manext)
  95.  
  96. check:
  97.     AWK=$(AWK) sh $(srcdir)/tests/check.sh $(srcdir)/tests
  98.     touch check.done
  99.  
  100. check.done: grep
  101.     AWK=$(AWK) sh $(srcdir)/tests/check.sh $(srcdir)/tests
  102.     touch check.done
  103.  
  104. grep: $(OBJS) $(LIBOBJS) $(ALLOCA)
  105.     $(CC) $(LDFLAGS) -o grep $(OBJS) $(LIBOBJS) $(LIBS) $(ALLOCA)
  106.  
  107. clean:
  108.     rm -f core grep *.o check.done tmp.script khadafy.out
  109.  
  110. mostlyclean: clean
  111.  
  112. distclean: clean
  113.     rm -f Makefile config.status
  114.  
  115. realclean: distclean
  116.     rm -f TAGS
  117.  
  118. Makefile: $(srcdir)/Makefile.in config.status
  119.     $(SHELL) config.status
  120.  
  121. dist:
  122.     V=`sed -n '/version\\[/s/.*\\([0-9][0-9]*\\.[0-9]*\\).*/\\1/p' \
  123.     grep.c`; \
  124.     mkdir grep-$$V; mkdir grep-$$V/tests; \
  125.     for f in `awk '{print $$1}' MANIFEST`; do ln $$f grep-$$V/$$f; done; \
  126.     tar cvhf - grep-$$V | gzip > grep-$$V.tar.z; \
  127.     rm -fr grep-$$V
  128.  
  129. # Some header file dependencies that really ought to be automatically deduced.
  130. dfa.o search.o: dfa.h
  131. grep.o search.o: grep.h
  132. kwset.o search.o: kwset.h
  133. kwset.o obstack.o: obstack.h
  134. regex.o search.o: regex.h
  135.