From 64de36cc785cf2cb478db953e52151deaf5144c6 Mon Sep 17 00:00:00 2001 From: Leo Izen Date: Sun, 15 Oct 2017 13:28:28 -0400 Subject: tests: use quotes when including libkeccak.h If libkeccak is not already installed in the system, then test.c and benchmark.c will fail to compile. This is because they previously used `#include ` with angled brackets, which doesn't search `.` by default. Using `#include "libkeccak.h"` will search `.` so these will compile. --- benchmark.c | 2 +- test.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/benchmark.c b/benchmark.c index 20344d9..101c269 100644 --- a/benchmark.c +++ b/benchmark.c @@ -1,5 +1,5 @@ /* See LICENSE file for copyright and license details. */ -#include +#include "libkeccak.h" #include #include diff --git a/test.c b/test.c index 8394568..168ced2 100644 --- a/test.c +++ b/test.c @@ -1,5 +1,5 @@ /* See LICENSE file for copyright and license details. */ -#include +#include "libkeccak.h" #include #include -- cgit v1.2.3-70-g09d2 From 6a72708169b7f8b1add83e1255a883461af904b7 Mon Sep 17 00:00:00 2001 From: Leo Izen Date: Sun, 15 Oct 2017 13:39:17 -0400 Subject: Makefile: use "rm -f" to prevent errors upon second cleaning The coreutil `rm` will by default exit with failure if it is instructed to remove a file that doesn't exist. Using `rm -f` will suppress this behavior, so `rm` will exit with success whether or not the file had existed before invoking `rm -f`. --- Makefile | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/Makefile b/Makefile index 749e26e..172c7a3 100644 --- a/Makefile +++ b/Makefile @@ -186,22 +186,19 @@ install: libkeccak.$(LIBEXT) libkeccak.a cp -- LICENSE "$(DESTDIR)$(PREFIX)/share/licenses/libkeccak/" uninstall: - -rm -- "$(DESTDIR)$(PREFIX)/lib/libkeccak.$(LIBEXT).$(LIB_VERSION)" - -rm -- "$(DESTDIR)$(PREFIX)/lib/libkeccak.$(LIBEXT).$(LIB_MAJOR)" - -rm -- "$(DESTDIR)$(PREFIX)/lib/libkeccak.$(LIBEXT)" - -rm -- "$(DESTDIR)$(PREFIX)/lib/libkeccak.a" - -cd "$(DESTDIR)$(PREFIX)/include" && rm -- $(HDR) - -rmdir -- "$(DESTDIR)$(PREFIX)/include/libkeccak/mac" - -rmdir -- "$(DESTDIR)$(PREFIX)/include/libkeccak" - -cd -- "$(DESTDIR)$(MANPREFIX)/man3" && rm -- $(MAN3) - -cd -- "$(DESTDIR)$(MANPREFIX)/man7" && rm -- $(MAN7) - -rm -- "$(DESTDIR)$(PREFIX)/share/licenses/libkeccak/LICENSE" - -rmdir -- "$(DESTDIR)$(PREFIX)/share/licenses/libkeccak" + -rm -f -- "$(DESTDIR)$(PREFIX)/lib/libkeccak.$(LIBEXT).$(LIB_VERSION)" + -rm -f -- "$(DESTDIR)$(PREFIX)/lib/libkeccak.$(LIBEXT).$(LIB_MAJOR)" + -rm -f -- "$(DESTDIR)$(PREFIX)/lib/libkeccak.$(LIBEXT)" + -rm -f -- "$(DESTDIR)$(PREFIX)/lib/libkeccak.a" + -rm -rf -- "$(DESTDIR)$(PREFIX)/include/libkeccak" + -cd -- "$(DESTDIR)$(MANPREFIX)/man3" && rm -f -- $(MAN3) + -cd -- "$(DESTDIR)$(MANPREFIX)/man7" && rm -f -- $(MAN7) + -rm -rf -- "$(DESTDIR)$(PREFIX)/share/licenses/libkeccak" clean: - -rm -r -- *.o libkeccak/*.o libkeccak/mac/*.o - -rm -r -- *.su libkeccak/*.su libkeccak/mac/*.su - -rm -- *.info *.pdf *.ps *.dvi *.a libkeccak.$(LIBEXT)* test benchmark benchfile + -rm -rf -- *.o libkeccak/*.o libkeccak/mac/*.o + -rm -rf -- *.su libkeccak/*.su libkeccak/mac/*.su + -rm -f -- *.info *.pdf *.ps *.dvi *.a libkeccak.$(LIBEXT)* test benchmark benchfile .SUFFIXES: .c.o -- cgit v1.2.3-70-g09d2