* [Buildroot] [PATCH 1/1] Makefile: use order-only dependency so symlinks are made only once
@ 2020-07-13 1:13 Danomi Manchego
2020-07-18 6:54 ` Yann E. MORIN
2020-07-22 9:10 ` Peter Korsgaard
0 siblings, 2 replies; 3+ messages in thread
From: Danomi Manchego @ 2020-07-13 1:13 UTC (permalink / raw)
To: buildroot
The staging symlink is being created on every invocation of "make" as it
depends on its destination directory, which is modified when the symlink
is created. This is prevented by changing the destination directory
dependency to be order-only.
Signed-off-by: Danomi Manchego <danomimanchego123@gmail.com>
---
Makefile | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Makefile b/Makefile
index 04c29b1c71..a8e0ee02c5 100644
--- a/Makefile
+++ b/Makefile
@@ -457,12 +457,12 @@ endif
ifneq ($(HOST_DIR),$(BASE_DIR)/host)
HOST_DIR_SYMLINK = $(BASE_DIR)/host
-$(HOST_DIR_SYMLINK): $(BASE_DIR)
+$(HOST_DIR_SYMLINK): | $(BASE_DIR)
ln -snf $(HOST_DIR) $(HOST_DIR_SYMLINK)
endif
STAGING_DIR_SYMLINK = $(BASE_DIR)/staging
-$(STAGING_DIR_SYMLINK): $(BASE_DIR)
+$(STAGING_DIR_SYMLINK): | $(BASE_DIR)
ln -snf $(STAGING_DIR) $(STAGING_DIR_SYMLINK)
# Quotes are needed for spaces and all in the original PATH content.
--
2.17.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [Buildroot] [PATCH 1/1] Makefile: use order-only dependency so symlinks are made only once
2020-07-13 1:13 [Buildroot] [PATCH 1/1] Makefile: use order-only dependency so symlinks are made only once Danomi Manchego
@ 2020-07-18 6:54 ` Yann E. MORIN
2020-07-22 9:10 ` Peter Korsgaard
1 sibling, 0 replies; 3+ messages in thread
From: Yann E. MORIN @ 2020-07-18 6:54 UTC (permalink / raw)
To: buildroot
Danomi, All,
On 2020-07-12 21:13 -0400, Danomi Manchego spake thusly:
> The staging symlink is being created on every invocation of "make" as it
> depends on its destination directory, which is modified when the symlink
> is created. This is prevented by changing the destination directory
> dependency to be order-only.
>
> Signed-off-by: Danomi Manchego <danomimanchego123@gmail.com>
I've extended and clarified the comit log, because the wording was a bit
confusing (some would interpret it as "the directory pointed at by the
symlink changes when the symlink is created").
Applied to master, thanks.
Regards,
Yann E. MORIN.
> ---
> Makefile | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/Makefile b/Makefile
> index 04c29b1c71..a8e0ee02c5 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -457,12 +457,12 @@ endif
>
> ifneq ($(HOST_DIR),$(BASE_DIR)/host)
> HOST_DIR_SYMLINK = $(BASE_DIR)/host
> -$(HOST_DIR_SYMLINK): $(BASE_DIR)
> +$(HOST_DIR_SYMLINK): | $(BASE_DIR)
> ln -snf $(HOST_DIR) $(HOST_DIR_SYMLINK)
> endif
>
> STAGING_DIR_SYMLINK = $(BASE_DIR)/staging
> -$(STAGING_DIR_SYMLINK): $(BASE_DIR)
> +$(STAGING_DIR_SYMLINK): | $(BASE_DIR)
> ln -snf $(STAGING_DIR) $(STAGING_DIR_SYMLINK)
>
> # Quotes are needed for spaces and all in the original PATH content.
> --
> 2.17.1
>
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Buildroot] [PATCH 1/1] Makefile: use order-only dependency so symlinks are made only once
2020-07-13 1:13 [Buildroot] [PATCH 1/1] Makefile: use order-only dependency so symlinks are made only once Danomi Manchego
2020-07-18 6:54 ` Yann E. MORIN
@ 2020-07-22 9:10 ` Peter Korsgaard
1 sibling, 0 replies; 3+ messages in thread
From: Peter Korsgaard @ 2020-07-22 9:10 UTC (permalink / raw)
To: buildroot
>>>>> "Danomi" == Danomi Manchego <danomimanchego123@gmail.com> writes:
> The staging symlink is being created on every invocation of "make" as it
> depends on its destination directory, which is modified when the symlink
> is created. This is prevented by changing the destination directory
> dependency to be order-only.
> Signed-off-by: Danomi Manchego <danomimanchego123@gmail.com>
Committed to 2020.02.x and 2020.05.x, thanks.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-07-22 9:10 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-13 1:13 [Buildroot] [PATCH 1/1] Makefile: use order-only dependency so symlinks are made only once Danomi Manchego
2020-07-18 6:54 ` Yann E. MORIN
2020-07-22 9:10 ` Peter Korsgaard
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.