summaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authorPatrick McDermott <patrick.mcdermott@libiquity.com>2019-05-14 01:57:21 (EDT)
committer Patrick McDermott <patrick.mcdermott@libiquity.com>2019-05-14 01:57:21 (EDT)
commit83296b5e1eb9f40ceee4c161e201aedd8a642ba5 (patch)
tree9e7ea9f367ea03da1054e0c3f8997b77460447ff /build
parent6f32709918fbd94c73df7191c77f2b754d162deb (diff)
build: Fix destdir in dir macros
Diffstat (limited to 'build')
-rwxr-xr-xbuild40
1 files changed, 21 insertions, 19 deletions
diff --git a/build b/build
index 9a1c771..e56985b 100755
--- a/build
+++ b/build
@@ -64,9 +64,9 @@ bootstrap1_opts = \
--disable-libgomp \
--disable-libssp
-libdir = $(destdir)/usr/lib/$(OPK_HOST_ARCH)
-gcclibdir = $(destdir)/usr/lib/$(OPK_HOST_ARCH)/gcc-$(base_version)
-tgtlibdir = $(destdir)/usr/lib/$(OPK_HOST_ARCH)/$(target)/gcc-$(base_version)
+libdir = /usr/lib/$(OPK_HOST_ARCH)
+gcclibdir = /usr/lib/$(OPK_HOST_ARCH)/gcc-$(base_version)
+tgtlibdir = /usr/lib/$(OPK_HOST_ARCH)/$(target)/gcc-$(base_version)
tgtincdir = /usr/include/$(target)/c++-$(base_version)
libsuffix = $$(g++ -print-multi-os-directory)
dir_macros = \
@@ -179,21 +179,22 @@ $(installnative_targets):
ln -s $(target)-g++-$(base_version) \
$(destdir)/usr/bin/$(target)-c++-$(base_version)
# Move files into ProteanOS-style directories.
- mkdir -p $(tgtlibdir)
- mv $(libdir)/gcc/$(target_gnu)/$(version)/* $(tgtlibdir)
- mkdir -p $(gcclibdir)
- mv $(libdir)/$(libsuffix)/* $(gcclibdir)
+ mkdir -p $(destdir)$(tgtlibdir)
+ mv $(destdir)$(libdir)/gcc/$(target_gnu)/$(version)/* \
+ $(destdir)$(tgtlibdir)
+ mkdir -p $(destdir)$(gcclibdir)
+ mv $(destdir)$(libdir)/$(libsuffix)/* $(destdir)$(gcclibdir)
mkdir -p $(destdir)$(tgtincdir)
mv $(destdir)/usr/include/c++-$(base_version)/$(target_gnu)/* \
$(destdir)$(tgtincdir)
# Remove libquadmath files.
- rm -f $(gcclibdir)/libquadmath.*
+ rm -f $(destdir)$(gcclibdir)/libquadmath.*
# Remove libtool archives and static libraries.
rm -f \
- $(gcclibdir)/*.la \
- $(gcclibdir)/*.a \
- $(tgtlibdir)/*.la \
- $(tgtlibdir)/plugin/*.la
+ $(destdir)$(gcclibdir)/*.la \
+ $(destdir)$(gcclibdir)/*.a \
+ $(destdir)$(tgtlibdir)/*.la \
+ $(destdir)$(tgtlibdir)/plugin/*.la
# Remove the info directory node.
rm -f $(destdir)/usr/share/info/dir
# Remove empty documentation files.
@@ -203,9 +204,9 @@ $(installnative_targets):
-exec rm -f '{}' ';'
# TODO: Provide these files in a fixincludes package (arch:any,
# target-specific?).
- rm -Rf $(tgtlibdir)/install-tools/
+ rm -Rf $(destdir)$(tgtlibdir)/install-tools/
# TODO: Provide these files in a libstdc++-*-dbg package.
- rm -f $(gcclibdir)/libstdc++.so.*-gdb.py
+ rm -f $(destdir)$(gcclibdir)/libstdc++.so.*-gdb.py
rm -Rf $(destdir)/usr/share/gcc-$(version)/python/libstdcxx/
# TODO: Provide these files in a doc package.
rm -Rf $(destdir)/usr/share/man/ $(destdir)/usr/share/info/
@@ -229,12 +230,13 @@ $(installcross_targets):
mv $(destdir)/usr/bin/$${f} $(destdir)/usr/bin/$(target)-$${f};\
done
# Move files into ProteanOS-style directories.
- mkdir -p $(tgtlibdir)
- mv $(libdir)/gcc/$(target_gnu)/$(version)/* $(tgtlibdir)
+ mkdir -p $(destdir)$(tgtlibdir)
+ mv $(destdir)$(libdir)/gcc/$(target_gnu)/$(version)/* \
+ $(destdir)$(tgtlibdir)
rm -Rf \
- $(tgtlibdir)/*.la \
- $(tgtlibdir)/install-tools \
- $(tgtlibdir)/plugin \
+ $(destdir)$(tgtlibdir)/*.la \
+ $(destdir)$(tgtlibdir)/install-tools \
+ $(destdir)$(tgtlibdir)/plugin \
$(destdir)/usr/share/locale \
$(destdir)/usr/share/man \
$(destdir)/usr/share/info