~emersion/soju-dev

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch
4 3

[PATCH soju v2] Makefile: mark soju and sojuctl as .PHONY

Details
Message ID
<20210427155146.3900-1-yyp@disroot.org>
DKIM signature
pass
Download raw message
Patch: +2 -0
Otherwise running `make` didn't do anything on a non-clean state. Go
deals with changed files automatically, and there's no real need to
explicitly specify them.
---
 Makefile | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Makefile b/Makefile
index 79face4..bcf4e07 100644
--- a/Makefile
+++ b/Makefile
@@ -28,3 +28,5 @@ install: all
	cp -f soju sojuctl $(DESTDIR)$(PREFIX)/$(BINDIR)
	cp -f doc/soju.1 $(DESTDIR)$(PREFIX)/$(MANDIR)/man1
	cp -f config.in $(DESTDIR)/etc/soju/config

.PHONY: soju sojuctl
-- 
2.31.1

[soju/patches/.build.yml] build success

builds.sr.ht
Details
Message ID
<CAYMNM1K2QFO.32BVL79VV0GTX@cirno>
In-Reply-To
<20210427155146.3900-1-yyp@disroot.org> (view parent)
DKIM signature
missing
Download raw message
soju/patches/.build.yml: SUCCESS in 1m42s

[Makefile: mark soju and sojuctl as .PHONY][0] v2 from [Alexey Yerin][1]

[0]: https://lists.sr.ht/~emersion/soju-dev/patches/22357
[1]: yyp@disroot.org

✓ #496571 SUCCESS soju/patches/.build.yml https://builds.sr.ht/~emersion/job/496571
Details
Message ID
<LK3VwjcfuBGw2-t3m8IatbiLv3j7xL6deahYIeiFFFM27tr65YwV35uxudLyqKj2vu-SCMUO-eZI6Xa2_dS5Snrfkg2sILV9EvUkGlvcrgw=@emersion.fr>
In-Reply-To
<20210427155146.3900-1-yyp@disroot.org> (view parent)
DKIM signature
pass
Download raw message
Thanks! Pushed the fix.
Details
Message ID
<87im37ggml.fsf@icterid>
In-Reply-To
<20210427155146.3900-1-yyp@disroot.org> (view parent)
DKIM signature
pass
Download raw message
Alexey Yerin <yyp@disroot.org> writes:

> Otherwise running `make` didn't do anything on a non-clean state. Go
> deals with changed files automatically, and there's no real need to
> explicitly specify them.

I am not sure if this is the right fix, because now `go build` run every
time is invoked. 

This is an issue, if you want to build soju as a regular user, but
install it as root. The current Makefile re-builds soju as root
(downloading all the dependencies once again), which is not the expected
behaviour.

> ---
>  Makefile | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/Makefile b/Makefile
> index 79face4..bcf4e07 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -28,3 +28,5 @@ install: all
>  	cp -f soju sojuctl $(DESTDIR)$(PREFIX)/$(BINDIR)
>  	cp -f doc/soju.1 $(DESTDIR)$(PREFIX)/$(MANDIR)/man1
>  	cp -f config.in $(DESTDIR)/etc/soju/config
> +
> +.PHONY: soju sojuctl

-- 
	Philip K.
Details
Message ID
<1LuCXaDVuNnNnPWFoV32fItk-XEszwCSsRYOidxJR9v_rhczrOy4ineRjUM7nD60kMFTn0fqByY4ArkwQkfl34xYFF7FNcyMPcJ7dpe-KuA=@emersion.fr>
In-Reply-To
<87im37ggml.fsf@icterid> (view parent)
DKIM signature
pass
Download raw message
On Tuesday, May 25th, 2021 at 2:08 PM, Philip Kaludercic <philipk@posteo.net> wrote:

> I am not sure if this is the right fix, because now `go build` run every
> time is invoked.
>
> This is an issue, if you want to build soju as a regular user, but
> install it as root. The current Makefile re-builds soju as root
> (downloading all the dependencies once again), which is not the expected
> behaviour.

Eh, indeed, that's not good. Hubert's latest patch should address this.
I still think it's a better idea than to try to guess which files the Go
tooling might use to decide when and what to rebuild.
Reply to thread Export thread (mbox)