Commit 1fc7c89cb4d0e8ebc5721a6c4a42d6ed03e386bc

Authored by Jay Berkenbilt
1 parent b6f8c171

revamp install targets

git-svn-id: svn+q:///qpdf/trunk@854 71b93d88-0707-0410-a8cf-f5a4172ac649
Makefile
@@ -120,7 +120,9 @@ all: $(ALL_TARGETS) ; @@ -120,7 +120,9 @@ all: $(ALL_TARGETS) ;
120 120
121 check: $(TEST_TARGETS) 121 check: $(TEST_TARGETS)
122 122
123 -install_docs:: 123 +# Install targets are in the make directory in the rules-specific make
  124 +# fragments.
  125 +
124 install: all 126 install: all
125 ./mkinstalldirs $(DESTDIR)$(libdir) 127 ./mkinstalldirs $(DESTDIR)$(libdir)
126 ./mkinstalldirs $(DESTDIR)$(bindir) 128 ./mkinstalldirs $(DESTDIR)$(bindir)
make/gcc-linux.mk
@@ -80,3 +80,8 @@ endef @@ -80,3 +80,8 @@ endef
80 define makebin 80 define makebin
81 $(CXX) $(CXXFLAGS) $(1) -o $(2) $(LDFLAGS) $(3) $(4) 81 $(CXX) $(CXXFLAGS) $(1) -o $(2) $(LDFLAGS) $(3) $(4)
82 endef 82 endef
  83 +
  84 +# Install target
  85 +
  86 +install: all
  87 + @echo Automated installation is not supported for buildrules=$(BUILDRULES)
make/installwin.mk 0 → 100644
  1 +installwin: all
  2 + $(RM) -r $(INSTALL_DIR)
  3 + mkdir $(INSTALL_DIR)/bin
  4 + mkdir $(INSTALL_DIR)/lib
  5 + mkdir $(INSTALL_DIR)/include
  6 + mkdir $(INSTALL_DIR)/include/qpdf
  7 + mkdir $(INSTALL_DIR)/doc
  8 + cp libqpdf/$(OUTPUT_DIR)/qpdf.lib $(INSTALL_DIR)/lib
  9 + cp libqpdf/$(OUTPUT_DIR)/qpdf*.dll $(INSTALL_DIR)/bin
  10 + cp qpdf/$(OUTPUT_DIR)/bin/qpdf.exe $(INSTALL_DIR)/bin
  11 + cp zlib-flate/$(OUTPUT_DIR)/bin/zlib-flate.exe $(INSTALL_DIR)/bin
  12 + cp qpdf/fix-qdf $(INSTALL_DIR)/bin
  13 + cp include/qpdf/*.h $(INSTALL_DIR)/include/qpdf
  14 + cp include/qpdf/*.hh $(INSTALL_DIR)/include/qpdf
  15 + cp doc/stylesheet.css $(INSTALL_DIR)/doc
  16 + cp doc/qpdf-manual.html $(INSTALL_DIR)/doc
  17 + cp doc/qpdf-manual.pdf $(DESTDIR)$(docdir)
make/libtool.mk
@@ -89,3 +89,30 @@ endef @@ -89,3 +89,30 @@ endef
89 define makebin 89 define makebin
90 $(LIBTOOL) --mode=link $(CXX) $(CXXFLAGS) $(1) -o $(2) $(3) $(4) 90 $(LIBTOOL) --mode=link $(CXX) $(CXXFLAGS) $(1) -o $(2) $(3) $(4)
91 endef 91 endef
  92 +
  93 +# Install target
  94 +
  95 +install: all
  96 + ./mkinstalldirs $(DESTDIR)$(libdir)
  97 + ./mkinstalldirs $(DESTDIR)$(bindir)
  98 + ./mkinstalldirs $(DESTDIR)$(includedir)/qpdf
  99 + ./mkinstalldirs $(DESTDIR)$(docdir)
  100 + ./mkinstalldirs $(DESTDIR)$(mandir)/man1
  101 + $(LIBTOOL) --mode=install install -s -c \
  102 + libqpdf/$(OUTPUT_DIR)/libqpdf.la \
  103 + $(DESTDIR)$(libdir)/libqpdf.la
  104 + $(LIBTOOL) --finish $(DESTDIR)$(libdir)
  105 + $(RM) $(DESTDIR)$(libdir)/libqpdf.la
  106 + $(LIBTOOL) --mode=install install -s -c \
  107 + qpdf/$(OUTPUT_DIR)/qpdf \
  108 + $(DESTDIR)$(bindir)/qpdf
  109 + $(LIBTOOL) --mode=install install -s -c \
  110 + zlib-flate/$(OUTPUT_DIR)/zlib-flate \
  111 + $(DESTDIR)$(bindir)/zlib-flate
  112 + cp qpdf/fix-qdf $(DESTDIR)$(bindir)
  113 + cp include/qpdf/*.h $(DESTDIR)$(includedir)/qpdf
  114 + cp include/qpdf/*.hh $(DESTDIR)$(includedir)/qpdf
  115 + cp doc/stylesheet.css $(DESTDIR)$(docdir)
  116 + cp doc/qpdf-manual.html $(DESTDIR)$(docdir)
  117 + cp doc/qpdf-manual.pdf $(DESTDIR)$(docdir)
  118 + cp doc/*.1 $(DESTDIR)$(mandir)/man1
make/mingw.mk
@@ -72,3 +72,11 @@ endef @@ -72,3 +72,11 @@ endef
72 define makebin 72 define makebin
73 $(CXX) $(CXXFLAGS) $(1) -o $(2) $(3) $(4) 73 $(CXX) $(CXXFLAGS) $(1) -o $(2) $(3) $(4)
74 endef 74 endef
  75 +
  76 +# Install target
  77 +
  78 +INSTALL_DIR = install-mingw
  79 +include make/installwin.mk
  80 +install: installwin
  81 + strip $(INSTALL_DIR)/bin/*.exe
  82 + strip $(INSTALL_DIR)/bin/*.dll
make/msvc.mk
@@ -88,3 +88,9 @@ define makebin @@ -88,3 +88,9 @@ define makebin
88 -outputresource:$(2)\;2; \ 88 -outputresource:$(2)\;2; \
89 fi 89 fi
90 endef 90 endef
  91 +
  92 +# Install target
  93 +
  94 +INSTALL_DIR = install-msvc
  95 +include make/installwin.mk
  96 +install: installwin