ossp-pkg/lmtp2nntp/Makefile.in
1.26
##
## Copyright (c) 2001 The OSSP Project <http://www.ossp.org/>
## Copyright (c) 2001 Cable & Wireless Deutschland <http://www.cw.com/de/>
##
## This file is part of OSSP lmtp2nntp, an LMTP speaking local
## mailer which forwards mails as Usenet news articles via NNTP.
## It can be found at http://www.ossp.org/pkg/lmtp2nntp/.
##
## This program is free software; you can redistribute it and/or
## modify it under the terms of the GNU General Public License
## as published by the Free Software Foundation; either version
## 2.0 of the License, or (at your option) any later version.
##
## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
## General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with this file; if not, write to the Free Software
## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
## USA, or contact the OSSP project <ossp@ossp.org>.
##
## Makefile.in: make(1) build specification
##
@SET_MAKE@
DESTDIR =
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
libdir = @libdir@
includedir = @includedir@
mandir = @mandir@
CC = @CC@
CFLAGS = @CFLAGS@ @DEFS@
LDFLAGS = @LDFLAGS@
LIBS = @LIBS@
SHTOOL = ./shtool
POD2MAN = pod2man
PROG = lmtp2nntp
HDRS = lmtp2nntp.h lmtp.h nntp.h argz.h shpat_match.h msg.h
SRCS = lmtp2nntp.c lmtp.c nntp.c argz.c shpat_match.c msg.c version.c
OBJS = lmtp2nntp.o lmtp.o nntp.o argz.o shpat_match.o msg.o version.o
SUBDIRS = @SUBDIR_STR@ @SUBDIR_L2@ @SUBDIR_SA@
all: _SUBDIRS_all lmtp2nntp lmtp2nntp.8
.c.o:
$(CC) $(CFLAGS) -c $<
# convinience rule for calling _SUBDIRS with various make targets
_SUBDIRS_all _SUBDIRS_check _SUBDIRS_install _SUBDIRS_uninstall _SUBDIRS_clean _SUBDIRS_distclean _SUBDIRS_depend:
@$(MAKE) $(MFLAGS) \
_SUBDIRS_TARGET=`echo $@ | sed -e 's/^_SUBDIRS_//'` \
_SUBDIRS_STEPDOWN
# the work horse rule which steps down to the subdirs in a loop
_SUBDIRS_STEPDOWN:
@for subdir in $(SUBDIRS); do \
test ! -f "$$subdir/Makefile" && continue; \
echo "===> $(_SUBDIRS_DP)$$subdir ($(_SUBDIRS_TARGET))"; \
(cd $$subdir; \
$(MAKE) $(MFLAGS) \
_SUBDIRS_DP="$(_SUBDIRS_DP)$$subdir/" \
$(_SUBDIRS_TARGET) || exit 1) || exit 1; \
echo "<=== $(_SUBDIRS_DP)$$subdir"; \
done
$(PROG): Makefile $(OBJS) $(HDRS)
$(CC) $(LDFLAGS) -o $(PROG) $(OBJS) $(LIBS)
lmtp2nntp.8: lmtp2nntp.pod
VS=`$(SHTOOL) version -lc -dshort version.c`; \
VL=`$(SHTOOL) version -lc -dlong version.c`; \
$(POD2MAN) --section=8 --center="mail to news gateway" \
--release="$$VS" --date="$$VL" \
lmtp2nntp.pod >lmtp2nntp.8
install: all
$(SHTOOL) mkdir -f -p -m 755 $(DESTDIR)$(bindir) $(DESTDIR)$(mandir)/man8
$(SHTOOL) install -c -s -m 755 lmtp2nntp $(DESTDIR)$(bindir)/
$(SHTOOL) install -c -m 644 lmtp2nntp.8 $(DESTDIR)$(mandir)/man8/
clean:
@$(MAKE) $(MFLAGS) _SUBDIRS_clean
-rm -f *.core
-rm -f dmalloc.log
-rm -f test/*.core
-rm -f test/dmalloc.log test/sum.dmalloc.log
-rm -f test/stdin test/stdout test/stderr test/stdlog
-rm -f $(PROG)
-rm -f $(OBJS)
distclean: clean
@$(MAKE) $(MFLAGS) _SUBDIRS_distclean
-rm -f config.h config.status config.log config.cache
-rm -f Makefile
realclean: distclean
@$(MAKE) $(MFLAGS) _SUBDIRS_realclean
-rm -f lmtp2nntp.8
-rm -f config.h.in
-rm -f configure
-rm -f shtool
new-version:
@$(SHTOOL) version -lc -n lmtp2nntp -p lmtp2nntp_ -e version.c; \
V=`$(SHTOOL) version -lc -dlong version.c`; \
sed -e "s/Version .*(.*)/Version $$V/g" <README >README.n && mv README.n README
dist: distclean
@$(SHTOOL) fixperm -v .; \
V=`$(SHTOOL) version -lc -dshort version.c`; \
$(SHTOOL) tarball -o lmtp2nntp-$${V}.tar.gz -d lmtp2nntp-$${V} -u ossp -g ossp \
-e 'CVS,\.cvsignore,\.[ao],^\.,/\.,autogen.sh,*.tar.gz,*.bak,TODO' -c 'gzip --best' .
check: lmtp2nntp
@./test.sh
# create dependencies
depend: all
cp Makefile.in Makefile.in.bak \
&& sed -ne '1,/^# AUTOMATICALLY GENERATED DEPENDENCY LIST/p' Makefile.in > Makefile.new \
&& $(CC) -MM $(CPPFLAGS) $(CFLAGS) $(SRCS) |\
perl -e 'my $$d = ""; $$d .= $$_ while (<STDIN>); $$_ = $$d; \
s|\\\n\s*| |sg; s|\b?\S*/\S*\b?||g; s|\s{2,}| |g; \
print $$_;' >> Makefile.new \
&& cp Makefile.new Makefile.in
&& rm -f Makefile.new
$(OBJS): Makefile
# AUTOMATICALLY GENERATED DEPENDENCY LIST - DO NOT EDIT
lmtp2nntp.o: lmtp2nntp.c argz.h shpat_match.h lmtp2nntp.h config.h lmtp.h nntp.h msg.h version.c
lmtp.o: lmtp.c lmtp.h config.h
nntp.o: nntp.c nntp.h msg.h lmtp2nntp.h config.h
argz.o: argz.c argz.h config.h
shpat_match.o: shpat_match.c config.h shpat_match.h
msg.o: msg.c msg.h lmtp2nntp.h config.h argz.h
version.o: version.c version.c