aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2021-06-26 16:38:43 -0300
committerEuAndreh <eu@euandre.org>2021-06-26 16:42:50 -0300
commitfcb589b2e86a061b482f39fcaa8b4653d4a358aa (patch)
treed87b7e8c2f76b2f19557deeb549f58790bf5c137 /Makefile
parentgit mv src/remembering.sh src/remembering.in (diff)
downloadremembering-fcb589b2e86a061b482f39fcaa8b4653d4a358aa.tar.gz
remembering-fcb589b2e86a061b482f39fcaa8b4653d4a358aa.tar.xz
Makefile: Use inference rules, disable Valgrind tests
Diffstat (limited to '')
-rw-r--r--Makefile31
1 files changed, 8 insertions, 23 deletions
diff --git a/Makefile b/Makefile
index fd8e5a1..ff8ec58 100644
--- a/Makefile
+++ b/Makefile
@@ -8,28 +8,17 @@ NAME = remembering
MAILING_LIST = public-inbox
TRANSLATIONS = pt fr eo
-sources = src/remembering.c
+.SUFFIXES: .in
-all: remembering run-tests
+.in:
+ sed -e 's:@VERSION@:$(VERSION):g' -e 's:@DATE@:$(DATE):g' < $< > $@
-remembering: remembering-sh
- cp $? $@
+all: src/remembering src/remembering-c
-remembering-sh: src/remembering.sh
- $(do_subst) < $? > $@-t
- chmod +x $@-t
- mv $@-t $@
+run-tests: src/remembering-c.c
+ $(CC) $(CFLAGS) $(DEFS) $(LDFLAGS) -DTEST -o $@ $? $(LDLIBS)
-remembering-c: $(sources)
- $(CC) $(CFLAGS) $(DEFS) $(LDFLAGS) -o $@ $(sources) $(LDLIBS)
-
-run-tests: $(sources)
- $(CC) $(CFLAGS) $(DEFS) $(LDFLAGS) -DTEST -o $@ $(sources) $(LDLIBS)
-
-fallible-tests: $(sources)
- $(CC) $(CFLAGS) $(DEFS) $(LDFLAGS) -DTEST -DFALLIBLE -o $@ $(sources) $(LDLIBS) -lfallible
-
-check: all
+check: all run-tests
./run-tests
sh tests/cli-opts.sh
sh tests/ranking.sh
@@ -46,11 +35,7 @@ dev-check: check fallible-tests
sh aux/workflow/assert-manpages.sh $(NAME) $(MAILING_LIST)
clean:
- rm -rf public/ tests/test-profiles/ remembering remembering-sh remembering-c run-tests fallible* vgcore* remembering-test.*
-
-do_subst = sed \
- -e 's:[@]VERSION[@]:$(VERSION):g' \
- -e 's:[@]DATE[@]:$(DATE):g'
+ rm -rf public/ tests/test-profiles/ src/remembering src/remembering-c run-tests fallible* vgcore* remembering-test.*
install: all
mkdir -p $(DESTDIR)$(PREFIX)/bin