summaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authorPatrick McDermott <patrick.mcdermott@libiquity.com>2019-05-19 19:46:35 (EDT)
committer Patrick McDermott <patrick.mcdermott@libiquity.com>2019-05-19 19:46:35 (EDT)
commit1ca97c0ac9f2c3887baf198ecaee195e6eb73f98 (patch)
treef2cab818e554806c01373222c32c6f7c3fdbdee8 /build
parentc8988cac96bec1e6ff86aed61344118a8036be74 (diff)
Revert "build: Replace mkdir/mv commands with $(inst) func"
This reverts commits 76b1469b1636f47b01e35bb4674fec31470fac75 and c8988cac96bec1e6ff86aed61344118a8036be74.
Diffstat (limited to 'build')
-rwxr-xr-xbuild74
1 files changed, 39 insertions, 35 deletions
diff --git a/build b/build
index 0cff1b3..b229d27 100755
--- a/build
+++ b/build
@@ -146,16 +146,6 @@ build-cross: build-gcc-config
-j $${JOBS:-$(jobs)} \
$(dir_macros)
-inst = set -e; \
- inst() { \
- i=0; for d in "$${@}"; do : $$((i += 1)); done; \
- mkdir -pv "$(destdir)$$(printf '%s\n' $${d} | sed 's|/[^/]*$$||')";\
- for s in "$${@}"; do [ $$((i -= 1)) -eq 0 ] && break; \
- rm -Rfv "$(destdir)$${d}"; \
- mv -v $(destdir)$${s} "$(destdir)$${d}"; \
- done; \
- }; inst
-
install-native:
# The -T option is necessary because otherwise:
# * oh-autoinstall checks for an "install" target by running make with
@@ -178,32 +168,44 @@ install-native:
$(destdir)/usr/bin/$(target)-c++-$(base_version)
# Move files into ProteanOS-style directories.
# gcc programs:
- $(inst) $(libsubdir)/cc1* \
- $(libsubdir)/collect2 \
- $(libsubdir)/lto* \
- $(gccexedir)
+ mkdir -p $(destdir)$(gccexedir)
+ mv \
+ $(destdir)$(libsubdir)/cc1* \
+ $(destdir)$(libsubdir)/collect2 \
+ $(destdir)$(libsubdir)/lto* \
+ $(destdir)$(gccexedir)
# Start files and gcc libraries:
- $(inst) $(libsubdir)/*.o \
- $(libsubdir)/*.a \
- $(libsubdir)/*.so* \
- $(tgtlibdir)
+ mkdir -p $(destdir)$(tgtlibdir)
+ mv \
+ $(destdir)$(libsubdir)/*.o \
+ $(destdir)$(libsubdir)/*.a \
+ $(destdir)$(libsubdir)/*.so* \
+ $(destdir)$(tgtlibdir)
# C++ headers:
- $(inst) $(def_gcc_gcc_include_dir) \
- $(gcc_gcc_include_dir)
- $(inst) $(def_gcc_fixed_include_dir) \
- $(gcc_fixed_include_dir)
+ mkdir -p \
+ $(destdir)$(gcc_gcc_include_dir) \
+ $(destdir)$(gcc_fixed_include_dir) \
+ $(destdir)$(gcc_gxx_include_dir) \
+ $(destdir)$(gcc_gxx_tool_include_dir) \
+ $(destdir)$(gcc_gxx_backward_include_dir)
+ mv $(destdir)$(def_gcc_gcc_include_dir)/* \
+ $(destdir)$(gcc_gcc_include_dir)
+ mv $(destdir)$(def_gcc_fixed_include_dir)/* \
+ $(destdir)$(gcc_fixed_include_dir)
# def_gcc_gxx_tool_include_dir and def_gcc_gxx_backward_include_dir are
# subdirectories of def_gcc_gxx_include_dir, so move them first.
- $(inst) $(def_gcc_gxx_tool_include_dir) \
- $(gcc_gxx_tool_include_dir)
- $(inst) $(def_gcc_gxx_backward_include_dir) \
- $(gcc_gxx_backward_include_dir)
- $(inst) $(def_gcc_gxx_include_dir) \
- $(gcc_gxx_include_dir)
+ mv $(destdir)$(def_gcc_gxx_tool_include_dir)/* \
+ $(destdir)$(gcc_gxx_tool_include_dir)
+ mv $(destdir)$(def_gcc_gxx_backward_include_dir)/* \
+ $(destdir)$(gcc_gxx_backward_include_dir)
+ mv $(destdir)$(def_gcc_gxx_include_dir)/* \
+ $(destdir)$(gcc_gxx_include_dir)
# Target-arch libraries:
- $(inst) $(libdir)/$(libsuffix) $(libdir)
+ mkdir -p $(destdir)$(libdir)
+ mv $(destdir)$(libdir)/$(libsuffix)/* $(destdir)$(libdir)
# Put libgcc_s.so.* under /lib.
- $(inst) $(libdir)/libgcc_s.so.* /lib/$(OPK_HOST_ARCH)
+ mkdir -p $(destdir)/lib/$(OPK_HOST_ARCH)
+ mv $(destdir)$(libdir)/libgcc_s.so.* $(destdir)/lib/$(OPK_HOST_ARCH)
# Put *.so links in a versioned directory. We want links to
# libfoo.so.x, not libfoo.x.y.z as libtool generates.
set -e; \
@@ -214,7 +216,7 @@ install-native:
ln -sf ../../$${lib} $(destdir)$(tgtlibdir)/$${link}; \
done
# Put *.o and *.spec files in a versioned directory.
- $(inst) $(destdir)$(libdir)/*.o $(destdir)$(libdir)/*.spec \
+ mv $(destdir)$(libdir)/*.o $(destdir)$(libdir)/*.spec \
$(destdir)$(tgtlibdir)
# Remove libitm files.
rm -f $(destdir)$(libdir)/libitm.*
@@ -268,10 +270,12 @@ install-cross:
ln -s $(target)-g++-$(base_version) \
$(destdir)/usr/bin/$(target)-c++-$(base_version)
# Move files into ProteanOS-style directories.
- $(inst) $(libsubdir)/cc1* \
- $(libsubdir)/collect2 \
- $(libsubdir)/lto* \
- $(gccexedir)
+ mkdir -p $(destdir)$(gccexedir)
+ mv \
+ $(destdir)$(libsubdir)/cc1* \
+ $(destdir)$(libsubdir)/collect2 \
+ $(destdir)$(libsubdir)/lto* \
+ $(destdir)$(gccexedir)
rm -Rf \
$(destdir)$(libsubdir)/*.o \
$(destdir)$(libsubdir)/include* \