Adjust 'after' so that it tries more rigorously to parse the input
[sgt/utils] / nntpid / Makefile
index 6dfb875..2b8a9c8 100644 (file)
@@ -4,9 +4,15 @@ DESTDIR = .
 # for `make install'
 PREFIX = /usr/local
 BINDIR = $(PREFIX)/bin
+SCRIPTDIR = $(PREFIX)/bin
 MANDIR = $(PREFIX)/man/man1
+INSTALL = install
+IPROG =#   flags for installing programs (default none)
+IDATA = -m 0644  # flags for installing data
 
 all: nntpid.1
+man: nntpid.1
+progs:;
 
 %.1: %.but
        halibut --man=$@ $<
@@ -15,7 +21,8 @@ clean:
        rm -f *.1 *.html *.tar.gz
 
 html:
-       halibut --html=$(DESTDIR)/nntpid.html nntpid.but
+       halibut --html=nntpid.html nntpid.but
+       mv nntpid.html $(DESTDIR)
 
 release: nntpid.1
        mkdir -p reltmp/nntpid
@@ -26,8 +33,10 @@ release: nntpid.1
        tar -C reltmp -chzf $(DESTDIR)/nntpid.tar.gz nntpid
        rm -rf reltmp
 
-install: nntpid.1
-       mkdir -p $(BINDIR)
-       install nntpid $(BINDIR)/nntpid
+install: install-progs install-man
+install-progs:
+       mkdir -p $(SCRIPTDIR)
+       $(INSTALL) $(IPROG) nntpid $(SCRIPTDIR)/nntpid
+install-man: nntpid.1
        mkdir -p $(MANDIR)
-       install -m 0644 nntpid.1 $(MANDIR)/nntpid.1
+       $(INSTALL) $(IDATA) nntpid.1 $(MANDIR)/nntpid.1