diff --git a/Makefile b/Makefile index 1f03c95..80796da 100755 --- a/Makefile +++ b/Makefile @@ -181,8 +181,11 @@ $(eval $(call make-obj-rule,$(src)))) $(call qcmd,tools/write-config \ --name=$(NAME) --version=$(VERSION) --target="$(TARGET)" \ --maintainer="$(MAINTAINER_NAME) <$(MAINTAINER_MAIL)>" \ - >"$(IBINDIR)/$(TARGET)lib$(NAME)-config" \ - && chmod 755 "$(IBINDIR)/$(TARGET)lib$(NAME)-config") + >"$(IBINDIR)/lib$(NAME)-config" \ + && chmod 755 "$(IBINDIR)/lib$(NAME)-config") + $(if $(TARGET),$(call qcmd,$(INST) -m 755 -d "$(HBINDIR)")) + $(if $(TARGET),$(call qcmd,$(LN) -r \ + "$(IBINDIR)/lib$(NAME)-config" "$(HBINDIR)/$(TARGET)lib$(NAME)-config")) $(call imsg,Installing the pkg-config configuration.) $(call qcmd,$(INST) -m 755 -d "$(IPKGDIR)") @@ -197,7 +200,9 @@ $(eval $(call make-obj-rule,$(src)))) # Uninstall it uninstall-cfgtool: $(CHECKCFG) $(call rmsg,Uninstalling configuration tool and package.) - $(call qcmd,$(RM) "$(IBINDIR)/lib$(NAME)-config" "$(IPKGDIR)/lib$(NAME).pc") + $(call qcmd,$(RM) "$(IPKGDIR)/lib$(NAME).pc" \ + "$(IBINDIR)/lib$(NAME)-config" "$(IBINDIR)/"*"-lib$(NAME)-config" \ + $(if $(TARGET),"$(HBINDIR)/$(TARGET)lib$(NAME)-config")) .PHONY: install-cfgtool uninstall-cfgtool #******************************************************************************# diff --git a/Makefile.vars b/Makefile.vars index e89ff5e..45148c8 100755 --- a/Makefile.vars +++ b/Makefile.vars @@ -162,7 +162,8 @@ $(eval $(call check-man,$(patsubst .%,%,$(suffix $(doc))),$(basename $(doc))))) define add-dest-dir $1 = $(DESTDIR)$($1) endef -$(if $(DESTDIR), $(foreach idir,IBINDIR IPKGDIR ILIBDIR IINCDIR IMANDIR, \ +$(if $(DESTDIR), $(foreach idir,\ +IBINDIR IPKGDIR ILIBDIR IINCDIR IMANDIR HBINDIR, \ $(eval $(call add-dest-dir,$(idir))))) # END OF FILE diff --git a/configure b/configure index 38a3941..1a884ce 100755 --- a/configure +++ b/configure @@ -30,7 +30,9 @@ loglevel=none # none, info, warn, error, fatal root='' prefix='${root}/usr' prefix_set= +hprefix='${root}/usr' bindir='${prefix}/bin' +hbindir='${hprefix}/bin' libdir='${prefix}/lib'"$platform" includedir='${prefix}/include'"$platform" pkgdir='${libdir}/pkgconfig' @@ -75,13 +77,15 @@ Installation options: Installation directories: --root=ROOT installation root [$root] --prefix=PREFIX main installation prefix [$prefix] + --hprefix=HOSTPREFIX host installation prefix [$hprefix] Fine tuning of the installation directories: - --bindir=DIR executables [$bindir] - --pkgdir=DIR pkg-config configurations directory [$pkgdir] - --libdir=DIR library files of the linker [$libdir] - --includedir=DIR include files for the compiler [$includedir] - --mandir=DIR man root [$mandir] + --hbindir=HOSTBINDIR host executables [$hbindir] + --bindir=BINDIR target executables [$bindir] + --pkgdir=PKGDIR pkg-config configurations directory [$pkgdir] + --libdir=LIBDIR library files of the linker [$libdir] + --includedir=INCDIR include files for the compiler [$includedir] + --mandir=MANDIR man root [$mandir] Other tweaks: CFLAGS=CFLAGS some more compilation flags @@ -146,7 +150,9 @@ got '$level'" --noinstall-manpages) install_manpages= ;; --noinstall-devel) install_devel= ;; --root=*) root="${arg#*=}" ;; +--hprefix=*) hprefix="${arg#*=}" ;; --prefix=*) prefix="${arg#*=}"; prefix_set=y ;; +--hbindir=*) hbindir="${arg#*=}" ;; --bindir=*) bindir="${arg#*=}" ;; --pkgdir=*) pkgdir="${arg#*=}" ;; --libdir=*) libdir="${arg#*=}" ;; @@ -172,7 +178,7 @@ case "$target" in *-mingw32) if [ ! "$static" ]; then fi;; esac # Evaluate variables -vars="prefix bindir libdir pkgdir includedir mandir" +vars="prefix bindir libdir pkgdir includedir mandir hprefix hbindir" for var in $vars; do eval $var'='$(eval 'echo $'$var) done @@ -243,6 +249,7 @@ cat <