home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-dist / sh-utils-1.12-src.tgz / tar.out / fsf / sh-utils / Makefile.in < prev    next >
Makefile  |  1996-09-28  |  4KB  |  133 lines

  1. # Master Makefile for the GNU shell 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. # This directory's subdirectories are mostly independent; you can cd
  19. # into them and run `make' without going through this Makefile.
  20. # To change the values of `make' variables: instead of editing Makefiles,
  21. # (1) if the variable is set in `config.status', edit `config.status'
  22. #     (which will cause the Makefiles to be regenerated when you run `make');
  23. # (2) otherwise, pass the desired values on the `make' command line.
  24.  
  25. srcdir = @srcdir@
  26. VPATH = @srcdir@
  27. @SET_MAKE@
  28.  
  29. SHELL = /bin/sh
  30.  
  31. DISTFILES = COPYING COPYING.LIB ChangeLog Makefile.in README INSTALL \
  32. NEWS configure configure.in config.h.in mkinstalldirs install-sh \
  33. stamp-h.in acconfig.h
  34.  
  35. # Redundant stuff for making only selected programs.
  36. # Amiga hacks - remove tty and who, since they need ttyname().
  37. PROGS = basename date dirname echo env expr false groups hostname id logname \
  38. pathchk printenv printf pwd sleep tee test true users whoami \
  39. yes @PROGS@
  40.  
  41. # Subdirectories to run make in for the primary targets.
  42. SUBDIRS = lib src man doc
  43.  
  44. .SUFFIXES:
  45.  
  46. all install uninstall: config.h Makefile
  47.     for subdir in $(SUBDIRS); do \
  48.       echo making $@ in $$subdir; \
  49.       (cd $$subdir && $(MAKE) $@) || exit 1; \
  50.     done
  51.  
  52. info guide dvi:
  53.     cd doc && $(MAKE) $@
  54.  
  55. check:
  56. installcheck:
  57.  
  58. $(PROGS) su:
  59.     cd lib && $(MAKE) all
  60.     cd src && $(MAKE) $@
  61.  
  62. mostlyclean: mostlyclean-recursive mostlyclean-local
  63.  
  64. clean: clean-recursive clean-local
  65.  
  66. distclean: distclean-recursive distclean-local
  67.     rm config.status
  68.  
  69. realclean: realclean-recursive realclean-local
  70.     rm config.status
  71.  
  72. TAGS clean-recursive distclean-recursive \
  73.         mostlyclean-recursive realclean-recursive:
  74.     for subdir in $(SUBDIRS); do \
  75.       target=`echo $@|sed 's/-recursive//'`; \
  76.       echo making $$target in $$subdir; \
  77.       (cd $$subdir && $(MAKE) $$target) || exit 1; \
  78.     done
  79.  
  80. mostlyclean-local:
  81.  
  82. clean-local: mostlyclean-local
  83.  
  84. distclean-local: clean-local
  85.     rm -f Makefile config.cache config.h config.log stamp-h distname
  86.  
  87. realclean-local: distclean-local
  88.  
  89. distname: src/version.c
  90.     echo sh-utils-`sed -e '/version_string/!d' \
  91.         -e 's/[^0-9.]*\([0-9.a-z]*\).*/\1/' -e q src/version.c` > $@-tmp
  92.     mv $@-tmp $@
  93.  
  94. distdir = `cat distname`
  95. dist: $(DISTFILES) distname
  96.     rm -rf $(distdir)
  97.     mkdir $(distdir)
  98.     for file in $(DISTFILES); do \
  99.       ln $$file $(distdir) \
  100.         || { echo copying $$file instead; cp -p $$file $(distdir);}; \
  101.     done
  102.     for subdir in $(SUBDIRS); do \
  103.       mkdir $(distdir)/$$subdir || exit 1; \
  104.       (cd $$subdir && $(MAKE) $@) || exit 1; \
  105.     done
  106.     tar --gzip -chvf $(distdir).tar.gz $(distdir)
  107.     rm -rf $(distdir) distname
  108.  
  109. # For the justification of the following Makefile rules, see node
  110. # `Automatic Remaking' in GNU Autoconf documentation.
  111.  
  112. Makefile: config.status Makefile.in
  113.     CONFIG_FILES=$@ CONFIG_HEADERS= ./config.status
  114.  
  115. config.h: stamp-h
  116. stamp-h: config.status $(srcdir)/config.h.in
  117.     CONFIG_FILES= CONFIG_HEADERS=config.h ./config.status
  118.  
  119. config.status: configure
  120.     ./config.status --recheck
  121. configure: configure.in
  122.     cd $(srcdir) && autoconf
  123. config.h.in: stamp-h.in
  124. stamp-h.in: configure.in
  125.     cd $(srcdir) && autoheader
  126. # Use echo instead of date to avoid spurious conflicts for
  127. # people who use CVS, since stamp-h.in is distributed.
  128.     echo > $(srcdir)/$@
  129.  
  130. # Tell versions [3.59,3.63) of GNU make not to export all variables.
  131. # Otherwise a system limit (for SysV at least) may be exceeded.
  132. .NOEXPORT:
  133.