update init.d to clean new state location /var/lib/sudo, prepare to upload
[debian/sudo] / Makefile.in
1 #
2 # Copyright (c) 1996, 1998-2005, 2007-2009
3 #       Todd C. Miller <Todd.Miller@courtesan.com>
4 #
5 # Permission to use, copy, modify, and distribute this software for any
6 # purpose with or without fee is hereby granted, provided that the above
7 # copyright notice and this permission notice appear in all copies.
8 #
9 # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10 # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11 # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12 # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13 # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15 # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16 # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
17 #
18 # Sponsored in part by the Defense Advanced Research Projects
19 # Agency (DARPA) and Air Force Research Laboratory, Air Force
20 # Materiel Command, USAF, under agreement number F39502-99-1-0512.
21 #
22 # @configure_input@
23 #
24
25 #### Start of system configuration section. ####
26
27 srcdir = @srcdir@
28 devdir = @devdir@
29 authdir = $(srcdir)/auth
30 top_builddir = .
31
32 # Compiler & tools to use
33 CC = @CC@
34 FLEX = @FLEX@
35 YACC = @YACC@
36 NROFF = nroff -Tascii
37 LIBTOOL = @LIBTOOL@
38
39 # Our install program supports extra flags...
40 INSTALL = $(SHELL) $(srcdir)/install-sh -c
41
42 # Libraries
43 LIBS = @LIBS@
44 NET_LIBS = @NET_LIBS@
45 SUDO_LIBS = @SUDO_LIBS@ @AFS_LIBS@ @GETGROUPS_LIB@ $(LIBS) $(NET_LIBS)
46
47 # C preprocessor flags
48 CPPFLAGS = -I. -I$(srcdir) @CPPFLAGS@
49
50 # Usually -O and/or -g
51 CFLAGS = @CFLAGS@
52
53 # Flags to pass to the link stage
54 LDFLAGS = @LDFLAGS@
55 SUDO_LDFLAGS = @SUDO_LDFLAGS@ $(LDFLAGS)
56
57 # Where to install things...
58 prefix = @prefix@
59 exec_prefix = @exec_prefix@
60 bindir = @bindir@
61 sbindir = @sbindir@
62 sysconfdir = @sysconfdir@
63 libexecdir = @libexecdir@
64 datarootdir = @datarootdir@
65 mandir = @mandir@
66 noexecfile = @NOEXECFILE@
67 noexecdir = @NOEXECDIR@
68
69 # Directory in which to install sudo.
70 sudodir = $(bindir)
71
72 # Directory in which to install visudo
73 visudodir = $(sbindir)
74
75 # Directory in which to install the sudoers file
76 sudoersdir = $(sysconfdir)
77
78 # Directory in which to install the man page
79 mantype = @MANTYPE@
80 mansectsu = @mansectsu@
81 mansectform = @mansectform@
82 mandirsu = $(mandir)/$(mantype)$(mansectsu)
83 mandirform = $(mandir)/$(mantype)$(mansectform)
84
85 # User and group ids the installed files should be "owned" by
86 install_uid = 0
87 install_gid = 0
88
89 # User, group, and mode the sudoers file should be "owned" by (configure)
90 sudoers_uid = @SUDOERS_UID@
91 sudoers_gid = @SUDOERS_GID@
92 sudoers_mode = @SUDOERS_MODE@
93
94 # Pass in paths and uid/gid + OS dependent defined
95 DEFS = @OSDEFS@ -D_PATH_SUDOERS=\"$(sudoersdir)/sudoers\" -DSUDOERS_UID=$(sudoers_uid) -DSUDOERS_GID=$(sudoers_gid) -DSUDOERS_MODE=$(sudoers_mode)
96
97 #### End of system configuration section. ####
98
99 SHELL = @SHELL@
100
101 PROGS = @PROGS@
102
103 SRCS = aix.c alias.c alloc.c audit.c bsm_audit.c check.c closefrom.c \
104        def_data.c defaults.c env.c error.c fileops.c find_path.c fnmatch.c \
105        getcwd.c getprogname.c getspwuid.c gettime.c glob.c goodpath.c gram.c \
106        gram.y interfaces.c isblank.c lbuf.c ldap.c list.c logging.c match.c \
107        mkstemp.c memrchr.c parse.c pwutil.c  set_perms.c sigaction.c \
108        snprintf.c strcasecmp.c strerror.c strlcat.c strlcpy.c sudo.c \
109        sudo_noexec.c sudo_edit.c sudo_nss.c term.c testsudoers.c tgetpass.c \
110        toke.c toke.l tsgetgrpw.c utimes.c vasgroups.c visudo.c zero_bytes.c \
111        redblack.c selinux.c sesh.c $(AUTH_SRCS)
112
113 AUTH_SRCS = auth/afs.c auth/aix_auth.c auth/bsdauth.c auth/dce.c auth/fwtk.c \
114             auth/kerb4.c auth/kerb5.c auth/pam.c auth/passwd.c auth/rfc1938.c \
115             auth/secureware.c auth/securid.c auth/securid5.c auth/sia.c \
116             auth/sudo_auth.c
117
118 HDRS = bsm_audit.h compat.h def_data.h defaults.h error.h ins_2001.h \
119        ins_classic.h ins_csops.h ins_goons.h insults.h interfaces.h lbuf.h \
120        list.h logging.h nonunix.h redblack.h parse.h sudo.h sudo_nss.h gram.h \
121        auth/sudo_auth.h emul/charclass.h emul/fnmatch.h emul/glob.h \
122        emul/timespec.h emul/utime.h
123
124 AUTH_OBJS = sudo_auth.o @AUTH_OBJS@
125
126 # Note: gram.o must come first here
127 COMMON_OBJS = gram.o alias.o alloc.o defaults.o error.o list.o match.o \
128               toke.o redblack.o zero_bytes.o @NONUNIX_GROUPS_IMPL@
129
130 SUDO_OBJS = $(COMMON_OBJS) $(AUTH_OBJS) @SUDO_OBJS@ audit.o check.o env.o \
131             getspwuid.o gettime.o goodpath.o fileops.o find_path.o \
132             interfaces.o lbuf.o logging.o parse.o pwutil.o set_perms.o \
133             sudo.o sudo_edit.o sudo_nss.o term.o tgetpass.o
134
135 VISUDO_OBJS = $(COMMON_OBJS) visudo.o fileops.o gettime.o goodpath.o \
136               find_path.o pwutil.o
137
138 TEST_OBJS = $(COMMON_OBJS) interfaces.o testsudoers.o tsgetgrpw.o tspwutil.o
139
140 LIB_OBJS = @LIBOBJS@
141
142 VERSION = @PACKAGE_VERSION@
143
144 DISTFILES = $(SRCS) $(HDRS) ChangeLog HISTORY INSTALL INSTALL.configure \
145             LICENSE Makefile.in PORTING README README.LDAP TROUBLESHOOTING \
146             UPGRADE WHATSNEW aclocal.m4 acsite.m4 aixcrypt.exp config.guess \
147             config.h.in config.sub configure configure.in def_data.in \
148             indent.pro install-sh ltmain.sh mkdefaults mkinstalldirs \
149             pathnames.h.in sample.pam sample.syslog.conf sample.sudoers \
150             schema.ActiveDirectory schema.OpenLDAP schema.iPlanet sudo.cat \
151             sudo.man.in sudo.pod sudo.psf sudo_usage.h.in sudoers sudoers.cat \
152             sudoers.man.in sudoers.pod sudoers.ldap.cat sudoers.ldap.man.in \
153             sudoers.ldap.pod sudoers2ldif visudo.cat visudo.man.in visudo.pod \
154             auth/API sudo.man.pl sudoers.man.pl
155
156 BINFILES= ChangeLog HISTORY LICENSE README TROUBLESHOOTING \
157           UPGRADE install-sh mkinstalldirs sample.syslog.conf sample.sudoers \
158           sudo sudo.cat sudo.man sudo.pod sudoers sudoers.cat sudoers.man \
159           sudoers.pod visudo visudo.cat visudo.man visudo.pod
160
161 BINSPECIAL= INSTALL.binary Makefile.binary.in libtool
162
163 SUDODEP = $(srcdir)/sudo.h $(srcdir)/compat.h $(srcdir)/defaults.h \
164           $(srcdir)/error.h $(srcdir)/list.h $(srcdir)/logging.h \
165           $(srcdir)/sudo_nss.h $(devdir)/def_data.h pathnames.h config.h
166
167 AUTHDEP = $(SUDODEP) $(authdir)/sudo_auth.h
168
169 INSDEP = $(srcdir)/ins_2001.h $(srcdir)/ins_classic.h $(srcdir)/ins_csops.h \
170          $(srcdir)/ins_goons.h $(srcdir)/insults.h
171
172 all: $(PROGS)
173
174 .SUFFIXES: .o .c .h .l .y .man .cat .lo
175
176 .c.o:
177         $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $<
178
179 .c.lo:
180         $(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $<
181
182 .man.cat:
183         @rm -f $@
184         sed '1s/^/.if n .ll 78n/' $< | $(NROFF) -man > $@
185
186 sudo: $(SUDO_OBJS) $(LIB_OBJS)
187         $(CC) -o $@ $(SUDO_OBJS) $(LIB_OBJS) $(SUDO_LDFLAGS) $(SUDO_LIBS)
188
189 visudo: $(VISUDO_OBJS) $(LIB_OBJS)
190         $(CC) -o $@ $(VISUDO_OBJS) $(LIB_OBJS) $(LDFLAGS) $(LIBS) $(NET_LIBS)
191
192 testsudoers: $(TEST_OBJS) $(LIB_OBJS)
193         $(CC) -o $@ $(TEST_OBJS) $(LIB_OBJS) $(LDFLAGS) $(LIBS) $(NET_LIBS)
194
195 sudo_noexec.lo: $(srcdir)/sudo_noexec.c
196         $(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/sudo_noexec.c
197
198 sudo_noexec.la: sudo_noexec.lo
199         $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o $@ sudo_noexec.lo -avoid-version -rpath $(noexecdir)
200
201 # Uncomment the following if you want "make distclean" to clean the parser
202 @DEV@GENERATED = gram.h gram.c toke.c def_data.c def_data.h
203
204 # Uncomment the lines before -@true if you intend to modify gram.y
205 $(devdir)/gram.c: $(srcdir)/gram.y
206 @DEV@   $(YACC) -d $(srcdir)/gram.y
207 @DEV@   mv -f y.tab.c gram.c
208 @DEV@   if cmp -s y.tab.h gram.h; then rm -f y.tab.h; else mv -f y.tab.h gram.h; fi
209         -@true
210
211 # Uncomment the lines before -@true if you intend to modify toke.l
212 $(devdir)/toke.c: $(srcdir)/toke.l
213 @DEV@   $(FLEX) $(srcdir)/toke.l
214 @DEV@   mv -f lex.yy.c toke.c
215         -@true
216
217 # Uncomment the following if you intend to modify def_data.in
218 @DEV@$(devdir)/def_data.h $(devdir)/def_data.c: $(srcdir)/def_data.in
219 @DEV@   perl $(srcdir)/mkdefaults -o def_data $(srcdir)/def_data.in
220
221 # Dependencies (not counting auth functions)
222 aix.o: $(srcdir)/aix.c
223         $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/aix.c
224 alias.o: $(srcdir)/alias.c $(SUDODEP) $(srcdir)/parse.h $(srcdir)/list.h $(srcdir)/redblack.h
225         $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/alias.c
226 alloc.o: $(srcdir)/alloc.c $(SUDODEP)
227         $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/alloc.c
228 audit.o: $(srcdir)/audit.c $(SUDODEP)
229         $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/audit.c
230 bsm_audit.o: $(srcdir)/bsm_audit.c $(SUDODEP) bsm_audit.h
231         $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/bsm_audit.c
232 check.o: $(srcdir)/check.c $(SUDODEP)
233         $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/check.c
234 closefrom.o: $(srcdir)/closefrom.c config.h
235         $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/closefrom.c
236 defaults.o: $(srcdir)/defaults.c $(SUDODEP) $(srcdir)/def_data.c $(authdir)/sudo_auth.h $(devdir)/gram.h
237         $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/defaults.c
238 env.o: $(srcdir)/env.c $(SUDODEP)
239         $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/env.c
240 error.o: $(srcdir)/error.c $(srcdir)/compat.h $(srcdir)/error.h config.h
241         $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/error.c
242 fileops.o: $(srcdir)/fileops.c $(SUDODEP)
243         $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/fileops.c
244 find_path.o: $(srcdir)/find_path.c $(SUDODEP)
245         $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/find_path.c
246 fnmatch.o: $(srcdir)/fnmatch.c $(srcdir)/emul/fnmatch.h $(srcdir)/compat.h config.h
247         $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/fnmatch.c
248 getcwd.o: $(srcdir)/getcwd.c $(srcdir)/compat.h config.h
249         $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/getcwd.c
250 getprogname.o: $(srcdir)/getprogname.c config.h
251         $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/getprogname.c
252 getspwuid.o: $(srcdir)/getspwuid.c $(SUDODEP)
253         $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/getspwuid.c
254 gettime.o: $(srcdir)/gettime.c $(SUDODEP)
255         $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/gettime.c
256 glob.o: $(srcdir)/glob.c $(srcdir)/emul/glob.h $(srcdir)/compat.h config.h
257         $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/glob.c
258 goodpath.o: $(srcdir)/goodpath.c $(SUDODEP)
259         $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/goodpath.c
260 gram.o: $(devdir)/gram.c $(SUDODEP) $(srcdir)/parse.h $(srcdir)/list.h $(devdir)/gram.h
261         $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(devdir)/gram.c
262 interfaces.o: $(srcdir)/interfaces.c $(SUDODEP) $(srcdir)/interfaces.h
263         $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/interfaces.c
264 isblank.o: $(srcdir)/isblank.c $(srcdir)/compat.h config.h
265         $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/isblank.c
266 lbuf.o: $(srcdir)/lbuf.c $(SUDODEP)
267         $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/lbuf.c
268 ldap.o: $(srcdir)/ldap.c $(SUDODEP) $(srcdir)/parse.h $(srcdir)/list.h
269         $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/ldap.c
270 list.o: $(srcdir)/list.c $(SUDODEP)
271         $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/list.c
272 logging.o: $(srcdir)/logging.c $(SUDODEP)
273         $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/logging.c
274 match.o: $(srcdir)/match.c $(SUDODEP) $(srcdir)/parse.h $(srcdir)/list.h $(srcdir)/interfaces.h $(devdir)/gram.h
275         $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/match.c
276 memrchr.o: $(srcdir)/memrchr.c $(SUDODEP)
277         $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/memrchr.c
278 mkstemp.o: $(srcdir)/mkstemp.c $(SUDODEP)
279         $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/mkstemp.c
280 parse.o: $(srcdir)/parse.c $(SUDODEP) $(srcdir)/parse.h $(srcdir)/list.h $(devdir)/gram.h
281         $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/parse.c
282 pwutil.o: $(srcdir)/pwutil.c $(SUDODEP)
283         $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/pwutil.c
284 redblack.o: $(srcdir)/redblack.c $(SUDODEP) $(srcdir)/redblack.h
285         $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/redblack.c
286 set_perms.o: $(srcdir)/set_perms.c $(SUDODEP)
287         $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/set_perms.c
288 sigaction.o: $(srcdir)/sigaction.c $(srcdir)/compat.h
289         $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/sigaction.c
290 snprintf.o: $(srcdir)/snprintf.c $(srcdir)/compat.h config.h
291         $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/snprintf.c
292 strcasecmp.o: $(srcdir)/strcasecmp.c $(srcdir)/compat.h  config.h
293         $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/strcasecmp.c
294 strerror.o: $(srcdir)/strerror.c $(srcdir)/compat.h config.h
295         $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/strerror.c
296 strlcat.o: $(srcdir)/strlcat.c $(srcdir)/compat.h config.h
297         $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/strlcat.c
298 strlcpy.o: $(srcdir)/strlcpy.c $(srcdir)/compat.h config.h
299         $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/strlcpy.c
300 selinux.o: $(srcdir)/selinux.c $(SUDODEP)
301         $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/selinux.c
302 sudo.o: $(srcdir)/sudo.c $(SUDODEP) sudo_usage.h $(srcdir)/interfaces.h
303         $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/sudo.c
304 sudo_edit.o: $(srcdir)/sudo_edit.c $(SUDODEP)
305         $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/sudo_edit.c
306 sudo_noexec.o: $(srcdir)/sudo_noexec.c $(srcdir)/compat.h config.h
307         $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/sudo_noexec.c
308 sudo_nss.o: $(srcdir)/sudo_nss.c $(SUDODEP)
309         $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/sudo_nss.c
310 term.o: $(srcdir)/term.c $(SUDODEP)
311         $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/term.c
312 testsudoers.o: $(srcdir)/testsudoers.c $(SUDODEP) $(srcdir)/parse.h $(srcdir)/list.h $(srcdir)/interfaces.h $(devdir)/gram.h
313         $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/testsudoers.c
314 tgetpass.o: $(srcdir)/tgetpass.c $(SUDODEP)
315         $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/tgetpass.c
316 toke.o: $(devdir)/toke.c $(SUDODEP) $(srcdir)/parse.h $(srcdir)/list.h $(devdir)/gram.h
317         $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(devdir)/toke.c
318 tsgetgrpw.o: $(srcdir)/tsgetgrpw.c $(SUDODEP)
319         $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/tsgetgrpw.c
320 utimes.o: $(srcdir)/utimes.c $(srcdir)/compat.h $(srcdir)/emul/utime.h config.h
321         $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/utimes.c
322 vasgroups.o: $(srcdir)/vasgroups.c $(srcdir)/nonunix.h $(SUDODEP)
323         $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/vasgroups.c
324 visudo.o: $(srcdir)/visudo.c $(SUDODEP) $(devdir)/gram.h
325         $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/visudo.c
326 zero_bytes.o: $(srcdir)/zero_bytes.c $(srcdir)/compat.h config.h
327         $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/zero_bytes.c
328
329 # Private copy of pwutil.o with MYPW defined for testsudoers
330 tspwutil.o: $(srcdir)/pwutil.c $(SUDODEP)
331         $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) -DMYPW -o tspwutil.o $(srcdir)/pwutil.c
332
333 sudo_auth.o: $(authdir)/sudo_auth.c $(AUTHDEP) $(INSDEP)
334         $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(authdir)/sudo_auth.c
335 afs.o: $(authdir)/afs.c $(AUTHDEP)
336         $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(authdir)/afs.c
337 aix_auth.o: $(authdir)/aix_auth.c $(AUTHDEP)
338         $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(authdir)/aix_auth.c
339 bsdauth.o: $(authdir)/bsdauth.c $(AUTHDEP)
340         $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(authdir)/bsdauth.c
341 dce.o: $(authdir)/dce.c $(AUTHDEP)
342         $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(authdir)/dce.c
343 fwtk.o: $(authdir)/fwtk.c $(AUTHDEP)
344         $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(authdir)/fwtk.c
345 kerb4.o: $(authdir)/kerb4.c $(AUTHDEP)
346         $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(authdir)/kerb4.c
347 kerb5.o: $(authdir)/kerb5.c $(AUTHDEP)
348         $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(authdir)/kerb5.c
349 pam.o: $(authdir)/pam.c $(AUTHDEP)
350         $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(authdir)/pam.c
351 passwd.o: $(authdir)/passwd.c $(AUTHDEP)
352         $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(authdir)/passwd.c
353 rfc1938.o: $(authdir)/rfc1938.c $(AUTHDEP)
354         $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(authdir)/rfc1938.c
355 secureware.o: $(authdir)/secureware.c $(AUTHDEP)
356         $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(authdir)/secureware.c
357 securid.o: $(authdir)/securid.c $(AUTHDEP)
358         $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(authdir)/securid.c
359 securid5.o: $(authdir)/securid5.c $(AUTHDEP)
360         $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(authdir)/securid5.c
361 sia.o: $(authdir)/sia.c $(AUTHDEP)
362         $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(authdir)/sia.c
363
364 sudo.man.in: $(srcdir)/sudo.pod
365         @rm -f $(srcdir)/$@
366         ( cd $(srcdir); mansectsu=`echo @MANSECTSU@|tr A-Z a-z`; mansectform=`echo @MANSECTFORM@|tr A-Z a-z`; sed -n -e '/^=pod/q' -e 's/^/.\\" /p' sudo.pod > $@; pod2man --quotes=none --date="`date '+%B %e, %Y'`" --section=$$mansectsu --release=$(VERSION) --center="MAINTENANCE COMMANDS" sudo.pod | sed -e "s/(5)/($$mansectform)/" -e "s/(8)/($$mansectsu)/" | perl -p sudo.man.pl >> $@ )
367
368 sudo.man: sudo.man.in
369         CONFIG_FILES=$@ CONFIG_HEADERS= sh ./config.status
370
371 sudo.cat: sudo.man
372
373 visudo.man.in: $(srcdir)/visudo.pod
374         @rm -f $(srcdir)/$@
375         ( cd $(srcdir); mansectsu=`echo @MANSECTSU@|tr A-Z a-z`; mansectform=`echo @MANSECTFORM@|tr A-Z a-z`; sed -n -e '/^=pod/q' -e 's/^/.\\" /p' visudo.pod > $@; pod2man --quotes=none --date="`date '+%B %e, %Y'`" --section=$$mansectsu --release=$(VERSION) --center="MAINTENANCE COMMANDS" visudo.pod | sed -e "s/(5)/($$mansectform)/" -e "s/(8)/($$mansectsu)/" -e 's|\\fI\\f\((CW*\)*I@\([^@]*\)\\fI@|\\fI@\2@|g' >> $@ )
376
377 visudo.man: visudo.man.in
378         CONFIG_FILES=$@ CONFIG_HEADERS= sh ./config.status
379
380 visudo.cat: visudo.man
381
382 sudoers.man.in: $(srcdir)/sudoers.pod
383         @rm -f $(srcdir)/$@
384         ( cd $(srcdir); mansectsu=`echo @MANSECTSU@|tr A-Z a-z`; mansectform=`echo @MANSECTFORM@|tr A-Z a-z`; sed -n -e '/^=pod/q' -e 's/^/.\\" /p' sudoers.pod > $@; pod2man --quotes=none --date="`date '+%B %e, %Y'`" --section=$$mansectform --release=$(VERSION) --center="MAINTENANCE COMMANDS" sudoers.pod | sed -e "s/(5)/($$mansectform)/" -e "s/(8)/($$mansectsu)/" | perl -p sudoers.man.pl >> $@ )
385
386 sudoers.man:: sudoers.man.in
387         CONFIG_FILES=$@ CONFIG_HEADERS= sh ./config.status
388
389 sudoers.cat: sudoers.man
390
391 sudoers.ldap.man.in: $(srcdir)/sudoers.ldap.pod
392         @rm -f $(srcdir)/$@
393         ( cd $(srcdir); mansectsu=`echo @MANSECTSU@|tr A-Z a-z`; mansectform=`echo @MANSECTFORM@|tr A-Z a-z`; sed -n -e '/^=pod/q' -e 's/^/.\\" /p' sudoers.ldap.pod > $@; pod2man --quotes=none --date="`date '+%B %e, %Y'`" --section=$$mansectform --release=$(VERSION) --center="MAINTENANCE COMMANDS" sudoers.ldap.pod | sed -e "s/(5)/($$mansectform)/" -e "s/(8)/($$mansectsu)/" -e 's|\\fI\\f\((CW*\)*I@\([^@]*\)\\fI@|\\fI@\2@|g' >> $@ )
394
395 sudoers.ldap.man:: sudoers.ldap.man.in
396         CONFIG_FILES=$@ CONFIG_HEADERS= sh ./config.status
397
398 sudoers.ldap.cat: sudoers.ldap.man
399
400 @DEV@HISTORY: history.pod
401 @DEV@   pod2text -l -i0 $> > $@
402 @DEV@
403 @DEV@LICENSE: license.pod
404 @DEV@   pod2text -l -i0 $> | sed '1,2d' > $@
405
406 install: install-dirs install-binaries @INSTALL_NOEXEC@ install-sudoers install-man
407
408 install-dirs:
409         $(SHELL) $(srcdir)/mkinstalldirs $(DESTDIR)$(sudodir) \
410             $(DESTDIR)$(visudodir) $(DESTDIR)$(sudoersdir) \
411             $(DESTDIR)$(mandirsu) $(DESTDIR)$(mandirform) \
412             $(DESTDIR)$(noexecdir)
413
414 install-binaries: install-dirs $(PROGS)
415         $(INSTALL) -O $(install_uid) -G $(install_gid) -M 4111 -s sudo $(DESTDIR)$(sudodir)/sudo
416         rm -f $(DESTDIR)$(sudodir)/sudoedit
417         ln $(DESTDIR)$(sudodir)/sudo $(DESTDIR)$(sudodir)/sudoedit
418         $(INSTALL) -O $(install_uid) -G $(install_gid) -M 0111 -s visudo $(DESTDIR)$(visudodir)/visudo
419 @SELINUX@       $(INSTALL) -O $(install_uid) -G $(install_gid) -M 0111 -s sesh $(DESTDIR)$(libexecdir)/sesh
420
421 install-noexec: install-dirs sudo_noexec.la
422         test -f .libs/$(noexecfile) && $(INSTALL) -O $(install_uid) -G $(install_gid) -M 0755 .libs/$(noexecfile) $(DESTDIR)$(noexecdir)
423
424 install-sudoers: install-dirs
425         test -f $(DESTDIR)$(sudoersdir)/sudoers || \
426             $(INSTALL) -O $(sudoers_uid) -G $(sudoers_gid) -M $(sudoers_mode) \
427                 $(srcdir)/sudoers $(DESTDIR)$(sudoersdir)/sudoers
428
429 install-man: install-dirs
430         $(INSTALL) -O $(install_uid) -G $(install_gid) -M 0444 @mansrcdir@/sudo.$(mantype) $(DESTDIR)$(mandirsu)/sudo.$(mansectsu)
431         @rm -f $(DESTDIR)$(mandirsu)/sudoedit.$(mansectsu)
432         ln $(DESTDIR)$(mandirsu)/sudo.$(mansectsu) $(DESTDIR)$(mandirsu)/sudoedit.$(mansectsu)
433         $(INSTALL) -O $(install_uid) -G $(install_gid) -M 0444 @mansrcdir@/visudo.$(mantype) $(DESTDIR)$(mandirsu)/visudo.$(mansectsu)
434         $(INSTALL) -O $(install_uid) -G $(install_gid) -M 0444 @mansrcdir@/sudoers.$(mantype) $(DESTDIR)$(mandirform)/sudoers.$(mansectform)
435         @LDAP@$(INSTALL) -O $(install_uid) -G $(install_gid) -M 0444 @mansrcdir@/sudoers.ldap.$(mantype) $(DESTDIR)$(mandirform)/sudoers.ldap.$(mansectform)
436 @MAN_POSTINSTALL@
437
438 check:
439         @echo nothing to check
440
441 clean:
442         -rm -f *.o *.lo stamp-* $(PROGS) testsudoers core *.core core.*
443
444 mostlyclean: clean
445
446 distclean: clean
447         -rm -rf Makefile pathnames.h config.h config.status config.cache \
448                 config.log libtool sudo_noexec.lo .libs $(GENERATED) \
449                 sudo.man sudoers.man sudoers.ldap.man visudo.man sudo_usage.h \
450                 Makefile.binary
451
452 clobber: distclean
453
454 realclean: distclean
455         rm -f TAGS tags
456
457 cleandir: realclean
458
459 dist:
460         pax -w -x ustar -s '/^/sudo-$(VERSION)\//' -f ../sudo-$(VERSION).tar \
461                 $(DISTFILES)
462         gzip -9f ../sudo-$(VERSION).tar
463         ls -l ../sudo-$(VERSION).tar.gz
464
465 bindist:
466         ( \
467           ARCH=`uname -m|sed 's:/:_:g'`+`uname -sr|sed 's/ /_/g'` ; \
468           mkdir tmp.$$ARCH ; \
469           tdir=tmp.$$ARCH/sudo-$(VERSION) ; \
470           mkdir $$tdir ; \
471           for i in $(BINFILES) ; do \
472             if [ -f $$i ]; then \
473               cp $$i $$tdir ; \
474             elif [ -f $(srcdir)/$$i ]; then \
475               cp $(srcdir)/$$i $$tdir ; \
476             else \
477               echo cannot find $$i ; \
478               exit 1 ; \
479             fi ; \
480           done ; \
481           if [ -f sudo_noexec.la ]; then \
482             cp libtool $$tdir ; \
483             $(LIBTOOL) --mode=install $(INSTALL) sudo_noexec.la `pwd`/$$tdir ; \
484             ln $$tdir/sudo_noexec.la $$tdir/sudo_noexec.lai ; \
485             ln -s . $$tdir/.libs ; \
486           fi ; \
487           cp $(srcdir)/INSTALL.binary $$tdir/INSTALL ; \
488           sh ./config.status --file=Makefile.binary && cp Makefile.binary $$tdir/Makefile ; \
489           strip $$tdir/sudo ; \
490           strip $$tdir/visudo ; \
491           cd tmp.$$ARCH && tar Ocf ../sudo-$(VERSION)-$$ARCH.tar sudo-$(VERSION) && cd .. ; \
492           gzip -f --best sudo-$(VERSION)-$$ARCH.tar ; \
493           rm -rf tmp.$$ARCH ; \
494         )
495
496 depot:
497         ( \
498           tdir=tmp.depot ; \
499           mkdir $$tdir ; \
500           for i in sudo visudo sudo.man visudo.man sudoers.man sudoers ChangeLog HISTORY LICENSE README TROUBLESHOOTING UPGRADE sample.syslog.conf sample.sudoers; do \
501             if [ -f $$i ]; then \
502               cp $$i $$tdir ; \
503             elif [ -f $(srcdir)/$$i ]; then \
504               cp $(srcdir)/$$i $$tdir ; \
505             else \
506               echo cannot find $$i ; \
507               exit 1 ; \
508             fi ; \
509           done ; \
510           if [ -f sudo_noexec.la ]; then \
511             cp libtool $$tdir ; \
512             $(LIBTOOL) --mode=install $(INSTALL) sudo_noexec.la `pwd`/$$tdir ; \
513           fi ; \
514           sed 's/@VERSION@/$(VERSION)/g' <$(srcdir)/sudo.psf >$$tdir/sudo.psf ; \
515           printf '#!/sbin/sh\nrm -f /usr/local/bin/sudoedit\nln /usr/local/bin/sudo /usr/local/bin/sudoedit\n' > $$tdir/sudo-exec.postinstall ; \
516           printf '#!/sbin/sh\nrm -f /usr/local/man/man1m/sudoedit.1m\nln /usr/local/man/man1m/sudo.1m /usr/local/man/man1m/sudoedit.1m\n' > $$tdir/sudo-man.postinstall ; \
517           printf '#!/sbin/sh\nif [ ! -s /etc/sudoers ]; then\n\techo installing /usr/local/doc/sudo/sudoers as /etc/sudoers\n\techo use /usr/local/sbin/visudo to configure sudo\n\tcp /usr/local/doc/sudo/sudoers /etc/sudoers\n\tchmod 440 /etc/sudoers\n\tchown root:root /etc/sudoers\nfi\n' > $$tdir/sudo-config.postinstall ; \
518           chmod 755 $$tdir/sudo-exec.postinstall $$tdir/sudo-man.postinstall $$tdir/sudo-config.postinstall ; \
519           strip $$tdir/sudo ; \
520           strip $$tdir/visudo ; \
521           cd $$tdir ; \
522           swpackage -x target_type=tape -d ../sudo-$(VERSION).depot -s sudo.psf ; \
523           cd .. ; \
524           gzip -f --best sudo-$(VERSION).depot; \
525           rm -rf tmp.depot ; \
526         )