aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorMattias Andrée <m@maandree.se>2025-01-31 20:21:32 +0100
committerMattias Andrée <m@maandree.se>2025-01-31 20:21:32 +0100
commit66cef0fe4754cc33fa3b9f8ace3e3ef4e7f662c7 (patch)
tree2637f644e3375e87c72c9258a943b04ad30c53f8 /Makefile
parentFix mistakes and add tests (diff)
downloadlibenv-66cef0fe4754cc33fa3b9f8ace3e3ef4e7f662c7.tar.gz
libenv-66cef0fe4754cc33fa3b9f8ace3e3ef4e7f662c7.tar.bz2
libenv-66cef0fe4754cc33fa3b9f8ace3e3ef4e7f662c7.tar.xz
Test the testable aspects of libenv_get_complete_list and print the variable list for human verification
Signed-off-by: Mattias Andrée <m@maandree.se>
Diffstat (limited to '')
-rw-r--r--Makefile14
1 files changed, 10 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index e94edb7..f7db511 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,4 @@
-.POSIX:
+>.POSIX:
CONFIGFILE = config.mk
include $(CONFIGFILE)
@@ -65,10 +65,11 @@ MAN7 =\
LOBJ = $(OBJ:.o=.lo)
-all: libenv.a libenv.$(LIBEXT) test
+all: libenv.a libenv.$(LIBEXT) test test-variables
$(OBJ): $(HDR)
$(LOBJ): $(HDR)
test.o: libenv_get_complete_list.c $(HDR)
+test-variables.o: libenv.h
.c.o:
$(CC) -c -o $@ $< $(CFLAGS) $(CPPFLAGS)
@@ -87,8 +88,12 @@ libenv.$(LIBEXT): $(LOBJ)
test: test.o $(OBJ_TESTABLE)
$(CC) -o $@ test.o $(OBJ_TESTABLE) $(LDFLAGS)
-check: test
+test-variables: test-variables.o libenv.a
+ $(CC) -o $@ test-variables.o libenv.a $(LDFLAGS)
+
+check: test test-variables
$(CHECK_PREFIX) ./test
+ $(CHECK_PREFIX) ./test-variables > /dev/null
install: libenv.a libenv.$(LIBEXT)
mkdir -p -- "$(DESTDIR)$(PREFIX)/lib"
@@ -115,7 +120,8 @@ uninstall:
clean:
-rm -f -- *.o *.a *.lo *.su *.so *.so.* *.dll *.dylib
- -rm -f -- *.gch *.gcov *.gcno *.gcda *.$(LIBEXT) test
+ -rm -f -- *.gch *.gcov *.gcno *.gcda *.$(LIBEXT)
+ -rm -f -- test test-variables
.SUFFIXES:
.SUFFIXES: .lo .o .c