From: Pavel Charvat Date: Tue, 10 Dec 2013 12:40:10 +0000 (+0100) Subject: Packages: Simplified definition of install targets. X-Git-Tag: v5.99~55 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=d306a98a767cebe06bb927af10888157c3e62ab9;p=libucw.git Packages: Simplified definition of install targets. --- diff --git a/Makefile b/Makefile index 24a5071b..4e31f5e6 100644 --- a/Makefile +++ b/Makefile @@ -66,8 +66,14 @@ libs: $(LIBUCW) $(LIBXML) $(LIBIMAGES) $(LIBCHARSET) include $(BUILDSYS)/Makebottom ifndef CONFIG_LOCAL -install: all $(INSTALL_TARGETS) +install: all $(INSTALL_TARGETS) install-libs install-api install-configs install-utils + +install-libs: $(INSTALL_LIB_TARGETS) +install-api: $(INSTALL_API_TARGETS) /sbin/ldconfig -n $(DESTDIR)$(INSTALL_LIB_DIR) +install-configs: $(INSTALL_CONFIG_TARGETS) +install-utils: $(INSTALL_UTILS_TARGETS) +.PHONY: install-libs install-api install-configs install-utils else install: @echo "Nothing to install, this is a local build." && false diff --git a/charset/Makefile b/charset/Makefile index 3fb8811c..ece588fa 100644 --- a/charset/Makefile +++ b/charset/Makefile @@ -39,12 +39,13 @@ build_charsets: clean:: rm -f $(s)/charset/misc/u-* -INSTALL_TARGETS+=install-libucw-charset install-libucw-charset-api install-libucw-charset-utils - -install-libucw-charset: +INSTALL_LIB_TARGETS+=install-libucw-charset-lib +install-libucw-charset-lib: install -d -m 755 $(DESTDIR)$(INSTALL_LIB_DIR) install -m 644 run/lib/libucw-charset.so.$(UCW_ABI_MAJOR) $(DESTDIR)$(INSTALL_LIB_DIR)/libucw-charset.so.$(UCW_ABI_VERSION) +.PHONY: install-libucw-charset-lib +INSTALL_API_TARGETS+=install-libucw-charset-api install-libucw-charset-api: install -d -m 755 $(DESTDIR)$(INSTALL_INCLUDE_DIR)/charset $(DESTDIR)$(INSTALL_LIB_DIR) $(DESTDIR)$(INSTALL_PKGCONFIG_DIR) install -m 644 $(addprefix run/include/charset/,$(LIBCHARSET_INCLUDES)) $(DESTDIR)$(INSTALL_INCLUDE_DIR)/charset @@ -52,9 +53,10 @@ install-libucw-charset-api: ln -sf libucw-charset.so.$(UCW_ABI_VERSION) $(DESTDIR)$(INSTALL_LIB_DIR)/libucw-charset.so install -m 644 run/lib/libucw-charset.a $(DESTDIR)$(INSTALL_LIB_DIR) install -m 644 run/lib/libucw-charset-pic.a $(DESTDIR)$(INSTALL_LIB_DIR) +.PHONY: install-libucw-charset-api +INSTALL_UTILS_TARGETS+=install-libucw-charset-utils install-libucw-charset-utils: install -d -m 755 $(DESTDIR)$(INSTALL_BIN_DIR) install -m 755 $(LIBCHARSET_PROGS) $(DESTDIR)$(INSTALL_BIN_DIR) - -.PHONY: install-libucw-charset install-libucw-charset-api install-libucw-charset-utils +.PHONY: install-libucw-charset-utils diff --git a/debian/control.in b/debian/control.in index e4d1a14c..5ec976fa 100644 --- a/debian/control.in +++ b/debian/control.in @@ -8,7 +8,7 @@ Package: libucw-@UCW_ABI_MAJOR@ Section: libs Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} -Description: LibUCW library +Description: LibUCW libraries Package: libucw-dev Section: libdevel diff --git a/debian/rules b/debian/rules index b0251004..6e608eb7 100755 --- a/debian/rules +++ b/debian/rules @@ -27,11 +27,11 @@ install: build dh_testroot dh_clean -k dh_installdirs - $(MAKE) DESTDIR=$(CURDIR)/debian/libucw-$(UCW_ABI_MAJOR) $(addprefix install-,libucw libucw-charset libucw-xml libucw-images) - $(MAKE) DESTDIR=$(CURDIR)/debian/libucw-dev $(addprefix install-,$(addsuffix -api,libucw libucw-charset libucw-xml libucw-images)) - $(MAKE) DESTDIR=$(CURDIR)/debian/libucw-utils install-ucw-utils install-ucw-shell install-libucw-charset-utils install-libucw-images-utils + $(MAKE) DESTDIR=$(CURDIR)/debian/libucw-$(UCW_ABI_MAJOR) install-libs + $(MAKE) DESTDIR=$(CURDIR)/debian/libucw-dev install-api + $(MAKE) DESTDIR=$(CURDIR)/debian/libucw-utils install-utils $(MAKE) DESTDIR=$(CURDIR)/debian/libucw-doc install-libucw-docs - $(MAKE) DESTDIR=$(CURDIR)/debian/libucw-doc install-libucw-config install-libucw-images-config + $(MAKE) DESTDIR=$(CURDIR)/debian/libucw-doc install-configs install -d -m 755 $(CURDIR)/debian/libucw-doc/usr/share/doc/libucw/examples cp -r examples/external $(CURDIR)/debian/libucw-doc/usr/share/doc/libucw/examples/program diff --git a/images/Makefile b/images/Makefile index 96fb1ece..803b96c8 100644 --- a/images/Makefile +++ b/images/Makefile @@ -92,12 +92,13 @@ $(o)/images/.include-stamp: $(addprefix $(s)/images/,$(LIBIMAGES_INCLUDES)) $(o)/images/.include-stamp: IDST=images run/lib/pkgconfig/libucw-images.pc: $(o)/images/libucw-images.pc -INSTALL_TARGETS+=install-libucw-images install-libucw-images-api install-libucw-images-utils install-libucw-images-config - -install-libucw-images: +INSTALL_LIB_TARGETS+=install-libucw-images-lib +install-libucw-images-lib: install -d -m 755 $(DESTDIR)$(INSTALL_LIB_DIR) install -m 644 run/lib/libucw-images.so.$(UCW_ABI_MAJOR) $(DESTDIR)$(INSTALL_LIB_DIR)/libucw-images.so.$(UCW_ABI_VERSION) +.PHONY: install-libucw-images-lib +INSTALL_API_TARGETS+=install-libucw-images-api install-libucw-images-api: install -d -m 755 $(addprefix $(DESTDIR),$(INSTALL_INCLUDE_DIR)/images $(INSTALL_LIB_DIR) $(INSTALL_PKGCONFIG_DIR)) install -m 644 $(addprefix run/include/images/,$(LIBIMAGES_INCLUDES)) $(DESTDIR)$(INSTALL_INCLUDE_DIR)/images @@ -105,13 +106,16 @@ install-libucw-images-api: ln -sf libucw-images.so.$(UCW_ABI_VERSION) $(DESTDIR)$(INSTALL_LIB_DIR)/libucw-images.so install -m 644 run/lib/libucw-images.a $(DESTDIR)$(INSTALL_LIB_DIR) install -m 644 run/lib/libucw-images-pic.a $(DESTDIR)$(INSTALL_LIB_DIR) +.PHONY: install-libucw-images-api +INSTALL_UTILS_TARGETS+=install-libucw-images-utils install-libucw-images-utils: install -d -m 755 $(DESTDIR)$(INSTALL_BIN_DIR) install -m 755 $(LIBIMAGES_PROGS) $(DESTDIR)$(INSTALL_BIN_DIR) +.PHONY: install-libucw-images-utils +INSTALL_CONFIG_TARGETS+=install-libucw-images-config install-libucw-images-config: install -d -m 755 $(DESTDIR)$(INSTALL_CONFIG_DIR) install -m 644 $(addprefix run/$(CONFIG_DIR)/,$(LIBIMAGES_CONFIGS)) $(DESTDIR)$(INSTALL_CONFIG_DIR) - -.PHONY: install-libucw-images install-libucw-images-api install-libucw-images-utils install-libucw-images-config +.PHONY: install-libucw-images-config diff --git a/ucw/Makefile b/ucw/Makefile index 557d3ea1..a91496e5 100644 --- a/ucw/Makefile +++ b/ucw/Makefile @@ -63,7 +63,8 @@ LIBUCW_MAIN_INCLUDES= \ strtonum.h \ resource.h trans.h \ daemon.h \ - signames.h + signames.h \ + sighandler.h ifdef CONFIG_UCW_THREADS # Some modules require threading @@ -184,12 +185,13 @@ endif CONFIGS+=libucw -INSTALL_TARGETS+=install-libucw install-libucw-api install-libucw-config - -install-libucw: +INSTALL_LIB_TARGETS+=install-libucw-lib +install-libucw-lib: install -d -m 755 $(DESTDIR)$(INSTALL_LIB_DIR) install -m 644 run/lib/libucw.so.$(UCW_ABI_MAJOR) $(DESTDIR)$(INSTALL_LIB_DIR)/libucw.so.$(UCW_ABI_VERSION) +.PHONY: install-libucw-lib +INSTALL_API_TARGETS+=install-libucw-api install-libucw-api: install -d -m 755 $(DESTDIR)$(INSTALL_LIB_DIR) $(DESTDIR)$(INSTALL_INCLUDE_DIR)/ucw/ $(DESTDIR)$(INSTALL_PKGCONFIG_DIR) install -m 644 $(addprefix run/include/ucw/,$(LIBUCW_MAIN_INCLUDES) autoconf.h config.h) $(DESTDIR)$(INSTALL_INCLUDE_DIR)/ucw/ @@ -197,9 +199,10 @@ install-libucw-api: ln -sf libucw.so.$(UCW_ABI_VERSION) $(DESTDIR)$(INSTALL_LIB_DIR)/libucw.so install -m 644 run/lib/libucw.a $(DESTDIR)$(INSTALL_LIB_DIR) install -m 644 run/lib/libucw-pic.a $(DESTDIR)$(INSTALL_LIB_DIR) +.PHONY: install-libucw-api +INSTALL_CONFIG_TARGETS+=install-libucw-config install-libucw-config: install -d -m 755 $(DESTDIR)$(INSTALL_CONFIG_DIR) install -m 644 run/$(CONFIG_DIR)/libucw $(DESTDIR)$(INSTALL_CONFIG_DIR) - -.PHONY: install-libucw install-libucw-api install-libucw-config +.PHONY: install-libucw-config diff --git a/ucw/shell/Makefile b/ucw/shell/Makefile index 96491f73..0b27d08f 100644 --- a/ucw/shell/Makefile +++ b/ucw/shell/Makefile @@ -13,9 +13,8 @@ TESTS+=$(addprefix $(o)/ucw/shell/,config.test) $(o)/ucw/shell/config.test: $(o)/ucw/shell/ucw-config -INSTALL_TARGETS+=install-ucw-shell +INSTALL_UTILS_TARGETS+=install-ucw-shell install-ucw-shell: install -d -m 755 $(DESTDIR)$(INSTALL_BIN_DIR) install -m 755 $(UCW_SHELL_PROGS) $(DESTDIR)$(INSTALL_BIN_DIR) - .PHONY: install-ucw-shell diff --git a/ucw/sorter/Makefile b/ucw/sorter/Makefile index 6bf98ed4..970ff8ed 100644 --- a/ucw/sorter/Makefile +++ b/ucw/sorter/Makefile @@ -17,9 +17,8 @@ TESTS+=$(o)/ucw/sorter/sort-test.test $(o)/ucw/sorter/sort-test.test: $(o)/ucw/sorter/sort-test $(o)/ucw/sorter/sort-test: $(o)/ucw/sorter/sort-test.o $(LIBUCW) -INSTALL_TARGETS+=install-ucw-sorter -install-ucw-sorter: +INSTALL_API_TARGETS+=install-ucw-sorter-api +install-ucw-sorter-api: install -d -m 755 $(DESTDIR)$(INSTALL_INCLUDE_DIR)/ucw/sorter install -m 644 $(addprefix run/include/ucw/,$(LIBUCW_SORTER_INCLUDES)) $(DESTDIR)$(INSTALL_INCLUDE_DIR)/ucw/sorter/ - -.PHONY: install-ucw-sorter +.PHONY: install-ucw-sorter-api diff --git a/ucw/utils/Makefile b/ucw/utils/Makefile index 1ba0449a..2a8f2b99 100644 --- a/ucw/utils/Makefile +++ b/ucw/utils/Makefile @@ -16,9 +16,8 @@ $(o)/ucw/utils/ucw-urltool: $(o)/ucw/utils/ucw-urltool.o $(LIBUCW) TESTS+=$(o)/ucw/utils/basecode.test $(o)/ucw/utils/basecode.test: $(o)/ucw/utils/ucw-basecode -INSTALL_TARGETS+=install-ucw-utils +INSTALL_UTILS_TARGETS+=install-ucw-utils install-ucw-utils: install -d -m 755 $(DESTDIR)$(INSTALL_BIN_DIR) install -m 755 $(UCW_UTILS) $(DESTDIR)$(INSTALL_BIN_DIR) - .PHONY: install-ucw-utils diff --git a/xml/Makefile b/xml/Makefile index bf1a8096..0025ed3f 100644 --- a/xml/Makefile +++ b/xml/Makefile @@ -45,12 +45,13 @@ $(o)/xml/.include-stamp: $(addprefix $(s)/xml/,$(LIBXML_INCLUDES)) $(o)/xml/.include-stamp: IDST=xml run/lib/pkgconfig/libucw-xml.pc: $(o)/xml/libucw-xml.pc -INSTALL_TARGETS+=install-libucw-xml install-libucw-xml-api - -install-libucw-xml: +INSTALL_LIB_TARGETS+=install-libucw-xml-lib +install-libucw-xml-lib: install -d -m 755 $(DESTDIR)$(INSTALL_LIB_DIR) install -m 644 run/lib/libucw-xml.so.$(UCW_ABI_MAJOR) $(DESTDIR)$(INSTALL_LIB_DIR)/libucw-xml.so.$(UCW_ABI_VERSION) +.PHONY: install-libucw-xml-lib +INSTALL_API_TARGETS+=install-libucw-xml-api install-libucw-xml-api: install -d -m 755 $(DESTDIR)$(INSTALL_INCLUDE_DIR)/xml $(DESTDIR)$(INSTALL_LIB_DIR) $(DESTDIR)$(INSTALL_PKGCONFIG_DIR) install -m 644 run/lib/pkgconfig/libucw-xml.pc $(DESTDIR)$(INSTALL_PKGCONFIG_DIR) @@ -58,5 +59,4 @@ install-libucw-xml-api: ln -sf libucw-xml.so.$(UCW_ABI_VERSION) $(DESTDIR)$(INSTALL_LIB_DIR)/libucw-xml.so install -m 644 run/lib/libucw-xml.a $(DESTDIR)$(INSTALL_LIB_DIR) install -m 644 run/lib/libucw-xml-pic.a $(DESTDIR)$(INSTALL_LIB_DIR) - -.PHONY: install-libucw-xml install-libucw-xml-api +.PHONY: install-libucw-xml-api