home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 22 gnu / 22-gnu.zip / gnuawk.zip / awklib / Makefile.in < prev    next >
Makefile  |  1997-05-01  |  3KB  |  100 lines

  1. # Makefile for GNU Awk support library.
  2. #
  3. # Copyright (C) 1995-1997 the Free Software Foundation, Inc.
  4. # This file is part of GAWK, the GNU implementation of the
  5. # AWK Programming Language.
  6. # GAWK 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 of the License, or
  9. # (at your option) any later version.
  10. # GAWK 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. # 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., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA
  17.  
  18. SHELL = /bin/sh
  19.  
  20. srcdir = @srcdir@
  21. VPATH = @srcdir@
  22.  
  23. INSTALL = @INSTALL@
  24. INSTALL_PROGRAM = @INSTALL_PROGRAM@
  25. INSTALL_DATA = @INSTALL_DATA@
  26.  
  27. CC = @CC@
  28. CFLAGS = @CFLAGS@
  29.  
  30. prefix = @prefix@
  31. exec_prefix = @exec_prefix@
  32. binprefix =
  33. manprefix =
  34.  
  35. bindir = @bindir@
  36. libdir = @libdir@
  37. mandir = @mandir@/man1
  38. manext = .1
  39. infodir = @infodir@
  40. datadir = @datadir@/awk
  41. libexecdir = @libexecdir@/awk
  42.  
  43. AUXPROGS = pwcat grcat
  44. AUXAWK = passwd.awk group.awk
  45.  
  46. all: stamp-eg $(AUXPROGS) igawk $(AUXAWK)
  47.  
  48. stamp-eg: $(srcdir)/../doc/gawk.texi
  49.     rm -fr eg stamp-eg
  50.     ../gawk -f $(srcdir)/extract.awk $(srcdir)/../doc/gawk.texi
  51.     @echo 'some makes are stupid and will not check a directory' > stamp-eg
  52.     @echo 'against a file, so this file is a place holder. gack.' >> stamp-eg
  53.  
  54. pwcat: $(srcdir)/eg/lib/pwcat.c
  55.     $(CC) $(CFLAGS) $(srcdir)/eg/lib/pwcat.c $(LDFLAGS) -o $@
  56.  
  57. grcat: $(srcdir)/eg/lib/grcat.c
  58.     $(CC) $(CFLAGS) $(srcdir)/eg/lib/grcat.c $(LDFLAGS) -o $@
  59.  
  60. igawk: $(srcdir)/eg/prog/igawk.sh
  61.     cp $(srcdir)/eg/prog/igawk.sh $@ ; chmod 755 $@
  62.  
  63. passwd.awk: $(srcdir)/eg/lib/passwdawk.in
  64.     (cd $(srcdir)/eg/lib ; \
  65.     sed 's;/usr/local/libexec/awk;$(libexecdir);' < passwdawk.in) > passwd.awk
  66.  
  67. group.awk: $(srcdir)/eg/lib/groupawk.in
  68.     (cd $(srcdir)/eg/lib ; \
  69.     sed 's;/usr/local/libexec/awk;$(libexecdir);' < groupawk.in) > group.awk
  70.  
  71. install: igawk $(AUXPROGS) $(AUXAWK)
  72.     $(INSTALL_PROGRAM) igawk $(bindir)/igawk
  73.     for i in $(AUXPROGS) ; do \
  74.         $(INSTALL_PROGRAM) $$i $(libexecdir)/$$i ; \
  75.     done
  76.     for i in $(AUXAWK) $(srcdir)/eg/lib/*.awk ; do \
  77.         progname=`echo $$i | sed 's;.*/;;'` ; \
  78.         $(INSTALL_DATA) $$i $(datadir)/$$progname ; \
  79.     done
  80.  
  81. # libexecdir and datadir are removed in the top level Makefile's uninstall
  82. uninstall:
  83.     rm -fr $(libexecdir)/* $(datadir)/*
  84.     rm -f $(bindir)/igawk
  85.  
  86. clean:
  87.     rm -f $(AUXPROGS) $(AUXAWK) igawk *~
  88.  
  89. distclean: clean
  90.     rm -f Makefile
  91.  
  92. maintainer-clean: distclean
  93.     @echo "This command is intended for maintainers to use; it"
  94.     @echo "deletes files that may require special tools to rebuild."
  95.     rm -fr eg stamp-eg
  96.