home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-dist / inetutils-1.2-src.tgz / tar.out / fsf / inetutils / Makefile.in < prev    next >
Makefile  |  1996-09-28  |  3KB  |  91 lines

  1. # Makefile for inetutils
  2. #
  3. # Copyright (C) 1995, 1996 Free Software Foundation, Inc.
  4. #
  5. # Written by Miles Bader <miles@gnu.ai.mit.edu>
  6. #
  7. # This program is free software; you can redistribute it and/or modify
  8. # it under the terms of the GNU General Public License as published by
  9. # the Free Software Foundation; either version 2, or (at your option)
  10. # any later version.
  11. #
  12. # This program is distributed in the hope that it will be useful,
  13. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  15. # GNU General Public License for more details.
  16. #
  17. # You should have received a copy of the GNU General Public License
  18. # along with this program; if not, write to the Free Software
  19. # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  20. #
  21.  
  22. SHELL = /bin/sh
  23.  
  24. srcdir = @srcdir@
  25. top_srcdir = @top_srcdir@
  26. include config.make
  27.  
  28. SUBDIRS = @subdirs@ @SUBDIRS@
  29. SERVERS = @subdirs@ @COMMON@ @SERVERS@
  30. CLIENTS = @subdirs@ @COMMON@ @CLIENTS@
  31. BOTH = @subdirs@ @COMMON@ @SERVERS_OR_CLIENTS@
  32.  
  33. DISTFILES = $(SUBDIRS) ChangeLog INSTALL NEWS README TODO config.guess \
  34.     config.make.in config.sub configure configure.in install-sh \
  35.     mkinstalldirs rules.make paths
  36. DISTPACKAGES = glob
  37. MAINTCLEAN = configure
  38.  
  39. DISTCLEAN = include config.make config.status config.log Makefile \
  40.     pathdefs.make paths.defs
  41.  
  42. all:       $(addsuffix -all,$(BOTH))
  43. install:   install-both
  44. uninstall: uninstall-both
  45. clients:   $(addsuffix -all,$(CLIENTS))
  46. servers:   $(addsuffix -all,$(SERVERS))
  47.  
  48. clean: clean-subdirs
  49. distclean: distclean-subdirs
  50.     $(RM) -rf $(DISTCLEAN)
  51. maintainer-clean: maintainer-clean-subdirs
  52.     $(RM) -rf $(DISTCLEAN) $(MAINTCLEAN)
  53.  
  54. %-clients: $(addprefix %-,$(CLIENTS))    ;
  55. %-servers: $(addprefix %-,$(SERVERS))    ;
  56. %-both:    $(addprefix %-,$(BOTH))    ;
  57. %-subdirs: $(addprefix %-,$(SUBDIRS))    ;
  58.  
  59. $(addsuffix -all,$(SUBDIRS))       : %-all       : ; $(MAKE) -C $* all
  60. $(addprefix install-,$(SUBDIRS))   : install-%   : ; $(MAKE) -C $* install
  61. $(addprefix uninstall-,$(SUBDIRS)) : uninstall-% : ; $(MAKE) -C $* uninstall
  62. $(addprefix clean-,$(SUBDIRS))     : clean-%     : ; $(MAKE) -C $* clean
  63. $(addprefix distclean-,$(SUBDIRS)) : distclean-% : ; $(MAKE) -C $* distclean
  64. $(addprefix maintainer-clean-,$(SUBDIRS)) : maintainer-clean-% : ; $(MAKE) -C $* maintainer-clean
  65.  
  66. $(addprefix dist-,$(SUBDIRS))      : dist-%      :
  67.     $(MAKE) -C $* dist DISTDIR=../$(DISTDIR)/$*
  68.  
  69. dist: dist-prepare dist-subdirs dist-package
  70.  
  71. DISTDIR = `cat distname`
  72. distname: libinetutils/version.c
  73.     echo inetutils-`sed -e '/inetutils_version/!d' \
  74.         -e 's/[^0-9.]*\([0-9.a-z]*\).*/\1/' -e q $<` > $@-tmp
  75.     mv $@-tmp $@
  76. dist-prepare: distname
  77.     rm -rf $(DISTDIR)
  78.     mkdir $(DISTDIR)
  79.     $(LINK_DISTFILES)
  80.     @for P in $(DISTPACKAGES); do \
  81.           { ln 2>/dev/null $(srcdir)/$$P $(DISTDIR)/$$P         \
  82.             && echo ln $(srcdir)/$$P $(DISTDIR)/$$P; }         \
  83.           || { echo cp -pfR $(srcdir)/$$P $(DISTDIR)/$$P     \
  84.           ; cp -pfR $(srcdir)/$$P $(DISTDIR)/$$P; };     \
  85.     done
  86. dist-package: distname
  87.     tar --gzip -chvf $(DISTDIR).tar.gz $(DISTDIR)
  88.     rm -rf $(DISTDIR) distname
  89.  
  90. .PHONY: clients servers both subdirs
  91.