summaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authorPatrick McDermott <patrick.mcdermott@libiquity.com>2019-05-28 18:16:16 (EDT)
committer Patrick McDermott <patrick.mcdermott@libiquity.com>2019-05-28 18:58:06 (EDT)
commit5f780614ff362c3e1f5bf8a62c6585f2c8b1e355 (patch)
tree6ad3d597aea19da1db6fe49c4a050d55a63779b3 /build
parent19235be2aca9d92dd3217bda109ce99fcb1d0119 (diff)
config, build: Fix broken dependencies
Commit 39f565a introduced a bug in which targets like configure-native would be updated on every run, because they didn't generate stamps. This bug was hidden until commit 5fb31a3. This commit partially reverts and amends the aforementioned commits.
Diffstat (limited to 'build')
-rwxr-xr-xbuild39
1 files changed, 14 insertions, 25 deletions
diff --git a/build b/build
index fe26630..0ca7213 100755
--- a/build
+++ b/build
@@ -108,7 +108,7 @@ nop:
../local.mk:
>../local.mk
-configure-native configure-cross:
+$(configure_native_stamps) $(configure_cross_stamps):
set -e; \
if [ 'x$(OPK_HOST_PLAT)' = 'xbootstrap1' ]; then \
oh-autoconfigure -B "$(builddir)" -t "$(target)" -- \
@@ -117,6 +117,7 @@ configure-native configure-cross:
oh-autoconfigure -B "$(builddir)" -t "$(target)" -- \
$(full_opts); \
fi
+ touch $@
# This rule sets (host- and) target-dependent paths in files in gcc/config.
# They must be edited here rather than in a patch because any given GCC target
@@ -139,18 +140,20 @@ build-gcc-config:
sed "$(tmake_script)" "$(tm)/$(tmake_file).orig" >"$(tm)/$(tmake_file)"
printf '\nMULTIARCH_DIRNAME = %s\n' "$(target)" >>"$(tm)/$(tmake_file)"
-build-native: build-gcc-config
+$(build_native_stamps): build-gcc-config
oh-autobuild -B "$(builddir)" -T $(native_target) -- \
-j $${JOBS:-$(jobs)} $(dir_macros)
#if [ '$(OPK_BUILD_ARCH)' = '$(OPK_HOST_ARCH)' ]; then \
# cd "$(builddir)" && make -k check; \
#fi
+ touch $@
-build-cross: build-gcc-config
+$(build_cross_stamps): build-gcc-config
oh-autobuild -B "$(builddir)" -T $(cross_target) -- \
-j $${JOBS:-$(jobs)} $(dir_macros)
+ touch $@
-install-native:
+$(install_native_stamps):
# The -T option is necessary because otherwise:
# * oh-autoinstall checks for an "install" target by running make with
# the -n option,
@@ -271,7 +274,7 @@ install-native:
" oh-installfiles -d "$(destdir)"
oh-shlibdeps
-install-cross:
+$(install_cross_stamps):
oh-autoinstall -B "$(builddir)" -d "$(destdir)" -T install-gcc -- \
$(dir_macros)
# Change the target architecture prefix of files in /usr/bin.
@@ -311,30 +314,16 @@ install-cross:
" oh-installfiles -d "$(destdir)"
oh-shlibdeps
-configure_$(target) build_$(target):
- touch $@
-
-configure_$(target): configure-$(type)
-build_$(target): build-$(type)
-install_$(target): install-$(type)
-
-configure_ build_ install_:
+configure build install:
set -e; \
for tgt in $(targets); do \
if [ x"$${tgt}" = x'$(OPK_HOST_ARCH)' ]; then \
- type='native'; \
+ $(MAKE) -f ../build target=$${tgt} $@-native_$${tgt}; \
else \
- type='cross'; \
+ $(MAKE) -f ../build target=$${tgt} $@-cross_$${tgt}; \
fi; \
- $(MAKE) -f ../build target=$${tgt} type=$${type} $@$${tgt}; \
done
-build_: configure
-install_: build
-
-configure build:
- touch $@
-
-configure: configure_
-build: build_
-install: install_
+configure:
+build: configure
+install: build