home *** CD-ROM | disk | FTP | other *** search
/ PC-Online 1996 May / PCOnline_05_1996.bin / linux / source / a / bin / fileutil.12 / fileutil / fileutils-3.12 / src / Makefile.in < prev    next >
Encoding:
Makefile  |  1994-11-04  |  5.5 KB  |  212 lines

  1. # Makefile for GNU file utilities.
  2. # Copyright (C) 1990, 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. SHELL = /bin/sh
  19.  
  20. srcdir = @srcdir@
  21. VPATH = @srcdir@
  22.  
  23. prefix = @prefix@
  24. exec_prefix = @exec_prefix@
  25. bindir = $(exec_prefix)/bin
  26. libdir = $(exec_prefix)/lib
  27.  
  28. INSTALL = @INSTALL@
  29. INSTALL_PROGRAM = @INSTALL_PROGRAM@
  30. CC = @CC@
  31. DEFS = @DEFS@
  32. LIBS = @LIBS@
  33. CFLAGS = @CFLAGS@
  34. LDFLAGS = @LDFLAGS@
  35. RM = @RM@
  36. LN = @LN@
  37. MV = @MV@
  38.  
  39. SOURCES = chmod.c chgrp.c chown.c cp-aux.c cp-hash.c cp.c \
  40. dd.c df.c du.c install.c ln.c ls.c mkdir.c mkfifo.c mknod.c mv.c mvdir.c \
  41. rm.c rmdir.c sync.c touch.c version.c ls-ls.c ls-dir.c ls-vdir.c
  42.  
  43. OBJECTS = chmod.o chgrp.o chown.o cp-aux.o cp-hash.o cp.o \
  44. dd.o df.o du.o install.o ln.o ls.o mkdir.o mkfifo.o mknod.o mv.o mvdir.o \
  45. rm.o rmdir.o sync.o touch.o version.o ls-ls.o ls-dir.o ls-vdir.o
  46.  
  47. DISTFILES = Makefile.in cp.h ls.h version.h $(SOURCES) \
  48. system.h
  49.  
  50. # Use `ginstall' in the definition of PROGS and in dependencies to avoid
  51. # confusion with the `install' target.  The install rule transforms `ginstall'
  52. # to install before applying any user-specified name transformations.
  53.  
  54. PROGS = chgrp chown chmod cp dd du ginstall ln dir vdir ls mkdir \
  55. mkfifo mknod mv rm rmdir sync touch @PROGS@
  56.  
  57. LIBPROGS = @LIBPROGS@
  58.  
  59. all: $(PROGS) $(LIBPROGS)
  60.  
  61. .SUFFIXES:
  62. .SUFFIXES: .c .o
  63.  
  64. incl = -I.. -I$(srcdir) -I../lib -I$(srcdir)/../lib
  65. .c.o:
  66.     $(CC) -c $(CPPFLAGS) $(DEFS) $(incl) $(CFLAGS) $<
  67.  
  68. subdir = src
  69. Makefile: ../config.status Makefile.in
  70.     cd .. && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status
  71.  
  72. installdirs:
  73.     $(srcdir)/../mkinstalldirs $(bindir)
  74.  
  75. transform = @program_transform_name@
  76. install: all installdirs
  77.     for f in $(PROGS); do \
  78.       $(INSTALL_PROGRAM) $$f \
  79.           $(bindir)/`echo $$f|sed 's/ginstall/install/; $(transform)'`; \
  80.     done
  81.     if [ "x$(LIBPROGS)" = x ]; then : ; else \
  82.       $(INSTALL_PROGRAM) -o root -m 4755 $(LIBPROGS) $(libdir); fi
  83.     cd $(bindir) && \
  84.       $(RM) -f d v && \
  85.       $(LN) `echo dir|sed '$(transform)'` d && \
  86.       $(LN) `echo vdir|sed '$(transform)'` v
  87.  
  88. uninstall:
  89.     for f in $(LIBPROGS); do \
  90.       $(RM) -f $(libdir)/$(LIBPROGS); \
  91.     done
  92.     for f in $(PROGS) d v; do \
  93.       $(RM) -f \
  94.           $(bindir)/`echo $$f|sed 's/ginstall/install/; $(transform)'`; \
  95.     done
  96.  
  97. TAGS: $(SOURCES)
  98.     etags $(SOURCES)
  99.  
  100. check:
  101.  
  102. clean:
  103.     $(RM) -f $(PROGS) $(LIBPROGS) *.o core
  104.  
  105. mostlyclean: clean
  106.  
  107. distclean: clean
  108.     $(RM) -f Makefile
  109.  
  110. realclean: distclean
  111.     $(RM) -f TAGS
  112.  
  113. distdir = ../`cat ../distname`/$(subdir)
  114. dist: $(DISTFILES)
  115.     for file in $(DISTFILES); do \
  116.       ln $$file $(distdir) \
  117.         || { echo copying $$file instead; cp -p $$file $(distdir);}; \
  118.     done
  119.  
  120. # Linking rules.
  121.  
  122. link_command = $(CC) $(LDFLAGS) -o $@
  123.  
  124. chmod: chmod.o
  125.     $(link_command) chmod.o ../lib/libfu.a version.o $(LIBS)
  126.  
  127. chgrp: chgrp.o
  128.     $(link_command) chgrp.o ../lib/libfu.a version.o $(LIBS)
  129.  
  130. chown: chown.o
  131.     $(link_command) chown.o ../lib/libfu.a version.o $(LIBS)
  132.  
  133. cp: cp.o cp-hash.o cp-aux.o
  134.     $(link_command) cp.o cp-hash.o cp-aux.o ../lib/libfu.a version.o $(LIBS)
  135.  
  136. dd: dd.o
  137.     $(link_command) dd.o ../lib/libfu.a version.o $(LIBS)
  138.  
  139. df: df.o
  140.     $(link_command) df.o ../lib/libfu.a version.o $(LIBS)
  141.  
  142. dir: ls.o ls-dir.o
  143.     $(link_command) ls.o ls-dir.o ../lib/libfu.a version.o $(LIBS)
  144.  
  145. du: du.o
  146.     $(link_command) du.o ../lib/libfu.a version.o $(LIBS)
  147.  
  148. ginstall: install.o
  149.     $(link_command) install.o ../lib/libfu.a version.o $(LIBS)
  150.  
  151. ln: ln.o
  152.     $(link_command) ln.o ../lib/libfu.a version.o $(LIBS)
  153.  
  154. ls: ls.o ls-ls.o
  155.     $(link_command) ls.o ls-ls.o ../lib/libfu.a version.o $(LIBS)
  156.  
  157. mkdir: mkdir.o
  158.     $(link_command) mkdir.o ../lib/libfu.a version.o $(LIBS)
  159.  
  160. mkfifo: mkfifo.o
  161.     $(link_command) mkfifo.o ../lib/libfu.a version.o $(LIBS)
  162.  
  163. mknod: mknod.o
  164.     $(link_command) mknod.o ../lib/libfu.a version.o $(LIBS)
  165.  
  166. mv: mv.o
  167.     $(link_command) mv.o ../lib/libfu.a version.o $(LIBS)
  168.  
  169. mvdir: mvdir.o
  170.     $(link_command) mvdir.o ../lib/libfu.a version.o $(LIBS)
  171.  
  172. rm: rm.o
  173.     $(link_command) rm.o ../lib/libfu.a version.o $(LIBS)
  174.  
  175. rmdir: rmdir.o
  176.     $(link_command) rmdir.o ../lib/libfu.a version.o $(LIBS)
  177.  
  178. sync: sync.o
  179.     $(link_command) sync.o ../lib/libfu.a version.o $(LIBS)
  180.  
  181. touch: touch.o
  182.     $(link_command) touch.o ../lib/libfu.a version.o $(LIBS)
  183.  
  184. vdir: ls.o ls-vdir.o
  185.     $(link_command) ls.o ls-vdir.o ../lib/libfu.a version.o $(LIBS)
  186.  
  187.  
  188. $(PROGS) $(LIBPROGS): ../lib/libfu.a version.o
  189. $(OBJECTS): ../lib/pathmax.h
  190.  
  191. chmod.o: ../lib/modechange.h 
  192. cp-aux.o: cp.h 
  193. cp-hash.o: cp.h 
  194. cp.o: cp.h ../lib/backupfile.h 
  195. df.o: ../lib/mountlist.h ../lib/fsusage.h 
  196. install.o: ../lib/modechange.h 
  197. ln.o: ../lib/backupfile.h 
  198. ls.o: ls.h
  199. mkdir.o: ../lib/modechange.h 
  200. mkfifo.o: ../lib/modechange.h 
  201. mknod.o: ../lib/modechange.h 
  202. mv.o: ../lib/backupfile.h 
  203. install.o mkdir.o: ../lib/makepath.h
  204.  
  205. # Make all .o files depend on these files even though there are a few
  206. # unnecessary dependencies.
  207. $(OBJECTS): ../config.h system.h version.h
  208.  
  209. # Tell versions [3.59,3.63) of GNU make not to export all variables.
  210. # Otherwise a system limit (for SysV at least) may be exceeded.
  211. .NOEXPORT:
  212.