[PATCH himitsu 1/2] Makefile: fix himitsu-tty cleaning and uninstallation
Export this patch
---
Makefile | 5 +++ --
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/Makefile b/Makefile
index fcaf6fe..7e90544 100644
--- a/Makefile
+++ b/Makefile
@@ -62,7 +62,7 @@ himitsu.7: docs/himitsu.7.scd
$(SCDOC) <docs/himitsu.7.scd >$@
clean:
- rm -f himitsud himitsu-store hiq $(DOCS)
+ rm -f himitsud himitsu-store hiq himitsu-tty $(DOCS)
install:
mkdir -p $(DESTDIR)$(PREFIX)/bin
@@ -85,7 +85,8 @@ install:
uninstall:
rm -f $(DESTDIR)$(PREFIX)/bin/himitsud \
$(DESTDIR)$(PREFIX)/bin/himitsu-store \
- $(DESTDIR)$(PREFIX)/bin/hiq
+ $(DESTDIR)$(PREFIX)/bin/hiq \
+ $(DESTDIR)$(PREFIX)/bin/himitsu-tty
rm -rf $(DESTDIR)$(THIRDPARTYDIR)/himitsu
.PHONY: all himitsud himitsu-store hiprompt-tty hiq check clean install uninstall docs
--
2.44.0
[PATCH himitsu 2/2] Makefile: simplify by using multiple targets
Export this patch
also fix usage of HARE and HAREFLAGS
---
Makefile | 35 +++++++++++ ------------------------
1 file changed, 11 insertions(+), 24 deletions(-)
diff --git a/Makefile b/Makefile
index 7e90544..8750028 100644
--- a/Makefile
+++ b/Makefile
@@ -12,19 +12,16 @@ MANDIR=$(SHAREDIR)/man
HARESRCDIR=$(SRCDIR)/hare
THIRDPARTYDIR=$(HARESRCDIR)/third-party
- all: himitsud himitsu-store hiq hiprompt-tty docs
+ CMDS=\
+ himitsud \
+ himitsu-store \
+ hiq \
+ hiprompt-tty
I'm not sure if we want to have hiprompt-tty as a install target. It's
a nice tool during development and as a reference, but I don't know
if there's a use case beside of this. cc ddevault.
- himitsud:
- hare build -o $@ cmd/$@/
+ all: $(CMDS) docs
- himitsu-store:
- hare build -o $@ cmd/$@/
-
- hiprompt-tty:
- hare build -o $@ cmd/$@/
-
- hiq:
- hare build -o $@ cmd/$@/
+ $(CMDS):
+ $(HARE) build $(HAREFLAGS) -o $@ cmd/$@/
I'm not good with Makefiles. Is this standard make? Does it also work
on OpenBSD for example?
check:
hare test
@@ -40,26 +37,16 @@ DOCS=\
docs: $(DOCS)
- himitsud.1: docs/himitsud.1.scd
- $(SCDOC) <docs/himitsud.1.scd >$@
+ $(DOCS):
+ $(SCDOC) <docs/$@.scd >$@
+ himitsud.1: docs/himitsud.1.scd
himitsu-store.1: docs/himitsu-store.1.scd
- $(SCDOC) <docs/himitsu-store.1.scd >$@
-
hiq.1: docs/hiq.1.scd
- $(SCDOC) <docs/hiq.1.scd >$@
-
himitsu.ini.5: docs/himitsu.ini.5.scd
- $(SCDOC) <docs/himitsu.ini.5.scd >$@
-
himitsu-ipc.5: docs/himitsu-ipc.5.scd
- $(SCDOC) <docs/himitsu-ipc.5.scd >$@
-
himitsu-prompter.5: docs/himitsu-prompter.5.scd
- $(SCDOC) <docs/himitsu-prompter.5.scd >$@
-
himitsu.7: docs/himitsu.7.scd
- $(SCDOC) <docs/himitsu.7.scd >$@
clean:
rm -f himitsud himitsu-store hiq himitsu-tty $(DOCS)
--
2.44.0
Thanks!
To https://git.sr.ht/~sircmpwn/himitsu
c657d70..6becc84 master -> master