From: Martin Mares Date: Sun, 25 Jan 2009 15:54:52 +0000 (+0100) Subject: UCW Configure: Evaluate INSTALL_xxx at time of configuration. X-Git-Tag: holmes-import~118^2~8 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=60777a0d2f29fe9c3440fb788024a0e0d699f2ea;p=libucw.git UCW Configure: Evaluate INSTALL_xxx at time of configuration. It is often necessary to substitute the paths to C sources and config files, so they must be fully expanded and free of constructs specific for the makefile language. Also, we need CONFIG_DIR at the time of configuration. --- diff --git a/ucw/perl/UCW/Configure/Paths.pm b/ucw/perl/UCW/Configure/Paths.pm index bd22ca3d..f28ccb12 100644 --- a/ucw/perl/UCW/Configure/Paths.pm +++ b/ucw/perl/UCW/Configure/Paths.pm @@ -1,5 +1,5 @@ # UCW Library configuration system: installation paths -# (c) 2005--2008 Martin Mares +# (c) 2005--2009 Martin Mares # (c) 2006 Robert Spalek # (c) 2008 Michal Vaner @@ -27,19 +27,20 @@ if (IsSet("CONFIG_LOCAL")) { Log(Get("PREFIX") . "\n"); } -Set("INSTALL_CONFIG_DIR", '$(INSTALL_PREFIX)$(CONFIG_DIR)'); -Set("INSTALL_BIN_DIR", '$(INSTALL_USR_PREFIX)bin'); -Set("INSTALL_SBIN_DIR", '$(INSTALL_USR_PREFIX)sbin'); -Set("INSTALL_LIB_DIR", '$(INSTALL_USR_PREFIX)lib'); -Set("INSTALL_INCLUDE_DIR", '$(INSTALL_USR_PREFIX)include'); -Set("INSTALL_PKGCONFIG_DIR", '$(INSTALL_USR_PREFIX)lib/pkgconfig'); -Set("INSTALL_SHARE_DIR", '$(INSTALL_USR_PREFIX)share'); -Set("INSTALL_MAN_DIR", '$(INSTALL_USR_PREFIX)share/man'); -Set("INSTALL_LOG_DIR", '$(INSTALL_VAR_PREFIX)log'); -Set("INSTALL_STATE_DIR", '$(INSTALL_VAR_PREFIX)lib'); -Set("INSTALL_RUN_DIR", '$(INSTALL_VAR_PREFIX)run'); -Set("INSTALL_DOC_DIR", '$(INSTALL_USR_PREFIX)share/doc'); -Set("INSTALL_PERL_DIR", '$(INSTALL_LIB_DIR)/perl5'); +Set('CONFIG_DIR', 'etc') unless IsSet('CONFIG_DIR'); +Set('INSTALL_CONFIG_DIR', Get('INSTALL_PREFIX') . Get('CONFIG_DIR')); +Set('INSTALL_BIN_DIR', Get('INSTALL_USR_PREFIX') . 'bin'); +Set('INSTALL_SBIN_DIR', Get('INSTALL_USR_PREFIX') . 'sbin'); +Set('INSTALL_LIB_DIR', Get('INSTALL_USR_PREFIX') . 'lib'); +Set('INSTALL_INCLUDE_DIR', Get('INSTALL_USR_PREFIX') . 'include'); +Set('INSTALL_PKGCONFIG_DIR', Get('INSTALL_USR_PREFIX') . 'lib/pkgconfig'); +Set('INSTALL_SHARE_DIR', Get('INSTALL_USR_PREFIX') . 'share'); +Set('INSTALL_MAN_DIR', Get('INSTALL_USR_PREFIX') . 'share/man'); +Set('INSTALL_LOG_DIR', Get('INSTALL_VAR_PREFIX') . 'log'); +Set('INSTALL_STATE_DIR', Get('INSTALL_VAR_PREFIX') . 'lib'); +Set('INSTALL_RUN_DIR', Get('INSTALL_VAR_PREFIX') . 'run'); +Set('INSTALL_DOC_DIR', Get('INSTALL_USR_PREFIX') . 'share/doc'); +Set('INSTALL_PERL_DIR', Get('INSTALL_LIB_DIR') . '/perl5'); # Remember PKG_CONFIG_PATH used for building, so that it will be propagated to # pkg-config's run locally in the makefiles.