From 22bf13b350b5cceb9bbfa0e17029e4f6c1cf1273 Mon Sep 17 00:00:00 2001 From: simon Date: Fri, 7 Jan 2005 16:15:01 +0000 Subject: [PATCH] Introduce make targets `progs' and `man', for building the actual programs and the man pages independently. Also `install-progs' and `install-man'. git-svn-id: svn://svn.tartarus.org/sgt/utils@5077 cda61777-01e9-0310-a592-d414129be87e --- Makefile | 16 +++++++++++++--- base64/Makefile | 6 +++++- cvt-utf8/Makefile | 6 +++++- lns/Makefile | 6 +++++- multi/Makefile | 6 +++++- nntpid/Makefile | 6 +++++- xcopy/Makefile | 7 ++++++- 7 files changed, 44 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index 0fb7229..19b1687 100644 --- a/Makefile +++ b/Makefile @@ -15,6 +15,12 @@ IDATA = -m 0644 # flags for installing data all: for i in $(SUBDIRS); do make -C $$i; done +progs: + for i in $(SUBDIRS); do make -C $$i progs; done + +man: + for i in $(SUBDIRS); do make -C $$i man; done + clean: rm -f *.html *.tar.gz for i in $(SUBDIRS); do make -C $$i clean; done @@ -26,6 +32,10 @@ release: for i in $(SUBDIRS); do make -C $$i release DESTDIR=../$(DESTDIR); done install: - for i in $(SUBDIRS); do \ - make -C $$i install; \ - done + for i in $(SUBDIRS); do make -C $$i install; done + +install-progs: + for i in $(SUBDIRS); do make -C $$i install-progs; done + +install-man: + for i in $(SUBDIRS); do make -C $$i install-man; done diff --git a/base64/Makefile b/base64/Makefile index 52f9b1a..e42cb95 100644 --- a/base64/Makefile +++ b/base64/Makefile @@ -11,6 +11,8 @@ IPROG =# flags for installing programs (default none) IDATA = -m 0644 # flags for installing data all: base64.1 base64 +progs: base64 +man: base64.1 base64: base64.c $(CC) $(CFLAGS) -o $@ $< @@ -33,8 +35,10 @@ release: base64.1 tar -C reltmp -chzf $(DESTDIR)/base64.tar.gz base64 rm -rf reltmp -install: base64 base64.1 +install: install-progs install-man +install-progs: base64 mkdir -p $(BINDIR) $(INSTALL) $(IPROG) base64 $(BINDIR)/base64 +install-man: base64.1 mkdir -p $(MANDIR) $(INSTALL) $(IDATA) base64.1 $(MANDIR)/base64.1 diff --git a/cvt-utf8/Makefile b/cvt-utf8/Makefile index 4995df2..c5442d0 100644 --- a/cvt-utf8/Makefile +++ b/cvt-utf8/Makefile @@ -9,6 +9,8 @@ MANDIR = $(PREFIX)/man/man1 INSTALL = install all: cvt-utf8.1 +man: cvt-utf8.1 +progs:; %.1: %.but halibut --man=$@ $< @@ -28,8 +30,10 @@ release: cvt-utf8.1 tar -C reltmp -chzf $(DESTDIR)/cvt-utf8.tar.gz cvt-utf8 rm -rf reltmp -install: cvt-utf8.1 +install: install-progs install-man +install-progs: mkdir -p $(SCRIPTDIR) $(INSTALL) cvt-utf8 $(SCRIPTDIR)/cvt-utf8 +install-man: cvt-utf8.1 mkdir -p $(MANDIR) $(INSTALL) -m 0644 cvt-utf8.1 $(MANDIR)/cvt-utf8.1 diff --git a/lns/Makefile b/lns/Makefile index 9842575..115771f 100644 --- a/lns/Makefile +++ b/lns/Makefile @@ -11,6 +11,8 @@ IPROG =# flags for installing programs (default none) IDATA = -m 0644 # flags for installing data all: lns.1 +man: lns.1 +progs:; %.1: %.but halibut --man=$@ $< @@ -30,8 +32,10 @@ release: lns.1 tar -C reltmp -chzf $(DESTDIR)/lns.tar.gz lns rm -rf reltmp -install: lns.1 +install: install-progs install-man +install-progs: mkdir -p $(SCRIPTDIR) $(INSTALL) $(IPROG) lns $(SCRIPTDIR)/lns +install-man: lns.1 mkdir -p $(MANDIR) $(INSTALL) $(IDATA) lns.1 $(MANDIR)/lns.1 diff --git a/multi/Makefile b/multi/Makefile index 1524855..f2ea823 100644 --- a/multi/Makefile +++ b/multi/Makefile @@ -11,6 +11,8 @@ IPROG =# flags for installing programs (default none) IDATA = -m 0644 # flags for installing data all: multi.1 +man: multi.1 +progs:; %.1: %.but halibut --man=$@ $< @@ -30,8 +32,10 @@ release: multi.1 tar -C reltmp -chzf $(DESTDIR)/multi.tar.gz multi rm -rf reltmp -install: multi.1 +install: install-progs install-man +install-progs: mkdir -p $(SCRIPTDIR) $(INSTALL) $(IPROG) multi $(SCRIPTDIR)/multi +install-man: multi.1 mkdir -p $(MANDIR) $(INSTALL) $(IDATA) multi.1 $(MANDIR)/multi.1 diff --git a/nntpid/Makefile b/nntpid/Makefile index 686f376..8d9d0be 100644 --- a/nntpid/Makefile +++ b/nntpid/Makefile @@ -11,6 +11,8 @@ 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=$@ $< @@ -30,8 +32,10 @@ release: nntpid.1 tar -C reltmp -chzf $(DESTDIR)/nntpid.tar.gz nntpid rm -rf reltmp -install: nntpid.1 +install: install-progs install-man +install-progs: mkdir -p $(SCRIPTDIR) $(INSTALL) $(IPROG) nntpid $(SCRIPTDIR)/nntpid +install-man: nntpid.1 mkdir -p $(MANDIR) $(INSTALL) $(IDATA) nntpid.1 $(MANDIR)/nntpid.1 diff --git a/xcopy/Makefile b/xcopy/Makefile index a7eb226..9455264 100644 --- a/xcopy/Makefile +++ b/xcopy/Makefile @@ -13,6 +13,8 @@ IDATA = -m 0644 # flags for installing data X11LIB=-L/usr/X11R6/lib -lX11 all: xcopy.1 xcopy +man: xcopy.1 +progs: xcopy xcopy: xcopy.c $(CC) $(CFLAGS) -o $@ $< $(X11LIB) @@ -35,8 +37,11 @@ release: xcopy.1 tar -C reltmp -chzf $(DESTDIR)/xcopy.tar.gz xcopy rm -rf reltmp -install: xcopy xcopy.1 +install: install-progs install-man + +install-progs: xcopy mkdir -p $(BINDIR) $(INSTALL) $(IPROG) xcopy $(BINDIR)/xcopy +install-man: xcopy.1 mkdir -p $(MANDIR) $(INSTALL) $(IDATA) xcopy.1 $(MANDIR)/xcopy.1 -- 2.11.0