Make the version number automatically included in the man page footer

This commit is contained in:
hpa 2001-11-17 00:16:53 +00:00
parent 779db73551
commit 4f739767f2
7 changed files with 330 additions and 10 deletions

View file

@ -1,6 +1,7 @@
all: tftpd
all: tftpd tftpd.8
SRCROOT = ..
VERSION = $(shell cat ../version)
-include ../MCONFIG
include ../MRULES
@ -17,14 +18,17 @@ tftpsubs.h:
$(OBJS): tftpsubs.h
install: tftpd
tftpd.8: tftpd.8.in ../version
sed -e 's/@@VERSION@@/$(VERSION)/g' < $< > $@
install: all
mkdir -p $(INSTALLROOT)$(SBINDIR) $(INSTALLROOT)$(MANDIR)/man8
$(INSTALL_PROGRAM) tftpd $(INSTALLROOT)$(SBINDIR)/in.tftpd
$(INSTALL_DATA) tftpd.8 $(INSTALLROOT)$(MANDIR)/man8/in.tftpd.8
cd $(INSTALLROOT)$(MANDIR)/man8 && ln -sf in.tftpd.8 tftpd.8
clean:
rm -f *.o tftpd tftpsubs.c tftpsubs.h
rm -f *.o tftpd tftpsubs.c tftpsubs.h tftpd.8
distclean: clean
rm -f *~