diff options
author | 2018-10-20 19:55:51 +0100 | |
---|---|---|
committer | 2018-10-20 19:55:51 +0100 | |
commit | e94b23e290b2a6a3c76fef471535608820e9f1fc (patch) | |
tree | 993ed82a20d1abc567918d93ea059f199d4102d4 | |
parent | makefile: use ':' separator in set expressions consistently (diff) | |
download | crossdev-e94b23e290b2a6a3c76fef471535608820e9f1fc.tar.gz crossdev-e94b23e290b2a6a3c76fef471535608820e9f1fc.tar.bz2 crossdev-e94b23e290b2a6a3c76fef471535608820e9f1fc.zip |
wrappers: use @TOPDIR@ and @PREFIX@ instead of __TOPDIR__ and __PREFIX__
Leave __<var>__ substitutions for runtime substitution
and keep @<var>@ for 'make install' substitution.
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
-rw-r--r-- | wrappers/Makefile | 4 | ||||
-rwxr-xr-x | wrappers/emerge-wrapper | 4 | ||||
-rwxr-xr-x | wrappers/site/config.site | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/wrappers/Makefile b/wrappers/Makefile index 15518bd..73f0dcc 100644 --- a/wrappers/Makefile +++ b/wrappers/Makefile @@ -17,8 +17,8 @@ install: cp -a etc $(DESTDIR)/$(PREFIX)/share/crossdev/ sed -i -e "s:@GENTOO_PORTAGE_EPREFIX@:$(EPREFIX):g" $(DESTDIR)/$(PREFIX)/share/crossdev/etc/portage/make.conf cp -a site $(DESTDIR)/$(PREFIX)/share/crossdev/include/ - sed -i -e s@__PREFIX__@$(PREFIX)@g $(DESTDIR)/$(PREFIX)/bin/emerge-wrapper - sed -i -e s@__TOPDIR__@$(SITE)@g $(DESTDIR)/$(SITE)/config.site + sed -i -e s:@PREFIX@:$(PREFIX):g $(DESTDIR)/$(PREFIX)/bin/emerge-wrapper + sed -i -e s:@TOPDIR@:$(SITE):g $(DESTDIR)/$(SITE)/config.site mv $(DESTDIR)/$(SITE)/config.site $(DESTDIR)/$(PREFIX)/share/ ln -sf $(PORTDIR)/profiles/embedded $(DESTDIR)/$(PREFIX)/share/crossdev/etc/portage/make.profile diff --git a/wrappers/emerge-wrapper b/wrappers/emerge-wrapper index d23d00e..fc53f2a 100755 --- a/wrappers/emerge-wrapper +++ b/wrappers/emerge-wrapper @@ -13,9 +13,9 @@ if [[ $1 == "--help" || $1 == "-h" ]] ; then exit 0 fi -PREFIX="__PREFIX__" +PREFIX="@PREFIX@" # Enable this script to be manually installed while debugging -[[ ${PREFIX} == \_\_\P\R\E\F\I\X\_\_ ]] && PREFIX="/usr" +[[ ${PREFIX} == "@"PREFIX"@" ]] && PREFIX="/usr" err() { echo "emerge-wrapper: $*" 1>&2; exit 1; } diff --git a/wrappers/site/config.site b/wrappers/site/config.site index 05c7823..44182a5 100755 --- a/wrappers/site/config.site +++ b/wrappers/site/config.site @@ -2,7 +2,7 @@ # Copyright 2009-2014 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -TOPDIR=__TOPDIR__ +TOPDIR="@TOPDIR@" config_site_arch() { local host="${CHOST%%-*}" |