diff options
author | Mike Frysinger <vapier@gentoo.org> | 2011-12-19 20:27:36 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2011-12-19 20:27:36 +0000 |
commit | e49f07f0627dacac164460c2defd8e5ad801435b (patch) | |
tree | 7fc1effc74733b3098f810ccd013806cce5b555d | |
parent | dump variable values after we have expanded inline variables (diff) | |
download | portage-utils-e49f07f0627dacac164460c2defd8e5ad801435b.tar.gz portage-utils-e49f07f0627dacac164460c2defd8e5ad801435b.tar.bz2 portage-utils-e49f07f0627dacac164460c2defd8e5ad801435b.zip |
rename EPREFIX define to CONFIG_EPREFIX so we can have a local $EPREFIX var
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | libq/colors.c | 2 | ||||
-rw-r--r-- | libq/profile.c | 4 | ||||
-rw-r--r-- | main.c | 28 | ||||
-rw-r--r-- | main.h | 6 | ||||
-rw-r--r-- | qlop.c | 6 |
6 files changed, 24 insertions, 24 deletions
diff --git a/configure.ac b/configure.ac index bf84600b..645d04ee 100644 --- a/configure.ac +++ b/configure.ac @@ -19,7 +19,7 @@ case "$with_eprefix" in */) with_eprefix="$with_eprefix" ;; *) with_eprefix="${with_eprefix}/" ;; esac -AC_DEFINE_UNQUOTED([EPREFIX], ["$with_eprefix"], [path for Gentoo/Prefix project]) +AC_DEFINE_UNQUOTED([CONFIG_EPREFIX], ["$with_eprefix"], [path for Gentoo/Prefix project]) AX_CFLAGS_WARN_ALL AC_DEFUN([PT_CHECK_CFLAG],[AX_CHECK_COMPILER_FLAGS([$1],[CFLAGS="$CFLAGS $1"])]) diff --git a/libq/colors.c b/libq/colors.c index 145a161c..bb315b0f 100644 --- a/libq/colors.c +++ b/libq/colors.c @@ -18,7 +18,7 @@ static const char *YELLOW = _MAKE_COLOR("33", "01"); static const char *BRYELLOW = _MAKE_COLOR("01", "33"); static const char *WHITE = _MAKE_COLOR("01", "38"); -static const char *COLOR_MAP = EPREFIX "etc/portage/color.map"; +static const char *COLOR_MAP = CONFIG_EPREFIX "etc/portage/color.map"; #define COLOR _MAKE_COLOR diff --git a/libq/profile.c b/libq/profile.c index 7b0a4cb4..707695dc 100644 --- a/libq/profile.c +++ b/libq/profile.c @@ -72,6 +72,6 @@ _q_static void * q_profile_walk(const char *file, q_profile_callback_t callback, void *data) { /* Walk the profiles and read the file in question */ - data = q_profile_walk_at(AT_FDCWD, EPREFIX "etc/make.profile", file, callback, data); - return q_profile_walk_at(AT_FDCWD, EPREFIX "etc/portage/make.profile", file, callback, data); + data = q_profile_walk_at(AT_FDCWD, CONFIG_EPREFIX "etc/make.profile", file, callback, data); + return q_profile_walk_at(AT_FDCWD, CONFIG_EPREFIX "etc/portage/make.profile", file, callback, data); } @@ -1,7 +1,7 @@ /* * Copyright 2005-2008 Gentoo Foundation * Distributed under the terms of the GNU General Public License v2 - * $Header: /var/cvsroot/gentoo-projects/portage-utils/main.c,v 1.209 2011/12/19 20:09:48 vapier Exp $ + * $Header: /var/cvsroot/gentoo-projects/portage-utils/main.c,v 1.210 2011/12/19 20:27:36 vapier Exp $ * * Copyright 2005-2008 Ned Ludd - <solar@gentoo.org> * Copyright 2005-2008 Mike Frysinger - <vapier@gentoo.org> @@ -657,10 +657,10 @@ void initialize_portage_env(void) const char *s; static const char * const files[] = { - EPREFIX "etc/make.globals", - EPREFIX "usr/share/portage/config/make.globals", - EPREFIX "etc/make.conf", - EPREFIX "etc/portage/make.conf", + CONFIG_EPREFIX "etc/make.globals", + CONFIG_EPREFIX "usr/share/portage/config/make.globals", + CONFIG_EPREFIX "etc/make.conf", + CONFIG_EPREFIX "etc/portage/make.conf", }; bool nocolor = 0; @@ -682,16 +682,16 @@ void initialize_portage_env(void) _Q_EVS(STR, ACCEPT_LICENSE, accept_license, "") _Q_EVS(ISTR, INSTALL_MASK, install_mask, "") _Q_EVS(STR, ARCH, portarch, "") - _Q_EVS(ISTR, CONFIG_PROTECT, config_protect, EPREFIX "etc") + _Q_EVS(ISTR, CONFIG_PROTECT, config_protect, CONFIG_EPREFIX "etc") _Q_EVS(ISTR, CONFIG_PROTECT_MASK, config_protect_mask, "") _Q_EVB(BOOL, NOCOLOR, nocolor, 0) _Q_EVS(ISTR, FEATURES, features, "noman noinfo nodoc") - _Q_EVS(STR, EPREFIX, eprefix, EPREFIX) - _Q_EVS(STR, PORTDIR, portdir, EPREFIX "usr/portage") + _Q_EVS(STR, EPREFIX, eprefix, CONFIG_EPREFIX) + _Q_EVS(STR, PORTDIR, portdir, CONFIG_EPREFIX "usr/portage") _Q_EVS(STR, PORTAGE_BINHOST, binhost, DEFAULT_PORTAGE_BINHOST) - _Q_EVS(STR, PORTAGE_TMPDIR, port_tmpdir, EPREFIX "var/tmp/portage/") - _Q_EVS(STR, PKGDIR, pkgdir, EPREFIX "usr/portage/packages/") - _Q_EVS(STR, Q_VDB, portvdb, EPREFIX "var/db/pkg") + _Q_EVS(STR, PORTAGE_TMPDIR, port_tmpdir, CONFIG_EPREFIX "var/tmp/portage/") + _Q_EVS(STR, PKGDIR, pkgdir, CONFIG_EPREFIX "usr/portage/packages/") + _Q_EVS(STR, Q_VDB, portvdb, CONFIG_EPREFIX "var/db/pkg") { NULL, 0, _Q_BOOL, { NULL }, 0, NULL, } #undef _Q_EV @@ -709,8 +709,8 @@ void initialize_portage_env(void) if (!s) s = "/"; - read_portage_profile(s, EPREFIX "etc/make.profile", vars_to_read); - read_portage_profile(s, EPREFIX "etc/portage/make.profile", vars_to_read); + read_portage_profile(s, CONFIG_EPREFIX "etc/make.profile", vars_to_read); + read_portage_profile(s, CONFIG_EPREFIX "etc/portage/make.profile", vars_to_read); /* now read all the config files */ for (i = 0; i < ARRAY_SIZE(files); ++i) @@ -1182,7 +1182,7 @@ int main(int argc, char **argv) #ifdef ENABLE_NLS /* never tested */ setlocale(LC_ALL, ""); - bindtextdomain(argv0, EPREFIX "usr/share/locale"); + bindtextdomain(argv0, CONFIG_EPREFIX "usr/share/locale"); textdomain(argv0); #endif #if 1 @@ -1,7 +1,7 @@ /* * Copyright 2005-2010 Gentoo Foundation * Distributed under the terms of the GNU General Public License v2 - * $Header: /var/cvsroot/gentoo-projects/portage-utils/main.h,v 1.14 2011/12/12 21:29:22 vapier Exp $ + * $Header: /var/cvsroot/gentoo-projects/portage-utils/main.h,v 1.15 2011/12/19 20:27:36 vapier Exp $ * * Copyright 2005-2010 Ned Ludd - <solar@gentoo.org> * Copyright 2005-2010 Mike Frysinger - <vapier@gentoo.org> @@ -82,6 +82,6 @@ # define O_CLOEXEC 0 #endif -#ifndef EPREFIX -#define EPREFIX "/" +#ifndef CONFIG_EPREFIX +#define CONFIG_EPREFIX "/" #endif @@ -1,7 +1,7 @@ /* * Copyright 2005-2010 Gentoo Foundation * Distributed under the terms of the GNU General Public License v2 - * $Header: /var/cvsroot/gentoo-projects/portage-utils/qlop.c,v 1.57 2011/12/18 01:31:11 vapier Exp $ + * $Header: /var/cvsroot/gentoo-projects/portage-utils/qlop.c,v 1.58 2011/12/19 20:27:36 vapier Exp $ * * Copyright 2005-2010 Ned Ludd - <solar@gentoo.org> * Copyright 2005-2010 Mike Frysinger - <vapier@gentoo.org> @@ -27,7 +27,7 @@ # include <sys/sysctl.h> #endif -#define QLOP_DEFAULT_LOGFILE EPREFIX "var/log/emerge.log" +#define QLOP_DEFAULT_LOGFILE CONFIG_EPREFIX "var/log/emerge.log" #define QLOP_FLAGS "gtHluscf:" COMMON_FLAGS static struct option const qlop_long_opts[] = { @@ -52,7 +52,7 @@ static const char * const qlop_opts_help[] = { "Read emerge logfile instead of " QLOP_DEFAULT_LOGFILE, COMMON_OPTS_HELP }; -static const char qlop_rcsid[] = "$Id: qlop.c,v 1.57 2011/12/18 01:31:11 vapier Exp $"; +static const char qlop_rcsid[] = "$Id: qlop.c,v 1.58 2011/12/19 20:27:36 vapier Exp $"; #define qlop_usage(ret) usage(ret, QLOP_FLAGS, qlop_long_opts, qlop_opts_help, lookup_applet_idx("qlop")) #define QLOP_LIST 0x01 |