From de8f2b087c2d025a07dedd0707dca8e328847a98 Mon Sep 17 00:00:00 2001 From: Joachim Nilsson Date: Sat, 22 Aug 2015 23:08:22 +0200 Subject: [PATCH] Add autotest for tempfile() Signed-off-by: Joachim Nilsson --- Makefile | 1 + tempfile.c | 2 +- tempfile.mk | 4 ++++ 3 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 tempfile.mk diff --git a/Makefile b/Makefile index 54df0ea..709288c 100644 --- a/Makefile +++ b/Makefile @@ -58,6 +58,7 @@ test: $(MAKE) -f makepath.mk $(MAKE) -f pidfilefn.mk $(MAKE) -f rsync.mk + $(MAKE) -f tempfile.mk $(OBJS): Makefile diff --git a/tempfile.c b/tempfile.c index 16de8df..b2a13f4 100644 --- a/tempfile.c +++ b/tempfile.c @@ -63,7 +63,7 @@ int main(void) /** * Local Variables: - * compile-command: "gcc -D_GNU_SOURCE -DUNITTEST -o tempy tempfile.c && ./tempy" + * compile-command: "make V=1 -f tempfile.mk" * version-control: t * indent-tabs-mode: t * c-file-style: "linux" diff --git a/tempfile.mk b/tempfile.mk new file mode 100644 index 0000000..61910a0 --- /dev/null +++ b/tempfile.mk @@ -0,0 +1,4 @@ +OBJS = +TARGET = tempfile.test clean + +include rules.mk