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