2000-12-13 15:16:34 +00:00
|
|
|
#
|
|
|
|
|
# Petidomo Makefile
|
|
|
|
|
#
|
|
|
|
|
|
2001-01-19 12:50:55 +00:00
|
|
|
prefix = @prefix@
|
|
|
|
|
exec_prefix = @exec_prefix@
|
|
|
|
|
bindir = @bindir@
|
|
|
|
|
libexecdir = @libexecdir@/petidomo
|
|
|
|
|
datadir = @datadir@/petidomo
|
|
|
|
|
sysconfdir = @sysconfdir@
|
|
|
|
|
localstatedir = @localstatedir@/petidomo
|
2001-01-20 13:34:57 +00:00
|
|
|
mandir = @mandir@
|
2000-12-15 15:48:00 +00:00
|
|
|
|
2001-01-21 12:20:41 +00:00
|
|
|
DESTDIR =
|
|
|
|
|
|
2000-12-13 15:16:34 +00:00
|
|
|
CC = @CC@
|
|
|
|
|
AR = ar
|
|
|
|
|
RANLIB = @RANLIB@
|
|
|
|
|
LEX = @LEX@
|
|
|
|
|
YACC = @YACC@
|
2001-01-19 12:50:55 +00:00
|
|
|
SHTOOL = ./etc/shtool
|
2000-12-13 15:16:34 +00:00
|
|
|
|
|
|
|
|
CFLAGS = @CFLAGS@
|
2001-01-19 12:50:55 +00:00
|
|
|
|
|
|
|
|
CPPFLAGS = @CPPFLAGS@ @DEFS@ -DSYSCONFDIR=\"$(sysconfdir)\" \
|
|
|
|
|
-DLIBEXECDIR=\"$(libexecdir)\" -DDATADIR=\"$(datadir)\" \
|
|
|
|
|
-DLOCALSTATEDIR=\"$(localstatedir)\"
|
2000-12-13 15:16:34 +00:00
|
|
|
LDFLAGS = @LDFLAGS@
|
2001-01-19 12:50:55 +00:00
|
|
|
FLAGS_TO_PASS = MFLAGS="$(MFLAGS)" CC="$(CC)" AR="$(AR)" \
|
|
|
|
|
RANLIB="$(RANLIB)" LEX="$(LEX)" \
|
|
|
|
|
YACC="$(YACC)" CFLAGS="$(CFLAGS)" \
|
|
|
|
|
CPPFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS)"
|
2000-12-14 16:43:10 +00:00
|
|
|
|
2001-01-20 13:42:01 +00:00
|
|
|
OBJS = acl.o archive.o authen.o help.o io.o generate-cookie.o \
|
2001-01-20 13:26:00 +00:00
|
|
|
filter.o handleacl.o hermes.o index.o config-files.o \
|
2001-01-19 12:50:55 +00:00
|
|
|
listserv.o mailer.o members.o parsearray.o password.o \
|
|
|
|
|
rfcparse.o subscribe.o tool.o unsubscribe.o main.o \
|
2001-01-20 13:42:01 +00:00
|
|
|
queue-command.o queue-posting.o approve.o address-db.o \
|
2001-01-19 21:42:34 +00:00
|
|
|
version.o
|
2001-01-19 12:50:55 +00:00
|
|
|
LIBS = librfc822/librfc822.a libmpools/libmpools.a \
|
|
|
|
|
liblists/liblists.a libargv/libargv.a \
|
2000-12-15 15:48:00 +00:00
|
|
|
libconfigfile/libconfigfile.a libtext/libtext.a
|
2000-12-13 15:16:34 +00:00
|
|
|
|
|
|
|
|
.SUFFIXES:
|
2000-12-16 13:11:54 +00:00
|
|
|
.SUFFIXES: .c .o
|
2000-12-13 15:16:34 +00:00
|
|
|
|
2000-12-14 15:26:44 +00:00
|
|
|
.c.o:
|
2000-12-14 15:30:52 +00:00
|
|
|
$(CC) $(CFLAGS) $(CPPFLAGS) -c $<
|
2000-12-13 15:16:34 +00:00
|
|
|
|
2001-01-20 13:34:57 +00:00
|
|
|
all: petidomo petidomo.1
|
|
|
|
|
|
2000-12-13 15:16:34 +00:00
|
|
|
petidomo: $(OBJS) $(LIBS)
|
2000-12-16 13:11:54 +00:00
|
|
|
$(CC) $(OBJS) -o $@ $(LDFLAGS) $(LIBS)
|
2000-12-13 15:16:34 +00:00
|
|
|
|
2001-01-20 13:34:57 +00:00
|
|
|
petidomo.1: petidomo.pod
|
|
|
|
|
V=`$(SHTOOL) version -lc -dlong version.c`; \
|
|
|
|
|
sed -e "s;@V@;$$V;g" <petidomo.pod >/tmp/petidomo.pod; \
|
|
|
|
|
pod2man --section=1 --date="$$V" \
|
|
|
|
|
--center="Petidomo" --release="Petidomo" \
|
|
|
|
|
/tmp/petidomo.pod >petidomo.1; \
|
|
|
|
|
rm -f /tmp/petidomo.pod
|
|
|
|
|
|
2001-01-20 13:42:01 +00:00
|
|
|
acl.c acl-scan.h: acl.y
|
2000-12-13 15:16:34 +00:00
|
|
|
$(YACC) -d -p acl acl.y
|
|
|
|
|
mv y.tab.c acl.c
|
2001-01-20 13:42:01 +00:00
|
|
|
mv y.tab.h acl-scan.h
|
2000-12-13 15:16:34 +00:00
|
|
|
|
2001-01-20 13:42:01 +00:00
|
|
|
acl-scan.c: acl-scan.l acl-scan.h
|
|
|
|
|
$(LEX) -i -Pacl acl-scan.l
|
|
|
|
|
mv lex.acl.c acl-scan.c
|
2000-12-13 15:16:34 +00:00
|
|
|
|
2001-01-20 13:42:01 +00:00
|
|
|
acl.c: acl-scan.c
|
2000-12-13 15:16:34 +00:00
|
|
|
|
2000-12-14 15:26:44 +00:00
|
|
|
$(LIBS):
|
2001-01-19 14:14:18 +00:00
|
|
|
@subdir=`echo $@ | sed -e 's@/.*@@'`; \
|
2001-01-18 20:20:02 +00:00
|
|
|
echo "===> $$subdir"; \
|
|
|
|
|
cd $$subdir && $(MAKE) $(FLAGS_TO_PASS); \
|
|
|
|
|
echo "<=== $$subdir"
|
2000-12-13 15:16:34 +00:00
|
|
|
|
2001-01-20 13:34:57 +00:00
|
|
|
install: all
|
2001-01-21 12:20:41 +00:00
|
|
|
$(SHTOOL) mkdir -f -p -m 755 $(DESTDIR)$(bindir)
|
|
|
|
|
$(SHTOOL) mkdir -f -p -m 755 $(DESTDIR)$(sysconfdir)
|
|
|
|
|
$(SHTOOL) mkdir -f -p -m 755 $(DESTDIR)$(localstatedir)/lists
|
|
|
|
|
$(SHTOOL) mkdir -f -p -m 755 $(DESTDIR)$(localstatedir)/ack-queue
|
|
|
|
|
$(SHTOOL) mkdir -f -p -m 755 $(DESTDIR)$(datadir)
|
|
|
|
|
$(SHTOOL) mkdir -f -p -m 755 $(DESTDIR)$(libexecdir)
|
|
|
|
|
$(SHTOOL) mkdir -f -p -m 755 $(DESTDIR)$(mandir)/man1
|
|
|
|
|
$(SHTOOL) install -c -s -m 555 petidomo $(DESTDIR)$(bindir)
|
|
|
|
|
$(SHTOOL) install -c -m 755 petidomo-approve $(DESTDIR)$(bindir)
|
|
|
|
|
$(SHTOOL) install -c -m 755 petidomo-kickout $(DESTDIR)$(bindir)
|
|
|
|
|
$(SHTOOL) install -c -m 644 petidomo.1 $(DESTDIR)$(mandir)/man1/petidomo.1
|
|
|
|
|
$(SHTOOL) install -c -m 644 config/petidomo.conf $(DESTDIR)$(sysconfdir)/petidomo.conf-sample
|
|
|
|
|
$(SHTOOL) install -c -m 644 config/petidomo.acl $(DESTDIR)$(sysconfdir)/petidomo.acl-sample
|
|
|
|
|
$(SHTOOL) install -c -m 444 config/help $(DESTDIR)$(datadir)
|
|
|
|
|
if [ ! -f $(DESTDIR)$(localstatedir)/index ] ; then $(SHTOOL) install -c -m 444 config/index $(DESTDIR)$(localstatedir); fi
|
|
|
|
|
$(SHTOOL) install -c -m 555 filter/insert-name-in-subject.sh $(DESTDIR)$(libexecdir)
|
|
|
|
|
$(SHTOOL) install -c -m 555 filter/pgp-decrypt.sh $(DESTDIR)$(libexecdir)
|
|
|
|
|
$(SHTOOL) install -c -m 555 filter/pgp-encrypt.sh $(DESTDIR)$(libexecdir)
|
|
|
|
|
$(SHTOOL) install -c -m 555 filter/rfc2369.sh $(DESTDIR)$(libexecdir)
|
2001-01-08 15:54:18 +00:00
|
|
|
|
|
|
|
|
install-testlist:
|
2001-01-21 12:20:41 +00:00
|
|
|
$(SHTOOL) mkdir -f -p -m 755 $(DESTDIR)$(localstatedir)/lists/testlist
|
|
|
|
|
$(SHTOOL) install -c -m 644 config/list-config $(DESTDIR)$(localstatedir)/lists/testlist/config
|
|
|
|
|
$(SHTOOL) install -c -m 644 config/list-acl $(DESTDIR)$(localstatedir)/lists/testlist/acl
|
|
|
|
|
@rm -f $(DESTDIR)$(localstatedir)/lists/testlist/list
|
|
|
|
|
$(SHTOOL) install -c -m 644 /dev/null $(DESTDIR)$(localstatedir)/lists/testlist/list
|
2000-12-16 12:14:15 +00:00
|
|
|
|
2000-12-13 15:16:34 +00:00
|
|
|
clean distclean realclean::
|
2001-01-18 20:20:02 +00:00
|
|
|
@for subdir in lib*; do \
|
|
|
|
|
echo "===> $$subdir"; \
|
|
|
|
|
(cd $$subdir && $(MAKE) $(FLAGS_TO_PASS) $@); \
|
|
|
|
|
echo "<=== $$subdir"; \
|
|
|
|
|
done
|
2000-12-13 15:16:34 +00:00
|
|
|
|
2000-12-14 15:26:44 +00:00
|
|
|
clean::
|
2000-12-15 15:48:00 +00:00
|
|
|
rm -f petidomo
|
2001-01-20 13:34:57 +00:00
|
|
|
rm -f petidomo.1
|
2000-12-13 15:16:34 +00:00
|
|
|
rm -f $(OBJS)
|
2001-01-20 13:42:01 +00:00
|
|
|
rm -f acl-scan.c acl-scan.h acl.c
|
2000-12-13 15:16:34 +00:00
|
|
|
|
2000-12-14 15:26:44 +00:00
|
|
|
distclean:: clean
|
2000-12-13 16:42:17 +00:00
|
|
|
rm -f config.log config.cache config.status Makefile
|
2000-12-13 15:16:34 +00:00
|
|
|
|
2000-12-14 15:26:44 +00:00
|
|
|
realclean:: distclean
|
2000-12-13 15:16:34 +00:00
|
|
|
rm -f configure
|
|
|
|
|
|
2001-01-20 14:17:48 +00:00
|
|
|
# increase or update version information
|
|
|
|
|
new-version:
|
|
|
|
|
@V="$(VERSION)"; OPT="-e"; [ ".$$V" != . ] && OPT="-s$$V"; \
|
|
|
|
|
$(SHTOOL) version -lc -n 'Petidomo' -p petidomo_ $$OPT version.c
|
|
|
|
|
update-version:
|
|
|
|
|
@OPT="-s`$(SHTOOL) version -lc -dshort version.c`"; \
|
|
|
|
|
$(SHTOOL) version -lc -n 'Petidomo' -p petidomo_ $$OPT version.c
|
|
|
|
|
|
2001-01-20 14:27:11 +00:00
|
|
|
# roll release or snapshot source distribution tarballs
|
2001-01-19 15:09:12 +00:00
|
|
|
dist: distclean
|
2001-01-20 14:27:11 +00:00
|
|
|
@echo "Rolling RELEASE source distribution tarball"; \
|
|
|
|
|
$(SHTOOL) fixperm *; \
|
2001-01-19 15:09:12 +00:00
|
|
|
V=`$(SHTOOL) version -lc -dshort version.c`; \
|
|
|
|
|
$(SHTOOL) tarball \
|
|
|
|
|
-o petidomo-$$V.tar.gz -d petidomo-$$V -u ossp -g petidomo \
|
|
|
|
|
-e 'CVS,\.cvsignore,\.configure,ChangeLog*,\.\#.*,*~$$,\.[ao]$$' \
|
|
|
|
|
-c 'gzip -9' .; \
|
|
|
|
|
ls -l petidomo-$$V.tar.gz
|
2001-01-20 14:27:11 +00:00
|
|
|
snap: distclean
|
|
|
|
|
@echo "Rolling SNAPSHOT source distribution tarball"; \
|
|
|
|
|
$(SHTOOL) fixperm *; \
|
|
|
|
|
D=`date '+%Y%d%m'`; \
|
|
|
|
|
$(SHTOOL) tarball \
|
|
|
|
|
-o petidomo-SNAP-$$D.tar.gz -d petidomo-SNAP-$$V -u ossp -g petidomo \
|
|
|
|
|
-e 'CVS,\.cvsignore,\.configure,ChangeLog*,\.\#.*,*~$$,\.[ao]$$' \
|
|
|
|
|
-c 'gzip -9' .; \
|
|
|
|
|
ls -l petidomo-SNAP-$$D.tar.gz
|
2001-01-19 15:09:12 +00:00
|
|
|
|
2000-12-14 15:26:44 +00:00
|
|
|
# Dependencies
|
2000-12-13 15:16:34 +00:00
|
|
|
|
2001-01-20 13:42:01 +00:00
|
|
|
acl.o: libtext/text.h petidomo.h acl-scan.c acl-scan.h
|
|
|
|
|
acl-scan.o: acl-scan.h
|
2001-01-19 12:50:55 +00:00
|
|
|
address-db.o: libtext/text.h petidomo.h
|
2001-01-20 15:18:59 +00:00
|
|
|
approve.o: petidomo.h libtext/text.h
|
2001-01-08 16:19:32 +00:00
|
|
|
archive.o: libtext/text.h petidomo.h
|
|
|
|
|
authen.o: libtext/text.h petidomo.h
|
2001-01-20 13:26:00 +00:00
|
|
|
config-files.o: libtext/text.h liblists/lists.h libconfigfile/configfile.h
|
|
|
|
|
config-files.o: petidomo.h
|
2001-01-08 16:19:32 +00:00
|
|
|
filter.o: petidomo.h
|
2001-01-20 13:42:01 +00:00
|
|
|
generate-cookie.o: petidomo.h
|
2001-01-08 16:19:32 +00:00
|
|
|
handleacl.o: petidomo.h
|
|
|
|
|
help.o: libtext/text.h petidomo.h
|
|
|
|
|
hermes.o: libtext/text.h petidomo.h
|
|
|
|
|
index.o: libtext/text.h petidomo.h
|
|
|
|
|
io.o: petidomo.h
|
|
|
|
|
listserv.o: libtext/text.h petidomo.h
|
|
|
|
|
mailer.o: libtext/text.h petidomo.h
|
2001-01-19 21:39:49 +00:00
|
|
|
main.o: libargv/argv.h libtext/text.h petidomo.h version.c
|
2001-01-08 16:19:32 +00:00
|
|
|
members.o: libtext/text.h petidomo.h
|
|
|
|
|
parsearray.o: petidomo.h
|
|
|
|
|
password.o: petidomo.h
|
2001-01-20 13:42:01 +00:00
|
|
|
queue-command.o: libtext/text.h petidomo.h
|
|
|
|
|
queue-posting.o: libtext/text.h petidomo.h
|
2001-01-08 16:19:32 +00:00
|
|
|
rfcparse.o: librfc822/rfc822.h libtext/text.h petidomo.h
|
|
|
|
|
subscribe.o: libtext/text.h petidomo.h
|
|
|
|
|
tool.o: libtext/text.h petidomo.h
|
|
|
|
|
unsubscribe.o: libtext/text.h petidomo.h
|