aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorAlexander Pickering <alexandermpickering@gmail.com>2019-11-21 18:17:18 -0500
committerAlexander Pickering <alexandermpickering@gmail.com>2019-11-21 18:24:30 -0500
commitd917129d502a753f13bd26ecf47a30d31f738fc1 (patch)
treea31bb887c0b27b47939eb377535388b1fea552c2 /Makefile
parentd8987084b7aa3c47642af30a87c0673a2df01fd0 (diff)
downloadlibctemplates-d917129d502a753f13bd26ecf47a30d31f738fc1.tar.gz
libctemplates-d917129d502a753f13bd26ecf47a30d31f738fc1.tar.bz2
libctemplates-d917129d502a753f13bd26ecf47a30d31f738fc1.zip
Fixed empty loop causeing infinite loop
If a loop was defined in the template, but no loop was defined in the varlist, render() would infinite loop while trying to execute. Fixs that.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile9
1 files changed, 7 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index bbe43f5..e8375b1 100644
--- a/Makefile
+++ b/Makefile
@@ -15,6 +15,7 @@ objfiles = $(objs:%=build/%.o)
TEST_1_NAME = t/test_1$(BIN_POSTFIX)
TEST_2_NAME = t/test_2$(BIN_POSTFIX)
+TEST_3_NAME = t/test_3$(BIN_POSTFIX)
examples=hello variable
example_bins=$(examples:%=examples/%$(BIN_POSTFIX))
@@ -36,9 +37,13 @@ $(TEST_1_NAME): t/test_1.c $(LIBNAME)
$(TEST_2_NAME): t/test_2.c $(LIBNAME)
$(CC) $(CFLAGS) -o $@ $< -lctemplates
-test: $(TEST_1_NAME) $(TEST_2_NAME)
+$(TEST_3_NAME): t/test_3.c $(LIBNAME)
+ $(CC) $(CFLAGS) -o $@ $< -lctemplates
+
+test: $(TEST_1_NAME) $(TEST_2_NAME) $(TEST_3_NAME)
#$(TEST_1_NAME)
- $(TEST_2_NAME)
+ #$(TEST_2_NAME)
+ $(TEST_3_NAME)
examples: $(example_bins)
$(example_bins)