aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2022-02-20 12:28:12 +0100
committerMattias Andrée <maandree@kth.se>2022-02-20 12:28:12 +0100
commite388cada744ea71b2140cfba10416de5c8c500a3 (patch)
tree30a64a4988683c1bbfc95684b1f657eb6b8af97e /Makefile
parentDeduplicate code (diff)
downloadblakesum-e388cada744ea71b2140cfba10416de5c8c500a3.tar.gz
blakesum-e388cada744ea71b2140cfba10416de5c8c500a3.tar.bz2
blakesum-e388cada744ea71b2140cfba10416de5c8c500a3.tar.xz
Improve makefile
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile26
1 files changed, 9 insertions, 17 deletions
diff --git a/Makefile b/Makefile
index e09140b..730da33 100644
--- a/Makefile
+++ b/Makefile
@@ -15,6 +15,12 @@ HDR =\
arg.h\
common.h
+ALIASES =\
+ b224sum\
+ b256sum\
+ b384sum\
+ b512sum
+
all: $(BIN)
$(OBJ): $(HDR)
@@ -35,25 +41,11 @@ install: $(BIN)
ln -sf -- bsum "$(DESTDIR)$(PREFIX)/bin/b256sum"
ln -sf -- bsum "$(DESTDIR)$(PREFIX)/bin/b384sum"
ln -sf -- bsum "$(DESTDIR)$(PREFIX)/bin/b512sum"
- cp -- $(BIN:=.1) "$(DESTDIR)$(MANPREFIX)/man1/"
- cp -- b224sum.1 "$(DESTDIR)$(MANPREFIX)/man1/b224sum.1"
- cp -- b256sum.1 "$(DESTDIR)$(MANPREFIX)/man1/b256sum.1"
- cp -- b384sum.1 "$(DESTDIR)$(MANPREFIX)/man1/b384sum.1"
- cp -- b512sum.1 "$(DESTDIR)$(MANPREFIX)/man1/b512sum.1"
+ cp -- $(BIN:=.1) $(ALIASES:=.1) "$(DESTDIR)$(MANPREFIX)/man1/"
uninstall:
- -rm -f -- "$(DESTDIR)$(PREFIX)/bin/bsum"
- -rm -f -- "$(DESTDIR)$(PREFIX)/bin/b224sum"
- -rm -f -- "$(DESTDIR)$(PREFIX)/bin/b256sum"
- -rm -f -- "$(DESTDIR)$(PREFIX)/bin/b384sum"
- -rm -f -- "$(DESTDIR)$(PREFIX)/bin/b512sum"
- -rm -f -- "$(DESTDIR)$(PREFIX)/bin/b2sum"
- -rm -f -- "$(DESTDIR)$(MANPREFIX)/man1/bsum.1"
- -rm -f -- "$(DESTDIR)$(MANPREFIX)/man1/b224sum.1"
- -rm -f -- "$(DESTDIR)$(MANPREFIX)/man1/b256sum.1"
- -rm -f -- "$(DESTDIR)$(MANPREFIX)/man1/b384sum.1"
- -rm -f -- "$(DESTDIR)$(MANPREFIX)/man1/b512sum.1"
- -rm -f -- "$(DESTDIR)$(MANPREFIX)/man1/b2sum.1"
+ -cd -- "$(DESTDIR)$(PREFIX)/bin/" && rm -f -- $(BIN) $(ALIASES)
+ -cd -- "$(DESTDIR)$(MANPREFIX)/man1/" && rm -f -- $(BIN:=.1) $(ALIASES:=.1)
clean:
-rm -f -- *.o *.su *.gcov *.gcno *.gcda