File: Makefile.in

package info (click to toggle)
super 3.11.6-1
  • links: PTS
  • area: main
  • in suites: hamm
  • size: 660 kB
  • ctags: 592
  • sloc: ansic: 7,338; sh: 183; makefile: 175
file content (209 lines) | stat: -rw-r--r-- 6,482 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209

srcdir = @srcdir@
VPATH = @srcdir@

CC = @CC@
CFLAGS = @CFLAGS@
USER_DEFS = @DEFS@
INSTALL = @INSTALL@
LDFLAGS = @LDFLAGS@
LIBS = @LIBS@

prefix = @prefix@
exec_prefix = @exec_prefix@
bindir=@bindir@
sysconfdir = @sysconfdir@
localstatedir = @localstatedir@
mandir = @mandir@

#
# Where the super(1) binary is installed
#
BINDIR = $(bindir)

#
# Name of the timestamps directory
#
TIMESTAMP_DIR=$(localstatedir)/superstamps
D_TIMESTAMP_DIR=-DTIMESTAMP_DIR=\"$(TIMESTAMP_DIR)\"

#
# Where the super.tab file is installed:
#
SUPERFILE=$(sysconfdir)/super.tab
D_SUPERFILE=-DSUPERFILE=\"$(SUPERFILE)\"

#
# Where the user man page is placed.
#
MAN1DIR = $(mandir)/man1
# Do _not_ include a leading dot in the extension!
MAN1EXT = 1

#
# Where the man page for the super.tab file is placed.
#
MAN_FORMAT_DIR = $(mandir)/man5
# Do _not_ include a leading dot in the extension!
MAN_FORMAT_EXT = 5

# SYSLOG_PRIORITY specifies the priority of syslog messages.
#	If you don't define it, the default is LOG_ERR.
#	(Regardless of this setting, _successful_ executions are logged
#	at priority LOG_INFO.)

#	If you are using standard syslog(), you may define it symbolically,
#	for example:
#		-DSYSLOG_PRIORITY=LOG_ERR
#	or
#		-DSYSLOG_PRIORITY="(LOG_LOCAL1 | LOG_WARNING)"

#	But if you are using rsyslog(), you should define it differently:
#	its value depends on the machine which will _receive_ the log
#	messages, NOT the sending machine.  It should be defined in the
#	Makefile because the value can differ on the machine that compiles
#	and runs super, compared to the value on the log host.

#	For example, if your receiving machine is a Sun running SunOS 4.1.3,
#	or HP-UX 8.x or 9.x, using -DSYSLOG_PRIORITY='((17<<3)+4)' will set
#	the priority of the networked syslog to the facility LOG_LOCAL1, with
#	the priority LOG_WARNING.  The log machine should have a line that
#	matches this in its syslog.conf file; for the above priority, use
#	an entry like:
#		/etc/syslog.conf:local1.warning        /var/adm/super.log
#
SYSLOG_PRIORITY=LOG_ERR
D_SYSLOG_PRIORITY=-DSYSLOG_PRIORITY=$(SYSLOG_PRIORITY)

BASIC_DEFS = $(D_SUPERFILE) $(D_TIMESTAMP_DIR) $(D_SYSLOG_PRIORITY)

#
# ###################################################################
# You probably don't have to edit anything below here.
# ###################################################################
#
COMPILE = $(CC) -c $(BASIC_DEFS) $(USER_DEFS) -I. $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
LINK = $(CC) $(LDFLAGS) -o $@
 
.SUFFIXES:
.SUFFIXES: .c .o .in
.c.o:
	$(COMPILE) $<

.in:
	sed -e 's!@SUPERFILE@!$(SUPERFILE)!g' \
	    -e 's!@TIMESTAMP_DIR@!$(TIMESTAMP_DIR)!g' < $< > $@

  
####################################################################
# You really shouldn't have to modify anything below this line.
####################################################################

SRC= $(SUPER_SRC) $(SETUID_SRC)

SUPER_C_SRC = super.c approve.c checks.c colon.c braces.c error.c \
	gsgroups.c hsearch.c options.c s_regex.c s_re_fail.c rsyslog.c \
	strqtokS.c time.c utils.c wildmat.c

SUPER_H_SRC = hsearch.h version.h options.h super.h

SUPER_SRC = $(SUPER_C_SRC) $(SUPER_H_SRC)

