From 56b7b997cdb2f28b12c09a132d9f2fecbf5bff3d Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Thu, 16 Apr 2015 20:28:31 +0200 Subject: makefile: add man1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- Makefile | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index cc31abe..ccb2251 100644 --- a/Makefile +++ b/Makefile @@ -6,11 +6,35 @@ FLAGS = -std=c99 -Wall -Wextra -pedantic -O2 LIB_MAJOR = 1 LIB_MINOR = 0 LIB_VERSION = ${LIB_MAJOR}.${LIB_MINOR} +VERSION = 1.0 -all: bus +all: bus doc +doc: man +man: man1 bus: bin/bus bin/libbus.so.$(LIB_VERSION) bin/libbus.so.$(LIB_MAJOR) bin/libbus.so bin/libbus.a +man1: bin/bus.1 bin/bus-broadcast.1 bin/bus-create.1 bin/bus-listen.1 bin/bus-remove.1 bin/bus-wait.1 + +bin/%.1: doc/%.1 + @echo SED $@ + @mkdir -p bin + @sed 's/%VERSION%/${VERSION}/g' < $< > $@ + +bin/%.3: doc/%.3 + @echo SED $@ + @mkdir -p bin + @sed 's/%VERSION%/${VERSION}/g' < $< > $@ + +bin/%.5: doc/%.5 + @echo SED $@ + @mkdir -p bin + @sed 's/%VERSION%/${VERSION}/g' < $< > $@ + +bin/%.7: doc/%.7 + @echo SED $@ + @mkdir -p bin + @sed 's/%VERSION%/${VERSION}/g' < $< > $@ bin/libbus.a: obj/bus-fpic.o @echo AR $@ @@ -51,5 +75,5 @@ clean: @echo cleaning @-rm -rf obj bin -.PHONY: all bus clean install uninstall +.PHONY: all doc bus man man1 clean install uninstall -- cgit v1.2.3-70-g09d2