From 812fb86e014032c42aaf1743bd521c739b3b0714 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Fri, 4 Dec 2015 22:34:21 +0100 Subject: improve makefile MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- Makefile | 46 ++++++++++++++++++++++++---------------------- 1 file changed, 24 insertions(+), 22 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 5a445ec..ef5442f 100644 --- a/Makefile +++ b/Makefile @@ -127,30 +127,32 @@ obj/test.o: src/test.c src/test.h $(CC) $(CC_FLAGS) -o "$@" -c "$<" $(CFLAGS) $(CPPFLAGS) .PHONY: info -info: libpassphrase.info -%.info: info/%.texinfo +info: bin/libpassphrase.info +bin/%.info: info/%.texinfo + @mkdir -p bin makeinfo "$<" + mv $*.info $@ .PHONY: pdf -pdf: libpassphrase.pdf -%.pdf: info/%.texinfo info/fdl.texinfo - @mkdir -p obj/pdf - cd obj/pdf ; yes X | texi2pdf ../../$< - mv obj/pdf/$@ $@ +pdf: bin/libpassphrase.pdf +bin/%.pdf: info/%.texinfo info/fdl.texinfo + @mkdir -p obj/pdf bin + cd obj/pdf && texi2pdf ../../$< < /dev/null + mv obj/pdf/$*.pdf $@ .PHONY: dvi -dvi: libpassphrase.dvi -%.dvi: info/%.texinfo info/fdl.texinfo - @mkdir -p obj/dvi - cd obj/dvi ; yes X | $(TEXI2DVI) ../../$< - mv obj/dvi/$@ $@ +dvi: bin/libpassphrase.dvi +bin/%.dvi: info/%.texinfo info/fdl.texinfo + @mkdir -p obj/dvi bin + cd obj/dvi && $(TEXI2DVI) ../../$< < /dev/null + mv obj/dvi/$*.dvi $@ .PHONY: ps -ps: libpassphrase.ps -%.ps: info/%.texinfo info/fdl.texinfo - @mkdir -p obj/ps - cd obj/ps ; yes X | texi2pdf --ps ../../$< - mv obj/ps/$@ $@ +ps: bin/libpassphrase.ps +bin/%.ps: info/%.texinfo info/fdl.texinfo + @mkdir -p obj/ps bin + cd obj/ps && texi2pdf --ps ../../$< < /dev/null + mv obj/ps/$*.ps $@ .PHONY: install @@ -189,22 +191,22 @@ install-license: install-doc: install-info install-pdf install-ps install-dvi .PHONY: install-info -install-info: libpassphrase.info +install-info: bin/libpassphrase.info install -dm755 -- "$(DESTDIR)$(INFODIR)" install -m644 -- "$<" "$(DESTDIR)$(INFODIR)/$(PKGNAME).info" .PHONY: install-pdf -install-pdf: libpassphrase.pdf +install-pdf: bin/libpassphrase.pdf install -dm755 -- "$(DESTDIR)$(DOCDIR)" install -m644 -- "$<" "$(DESTDIR)$(DOCDIR)/$(PKGNAME).pdf" .PHONY: install-ps -install-ps: libpassphrase.ps +install-ps: bin/libpassphrase.ps install -dm755 -- "$(DESTDIR)$(DOCDIR)" install -m644 -- "$<" "$(DESTDIR)$(DOCDIR)/$(PKGNAME).ps" .PHONY: install-dvi -install-dvi: libpassphrase.dvi +install-dvi: bin/libpassphrase.dvi install -dm755 -- "$(DESTDIR)$(DOCDIR)" install -m644 -- "$<" "$(DESTDIR)$(DOCDIR)/$(PKGNAME).dvi" @@ -225,5 +227,5 @@ uninstall: .PHONY: clean clean: - -rm -r bin obj *.info *.pdf *.ps *.dvi + -rm -r bin obj -- cgit v1.2.3-70-g09d2