From 5defd3fdfe4ee5c953e2b64df5a8ce99dda58491 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Mon, 25 Nov 2013 01:37:44 +0100 Subject: start on info manual MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- Makefile | 35 +++++++++++++++++++++++++++++++---- 1 file changed, 31 insertions(+), 4 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 8ccea46..19162da 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,9 @@ PREFIX = /usr LIB = /lib +DATA = /share INCLUDE = /include +LICENSES = $(DATA)/licenses +PKGNAME = libpassphrase OPTIONS = # PASSPHRASE_ECHO: Do not hide the passphrase @@ -28,9 +31,12 @@ OBJ = $(foreach S, $(SRC), obj/$(S).o) .PHONY: all -all: bin/libpassphrase.so +all: libpassphrase doc +.PHONY: libpassphrase +libpassphrase: bin/libpassphrase.so + bin/libpassphrase.so: $(OBJ) @mkdir -p bin $(CC) $(LD_FLAGS) -o "$@" $^ @@ -40,21 +46,42 @@ obj/%.o: src/%.c src/%.h $(CC) $(CC_FLAGS) -o "$@" -c "$<" +.PHONY: doc +doc: info + +.PHONY: info +info: libpassphrase.info.gz + +%.info: info/%.texinfo + makeinfo "$<" + +%.gz: % + gzip -9 < "$<" > "$@" + + .PHONY: install install: bin/libpassphrase.so install -dm755 -- "$(DESTDIR)$(PREFIX)$(LIB)" install -dm755 -- "$(DESTDIR)$(PREFIX)$(INCLUDE)" - install -m755 -- bin/libpassphrase.so "$(DESTDIR)$(PREFIX)$(LIB)" - install -m755 -- src/passphrase.h "$(DESTDIR)$(PREFIX)$(INCLUDE)" + install -m755 -- bin/libpassphrase.so "$(DESTDIR)$(PREFIX)$(LIB)" + install -m755 -- src/passphrase.h "$(DESTDIR)$(PREFIX)$(INCLUDE)" + install -dm755 -- "$(DESTDIR)$(PREFIX)$(LICENSES)/$(PKGNAME)" + install -m644 -- COPYING LICENSE "$(DESTDIR)$(PREFIX)$(LICENSES)/$(PKGNAME)" + install -dm755 -- "$(DESTDIR)$(PREFIX)$(DATA)/info" + install -m644 -- libpassphrase.info.gz "$(DESTDIR)$(PREFIX)$(DATA)/info/$(PKGNAME).info.gz" .PHONY: uninstall uninstall: -rm -- "$(DESTDIR)$(PREFIX)$(LIB)/libpassphrase.so" -rm -- "$(DESTDIR)$(PREFIX)$(INCLUDE)/passphrase.h" + -rm -- "$(DESTDIR)$(PREFIX)$(LICENSES)/$(PKGNAME)/COPYING" + -rm -- "$(DESTDIR)$(PREFIX)$(LICENSES)/$(PKGNAME)/LICENSE" + -rmdir -- "$(DESTDIR)$(PREFIX)$(LICENSES)/$(PKGNAME)" + -rm -- "$(DESTDIR)$(PREFIX)$(DATA)/info/$(PKGNAME).info.gz" .PHONY: clean clean: - -rm -r bin obj + -rm -r bin obj libpassphrase.info.gz -- cgit v1.2.3-70-g09d2