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

  1. # Makefile for GNU tar sources.
  2. # Copyright (C) 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. PACKAGE = @PACKAGE@
  19. VERSION = @VERSION@
  20. PROGRAMS = @PROGRAMS@
  21.  
  22. SHELL = /bin/sh
  23. VPATH = @srcdir@
  24. exec_prefix = @exec_prefix@
  25. prefix = @prefix@
  26. srcdir = @srcdir@
  27. subdir = src
  28. top_srcdir = @top_srcdir@
  29. transform = @program_transform_name@
  30.  
  31. CC = @CC@
  32. CFLAGS = @CFLAGS@
  33. CPPFLAGS = @CPPFLAGS@
  34. DEFS = @DEFS@
  35. INSTALL = @INSTALL@
  36. INSTALL_DATA = @INSTALL_DATA@
  37. INSTALL_PROGRAM = @INSTALL_PROGRAM@
  38. INTLDEPS = @INTLDEPS@
  39. LDFLAGS = @LDFLAGS@
  40. LIBS = @LIBS@
  41. TOUCH = echo timestamp >
  42.  
  43. bindir = $(exec_prefix)/bin
  44. datadir = $(prefix)/share
  45. libexecdir = $(exec_prefix)/libexec
  46. localedir = $(datadir)/locale
  47.  
  48. COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
  49. LINK = $(CC) $(LDFLAGS) -o $@
  50.  
  51. .SUFFIXES:
  52. .SUFFIXES: .c .o
  53. .c.o:
  54.     $(COMPILE) $<
  55.  
  56. ANSI2KNR = @ANSI2KNR@
  57. o = .@U@o
  58.  
  59. .SUFFIXES: ._c ._o
  60. .c._c:
  61.     ./ansi2knr $< > $*.tmp && mv $*.tmp $@
  62. ._c._o:
  63.     @echo $(COMPILE) $<
  64.     @rm -f _$*.c
  65.     @ln $< _$*.c && $(COMPILE) _$*.c && mv _$*.o $@ && rm _$*.c
  66. .c._o:
  67.     ./ansi2knr $< > $*.tmp && mv $*.tmp $*._c
  68.     @echo $(COMPILE) $*._c
  69.     @rm -f _$*.c
  70.     @ln $*._c _$*.c && $(COMPILE) _$*.c && mv _$*.o $@ && rm _$*.c
  71.  
  72. INCLUDES = -I.. -I../intl -I$(srcdir) -I$(top_srcdir)/lib
  73.  
  74. gen_SOURCES = genfile.c
  75. gen_OBJECTS = genfile$o
  76.  
  77. rmt_SOURCES = rmt.c
  78. rmt_OBJECTS = rmt$o
  79.  
  80. tar_SOURCES = buffer.c create.c diffarch.c extract.c gnu.c list.c \
  81. mangle.c names.c port.c rtapelib.c tar.c update.c 
  82. tar_OBJECTS = buffer$o create$o diffarch$o extract$o gnu$o list$o \
  83. mangle$o names$o port$o rtapelib$o tar$o update$o
  84.  
  85. HEADERS = open3.h rmt.h system.h tar.h
  86. SOURCES = $(gen_SOURCES) $(rmt_SOURCES) $(tar_SOURCES)
  87. OBJECTS = $(gen_OBJECTS) $(rmt_OBJECTS) $(tar_OBJECTS)
  88.  
  89. DISTFILES = Makefile.in ansi2knr.c ansi2knr.1 checktar.sh \
  90. $(HEADERS) $(SOURCES)
  91.  
  92. all: genfile $(PROGRAMS)
  93.  
  94. rmt: $(rmt_OBJECTS) $(INTLDEPS) ../lib/libtar.a
  95.     $(LINK) $(rmt_OBJECTS) $(INTLDEPS) ../lib/libtar.a $(LIBS)
  96.  
  97. tar: $(tar_OBJECTS) $(INTLDEPS) ../lib/libtar.a
  98.     $(LINK) $(tar_OBJECTS) $(INTLDEPS) ../lib/libtar.a $(LIBS)
  99.  
  100. check: tar genfile
  101.     PATH=`pwd`:$$PATH $(SHELL) $(srcdir)/checktar.sh
  102.  
  103. genfile: $(gen_OBJECTS) $(INTLDEPS) ../lib/libtar.a
  104.     $(LINK) $(gen_OBJECTS) $(INTLDEPS) ../lib/libtar.a $(LIBS)
  105.  
  106. $(OBJECTS): $(ANSI2KNR) ../config.h system.h ../intl/libgettext.h tar.h
  107. buffer$o diffarch$o rtapelib$o update$o: rmt.h
  108. buffer$o tar$o: ../lib/regex.h ../lib/rx.h
  109. tar$o: ../lib/fnmatch.h
  110.  
  111. ansi2knr: ansi2knr.o
  112.     $(LINK) ansi2knr.o $(LIBS)
  113.  
  114. install: $(PROGRAMS)
  115.     for name in $(PROGRAMS); do \
  116.       if test $$name = rmt; then dir=$(libexecdir); \
  117.       else dir=$(bindir); fi; \
  118.       $(top_srcdir)/mkinstalldirs $$dir; \
  119.           $(INSTALL_PROGRAM) $$name \
  120.         $$dir/`echo $$name | sed '$(transform)'`; \
  121.     done
  122.  
  123. uninstall:
  124.     for name in $(PROGRAMS); do \
  125.       if test $$name = rmt; then dir=$(libexecdir); \
  126.       else dir=$(bindir); fi; \
  127.           rm -f $(dir)/`echo $$name | sed '$(transform)'`; \
  128.     done
  129.  
  130. id: ID
  131.  
  132. ID: $(HEADERS) $(SOURCES)
  133.     here=`pwd`; cd $(srcdir) && mkid -f$$here/ID $$here/config.h \
  134.       $(HEADERS) $(SOURCES)
  135.  
  136. tags: TAGS
  137.  
  138. TAGS: $(HEADERS) $(SOURCES)
  139.     here=`pwd`; cd $(srcdir) && etags -o $$here/TAGS $$here/config.h \
  140.       $(HEADERS) $(SOURCES) -i ../lib/TAGS
  141.  
  142. mostlyclean:
  143.     rm -f *.o _*.c _*.o *._c *._o core core.*
  144.  
  145. clean: mostlyclean
  146.     rm -f genfile tar rmt
  147.  
  148. distclean: clean
  149.     rm -f ansi2knr ID TAGS
  150.     rm -f Makefile
  151.  
  152. maintainer-clean: distclean
  153.     @echo "This command is intended only for maintainers to use;"
  154.     @echo "rebuilding the deleted files may require special tools."
  155.  
  156. distdir = ../$(PACKAGE)-$(VERSION)/$(subdir)
  157. dist: $(DISTFILES)
  158.     for file in $(DISTFILES); do \
  159.       ln $(srcdir)/$$file $(distdir) 2> /dev/null \
  160.         || cp -p $(srcdir)/$$file $(distdir); \
  161.     done
  162.  
  163. Makefile: Makefile.in ../config.status
  164.     cd .. && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status
  165.  
  166. # Tell versions [3.59,3.63) of GNU make not to export all variables.
  167. # Otherwise a system limit (for SysV at least) may be exceeded.
  168. .NOEXPORT:
  169.