Makefile.in 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201
  1. # Un*x Makefile for GNU tar program.
  2. # Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc.
  3. # This program is free software; you can redistribute it and/or modify
  4. # it under the terms of the GNU General Public License as published by
  5. # the Free Software Foundation; either version 2, or (at your option)
  6. # any later version.
  7. # This program is distributed in the hope that it will be useful,
  8. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. # GNU General Public License for more details.
  11. # You should have received a copy of the GNU General Public License
  12. # along with this program; if not, write to the Free Software
  13. # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  14. #### Start of system configuration section. ####
  15. srcdir = @srcdir@
  16. VPATH = @srcdir@
  17. # If you use gcc, you should either run the fixincludes script that
  18. # comes with it or else use gcc with the -traditional option. Otherwise
  19. # ioctl calls will be compiled incorrectly on some systems.
  20. CC = @CC@
  21. YACC = @YACC@
  22. INSTALL = @INSTALL@
  23. INSTALL_PROGRAM = @INSTALL_PROGRAM@
  24. INSTALL_DATA = @INSTALL_DATA@
  25. # Things you might add to DEFS:
  26. # -DSTDC_HEADERS If you have ANSI C headers and libraries.
  27. # -DHAVE_UNISTD_H If you have unistd.h.
  28. # -DHAVE_STRING_H If you don't have ANSI C headers but have string.h.
  29. # -DHAVE_LIMITS_H If you have limits.h.
  30. # -DBSD42 If you have sys/dir.h (unless you use -DPOSIX),
  31. # sys/file.h, and st_blocks in `struct stat'.
  32. # -DDIRENT If you have dirent.h.
  33. # -DSYSNDIR Old Xenix systems (sys/ndir.h).
  34. # -DSYSDIR Old BSD systems (sys/dir.h).
  35. # -DNDIR Old System V systems (ndir.h).
  36. # -DMAJOR_IN_MKDEV If major, minor, makedev defined in sys/mkdev.h.
  37. # -DMAJOR_IN_SYSMACROS If major, minor, makedev defined in sys/sysmacros.h.
  38. # -DRETSIGTYPE=int If your signal handlers return int, not void.
  39. # -DHAVE_SYS_MTIO_H If you have sys/mtio.h (magtape ioctls).
  40. # -DHAVE_SYS_GENTAPE_H If you have sys/gentape.h (ISC magtape ioctls).
  41. # -DHAVE_NETDB_H To use rexec for remote tape operations
  42. # instead of forking rsh or remsh.
  43. # -DNO_REMOTE If you have neither a remote shell nor rexec.
  44. # -DHAVE_VPRINTF If you have vprintf function.
  45. # -DHAVE_DOPRNT If you have _doprnt function (but lack vprintf).
  46. # -DHAVE_FTIME If you have ftime system call.
  47. # -DHAVE_STRSTR If you have strstr function.
  48. # -DHAVE_VALLOC If you have valloc function.
  49. # -DHAVE_MKDIR If you have mkdir and rmdir system calls.
  50. # -DHAVE_MKNOD If you have mknod system call.
  51. # -DHAVE_RENAME If you have rename system call.
  52. # -DHAVE_GETCWD If not POSIX.1 but have getcwd function.
  53. # -DHAVE_FTRUNCATE If you have ftruncate system call.
  54. # -DV7 On Version 7 Unix (not tested in a long time).
  55. # -DEMUL_OPEN3 If you lack a 3-argument version of open, and want
  56. # to emulate it with system calls you do have.
  57. # -DNO_OPEN3 If you lack the 3-argument open and want to
  58. # disable the tar -k option instead of emulating open.
  59. # -DXENIX If you have sys/inode.h and need it to be included.
  60. DEF_AR_FILE = @DEF_AR_FILE@
  61. DEFBLOCKING = 20
  62. DEFS = @DEFS@ -DDEF_AR_FILE=\"$(DEF_AR_FILE)\" -DDEFBLOCKING=$(DEFBLOCKING)
  63. # Set this to rtapelib.o unless you defined NO_REMOTE, in which case
  64. # make it empty.
  65. RTAPELIB = @RTAPELIB@
  66. LIBS = @LIBS@
  67. CFLAGS = -g
  68. LDFLAGS = -g
  69. prefix = /usr/local
  70. exec_prefix = $(prefix)
  71. # Prefix for each installed program, normally empty or `g'.
  72. binprefix =
  73. # The directory to install tar in.
  74. bindir = $(exec_prefix)/bin
  75. # Where to put the rmt executable.
  76. libdir = $(exec_prefix)/lib
  77. # The directory to install the info files in.
  78. infodir = $(prefix)/info
  79. #### End of system configuration section. ####
  80. SHELL = /bin/sh
  81. SRC1 = tar.c create.c extract.c buffer.c getoldopt.c update.c gnu.c mangle.c
  82. SRC2 = version.c list.c names.c diffarch.c port.c fnmatch.c getopt.c malloc.c
  83. SRC3 = getopt1.c regex.c getdate.y getdate.c alloca.c
  84. SRCS = $(SRC1) $(SRC2) $(SRC3)
  85. OBJ1 = tar.o create.o extract.o buffer.o getoldopt.o update.o gnu.o mangle.o
  86. OBJ2 = version.o list.o names.o diffarch.o port.o fnmatch.o getopt.o @MALLOC@
  87. OBJ3 = getopt1.o regex.o getdate.o $(RTAPELIB) @ALLOCA@
  88. OBJS = $(OBJ1) $(OBJ2) $(OBJ3)
  89. AUX = README INSTALL NEWS COPYING ChangeLog Makefile.in makefile.pc \
  90. configure configure.in mkinstalldirs \
  91. tar.h fnmatch.h pathmax.h port.h open3.h getopt.h regex.h \
  92. rmt.h rmt.c rtapelib.c \
  93. msd_dir.h msd_dir.c tcexparg.c \
  94. level-0 level-1 backup-specs dump-remind testpad.c getpagesize.h
  95. # tar.texinfo tar.info* texinfo.tex
  96. all: @PROGS@
  97. # tar.info
  98. .c.o:
  99. $(CC) -c $(CPPFLAGS) $(DEFS) -I. -I$(srcdir) $(CFLAGS) $<
  100. tar: $(OBJS)
  101. $(CC) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)
  102. rmt: rmt.c
  103. $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(srcdir)/rmt.c $(LIBS)
  104. tar.info: tar.texinfo
  105. makeinfo $(srcdir)/tar.texinfo
  106. install: all installdirs
  107. $(INSTALL_PROGRAM) tar $(bindir)/$(binprefix)tar
  108. -test ! -f rmt || $(INSTALL_PROGRAM) rmt $(libdir)/rmt
  109. # for file in $(srcdir)/tar.info*; \
  110. # do $(INSTALL_DATA) $$file $(infodir)/$$file; \
  111. # done
  112. uninstall:
  113. rm -f $(bindir)/$(binprefix)tar $(infodir)/tar.info*
  114. -rm -f $(libdir)/rmt
  115. installdirs:
  116. $(SHELL) ${srcdir}/mkinstalldirs $(bindir) $(libdir) $(infodir)
  117. Makefile: Makefile.in config.status
  118. $(SHELL) config.status
  119. config.status: configure
  120. $(SHELL) config.status --recheck
  121. configure: configure.in
  122. cd $(srcdir); autoconf
  123. $(OBJS): tar.h pathmax.h port.h testpad.h
  124. regex.o buffer.o tar.o: regex.h
  125. tar.o fnmatch.o: fnmatch.h
  126. getdate.c: getdate.y
  127. $(YACC) $(srcdir)/getdate.y
  128. mv y.tab.c getdate.c
  129. # getdate.y has 8 shift/reduce conflicts.
  130. testpad.h: testpad
  131. ./testpad
  132. testpad: testpad.o
  133. $(CC) -o $@ testpad.o
  134. TAGS: $(SRCS)
  135. etags $(SRCS)
  136. clean:
  137. rm -f *.o tar rmt testpad testpad.h core
  138. mostlyclean: clean
  139. distclean: clean
  140. rm -f Makefile config.status
  141. realclean: distclean
  142. rm -f TAGS *.info* getdate.c y.tab.c
  143. shar: $(SRCS) $(AUX)
  144. shar $(SRCS) $(AUX) | gzip > tar-`sed -e '/version_string/!d' -e 's/[^0-9.]*\([0-9.]*\).*/\1/' -e q version.c`.shar.z
  145. dist: $(SRCS) $(AUX)
  146. echo tar-`sed -e '/version_string/!d' -e 's/[^0-9.]*\([0-9.]*\).*/\1/' -e q version.c` > .fname
  147. -rm -rf `cat .fname`
  148. mkdir `cat .fname`
  149. for file in $(SRCS) $(AUX); do \
  150. ln $$file `cat .fname` || cp $$file `cat .fname`; done
  151. tar chzf `cat .fname`.tar.z `cat .fname`
  152. -rm -rf `cat .fname` .fname
  153. tar.zoo: $(SRCS) $(AUX)
  154. -rm -rf tmp.dir
  155. -mkdir tmp.dir
  156. -rm tar.zoo
  157. for X in $(SRCS) $(AUX) ; do echo $$X ; sed 's/$$/ /' $$X > tmp.dir/$$X ; done
  158. cd tmp.dir ; zoo aM ../tar.zoo *
  159. -rm -rf tmp.dir
  160. # Prevent GNU make v3 from overflowing arg limit on SysV.
  161. .NOEXPORT: