diff options
author | Patrick McDermott <patrick.mcdermott@libiquity.com> | 2019-05-18 17:55:31 (EDT) |
---|---|---|
committer | Patrick McDermott <patrick.mcdermott@libiquity.com> | 2019-05-18 17:55:31 (EDT) |
commit | f657b78b286ac4fd24bfa2c8a8529b608dfb7a39 (patch) | |
tree | 8d84df725853ff45151915ac7aa3654c3790143f | |
parent | 420be76028fbfaaf8611149922f543f2e4ef1cbb (diff) |
build: Shorten build-gcc-config commands
-rwxr-xr-x | build | 26 |
1 files changed, 10 insertions, 16 deletions
@@ -61,6 +61,8 @@ bootstrap1_opts = \ --disable-libgomp \ --disable-libssp +tm = src/gcc/config # Abbreviation for build-gcc-config + # Defaults: libdir = /usr/lib/$(OPK_HOST_ARCH) libsubdir = /usr/lib/$(OPK_HOST_ARCH)/gcc/$(target_gnu)/$(version) @@ -107,22 +109,14 @@ build-gcc-config: # configuration can be used by multiple ProteanOS targets. # These commands run once per target, but they modify files in the src/ # directory that other targets might also use, so backups are made. - set -e; \ - [ -e "src/gcc/config/$(tm_file).orig" ] || \ - mv "src/gcc/config/$(tm_file)" \ - "src/gcc/config/$(tm_file).orig"; \ - define_pattern=".define $(tm_interp_macro)"; \ - sed "s|^\($${define_pattern}\) \".*\"$$|\1 \"$(elf_interp)\"|" \ - "src/gcc/config/$(tm_file).orig" \ - >"src/gcc/config/$(tm_file)"; \ - [ -e "src/gcc/config/$(tmake_file).orig" ] || \ - mv "src/gcc/config/$(tmake_file)" \ - "src/gcc/config/$(tmake_file).orig"; \ - sed "$(tmake_script)" \ - "src/gcc/config/$(tmake_file).orig" \ - >"src/gcc/config/$(tmake_file)"; \ - printf '\nMULTIARCH_DIRNAME = %s\n' "$(target)" \ - >>"src/gcc/config/$(tmake_file)" + [ -e "$(tm)/$(tm_file).orig" ] || \ + mv "$(tm)/$(tm_file)" "$(tm)/$(tm_file).orig" + sed "s|^\(.define $(tm_interp_macro)\) \".*\"$$|\1 \"$(elf_interp)\"|" \ + "$(tm)/$(tm_file).orig" >"$(tm)/$(tm_file)" + [ -e "$(tm)/$(tmake_file).orig" ] || \ + mv "$(tm)/$(tmake_file)" "$(tm)/$(tmake_file).orig" + sed "$(tmake_script)" "$(tm)/$(tmake_file).orig" >"$(tm)/$(tmake_file)" + printf '\nMULTIARCH_DIRNAME = %s\n' "$(target)" >>"$(tm)/$(tmake_file)" build-native: build-gcc-config oh-autobuild -B "$(builddir)" -T $(native_target) -- \ |