SETUID_SRC = setuid.c

SUPER_OBJ= super.o approve.o checks.o colon.o braces.o error.o \
	gsgroups.o hsearch.o options.o s_regex.o s_re_fail.o rsyslog.o \
	strqtokS.o time.o utils.o wildmat.o

# Files that go into the shar file.
ALL= README INSTALL INSTALL.notes Artistic Copying WhatsNew \
	configure configure.in install-sh localsys.h \
	Makefile.in super.1.in super.5.in config.h.in \
	setuid.1.in sample.tab sample.cdmount $(SRC)

all: config.h super setuid super.1 super.5 setuid.1

super: config.h $(SUPER_OBJ)
	$(CC) $(LDFLAGS) -o super $(SUPER_OBJ) $(LIBS)

debug: config.h $(SUPER_OBJ)
	$(CC) $(LDFLAGS) -o super $(SUPER_OBJ) $(LIBS) /usr/lib/debug/malloc.o

setuid: setuid.o
	$(CC) $(LDFLAGS) -o setuid setuid.o

config.h:
	@echo "'config.h' doesn't exist or is out of date compared to config.h.in..."
	@echo "You must run './configure' to generate config.h."
	@echo "If you are making 'super' for the first time on this system,"
	@echo "you should probably do a 'make veryclean' before executing ./configure."
	@exit 1

cflow:
	cflow $(SUPER_C_SRC) > cflow.out
	cflow -r $(SUPER_C_SRC) > cflow.rev

# NOTICE NOTICE NOTICE!
# You must install super as "super", and not use any other program name.
# This is because at run-time, the program assumes that if it's invoked
# with a different name, it must have been invoked via a symlink, and
# it treats
#	% myothernameforsuper args
# as if you typed
#	% super myothernameforsuper args
# If you insist on installing under another name, then you must
# change the #define ONETRUENAME from "super" to your other
# name, and edit the documentation to match.
install: super setuid super.1 setuid.1 super.5
	./install-sh -o root -m 04755 super $(BINDIR)/super
	./install-sh -o root -m  0755 setuid $(BINDIR)/setuid
	./install-sh -o root -m  0644 super.1 $(MAN1DIR)/super.$(MAN1EXT)
	./install-sh -o root -m  0644 setuid.1 $(MAN1DIR)/setuid.$(MAN1EXT)
	./install-sh -o root -m  0644 super.5 \
			$(MAN_FORMAT_DIR)/setuid.$(MAN_FORMAT_EXT)

clean:
	-rm -f super setuid *.o

distclean veryclean: clean
	-rm -f super.1 super.5 setuid.1 config.h config.cache config.status config.log

$(ALL): 
	co $@

# Because of the wide variation in shar commands, the shar arguments
# used below sticks to a minimal set, and we generate various shar file
# headers by hand.  
shar: $(ALL)
	( echo "#include <stdio.h>" ; \
	echo '#include "version.h"' ; \
	echo 'main() {printf("%s.%s",Version,Patchlevel);exit(0);}') > temp.c
	cc temp.c
	V=super-`./a.out`; mkdir $$V && cp $(ALL) $$V && \
	    (echo "Submitted-by: will@ucolick.org" ; \
	    echo "Archive-name: $$V/part01" ; echo "" ; \
	    echo "---- Cut Here and feed the following to sh ----" ; \
	    shar $$V ) > $$V.shar && rm -rf $$V
	rm a.out temp.c

tar: $(ALL)
	( echo "#include <stdio.h>" ; \
	echo '#include "version.h"' ; \
	echo 'main() {printf("%s.%s",Version,Patchlevel);exit(0);}') > temp.c
	cc temp.c
	V=super-`./a.out`; mkdir $$V && cp $(ALL) $$V && \
	    tar -cf $$V.tar $$V && rm -rf $$V
	rm a.out temp.c

gtar: $(ALL)
	( echo "#include <stdio.h>" ; \
	echo '#include "version.h"' ; \
	echo 'main() {printf("%s.%s",Version,Patchlevel);exit(0);}') > temp.c
	cc temp.c
	V=super-`./a.out`; mkdir $$V && cp $(ALL) $$V && \
	    gtar -czf $$V.tar.gz $$V && rm -rf $$V
	rm a.out temp.c

depend:
	makedepend -- $(CFLAGS) -- $(SRC)