summaryrefslogtreecommitdiff
path: root/examples/hello_scripts/test.mk
diff options
context:
space:
mode:
Diffstat (limited to 'examples/hello_scripts/test.mk')
-rw-r--r--examples/hello_scripts/test.mk45
1 files changed, 45 insertions, 0 deletions
diff --git a/examples/hello_scripts/test.mk b/examples/hello_scripts/test.mk
new file mode 100644
index 0000000..f33a6a7
--- /dev/null
+++ b/examples/hello_scripts/test.mk
@@ -0,0 +1,45 @@
+.PHONY : test_output
+test_output:
+ @set -e; \
+ ${.OBJDIR}/hello_world1; \
+ ${.CURDIR}/hello_world2; \
+ ${.CURDIR}/hello_world3; \
+ \
+ rm -rf ${.OBJDIR}${PREFIX}; \
+ \
+ echo =========== all ============; \
+ find ${.OBJDIR} -type f | \
+ mkc_test_helper "${PREFIX}" "${.OBJDIR}"; \
+ \
+ echo ========= install ==========; \
+ ${MAKE} ${MAKEFLAGS} install DESTDIR=${.OBJDIR} \
+ > /dev/null; \
+ find ${.OBJDIR}${PREFIX} -type f -o -type d | \
+ mkc_test_helper "${PREFIX}" "${.OBJDIR}"; \
+ \
+ echo ======== uninstall =========; \
+ ${MAKE} ${MAKEFLAGS} uninstall DESTDIR=${.OBJDIR} > /dev/null; \
+ find ${.OBJDIR}${PREFIX} -type f | \
+ mkc_test_helper "${PREFIX}" "${.OBJDIR}"; \
+ \
+ echo ========== clean ===========; \
+ ${MAKE} ${MAKEFLAGS} clean DESTDIR=${.OBJDIR} > /dev/null; \
+ find ${.OBJDIR} -type f | \
+ mkc_test_helper "${PREFIX}" "${.OBJDIR}"; \
+ \
+ echo ======= distclean ==========; \
+ ${MAKE} ${MAKEFLAGS} distclean DESTDIR=${.OBJDIR} > /dev/null; \
+ find ${.OBJDIR} -type f | \
+ mkc_test_helper "${PREFIX}" "${.OBJDIR}"; \
+ \
+ echo ==== install MKINSTALL=no ====; \
+ MKINSTALL=no; export MKINSTALL; \
+ ${MAKE} ${MAKEFLAGS} all installdirs install DESTDIR=${.OBJDIR} \
+ > /dev/null; \
+ find ${.OBJDIR} -type f -o -type l | \
+ mkc_test_helper "${PREFIX}" "${.OBJDIR}"; \
+ \
+ true ======= distclean ==========; \
+ ${MAKE} ${MAKEFLAGS} distclean > /dev/null
+
+.include <mkc.minitest.mk>