summaryrefslogtreecommitdiff
path: root/examples/hello_files/test.mk
diff options
context:
space:
mode:
Diffstat (limited to 'examples/hello_files/test.mk')
-rw-r--r--examples/hello_files/test.mk54
1 files changed, 54 insertions, 0 deletions
diff --git a/examples/hello_files/test.mk b/examples/hello_files/test.mk
new file mode 100644
index 0000000..72afde2
--- /dev/null
+++ b/examples/hello_files/test.mk
@@ -0,0 +1,54 @@
+.PHONY : test_output
+test_output:
+ @set -e; \
+ MKHTML=yes; export MKHTML; \
+ \
+ rm -rf ${.OBJDIR}${PREFIX}; \
+ \
+ echo =========== all ============; \
+ find ${.OBJDIR} -type f -o -type l | \
+ mkc_test_helper "${PREFIX}" "${.OBJDIR}"; \
+ \
+ echo ======== all+html ==========; \
+ ${MAKE} ${MAKEFLAGS} all \
+ > /dev/null; \
+ find ${.OBJDIR} -type f -o -type l | \
+ mkc_test_helper "${PREFIX}" "${.OBJDIR}"; \
+ \
+ echo ========= install ==========; \
+ ${MAKE} ${MAKEFLAGS} install DESTDIR=${.OBJDIR} \
+ > /dev/null; \
+ find ${.OBJDIR}${PREFIX} -type f -o -type l -o -type d | \
+ mkc_test_helper "${PREFIX}" "${.OBJDIR}"; \
+ \
+ echo ======== uninstall =========; \
+ ${MAKE} ${MAKEFLAGS} uninstall DESTDIR=${.OBJDIR} > /dev/null; \
+ find ${.OBJDIR}${PREFIX} -type f -o -type l | \
+ mkc_test_helper "${PREFIX}" "${.OBJDIR}"; \
+ \
+ echo ========== clean ===========; \
+ ${MAKE} ${MAKEFLAGS} clean > /dev/null; \
+ find ${.OBJDIR} -type f -o -type l | \
+ mkc_test_helper "${PREFIX}" "${.OBJDIR}"; \
+ \
+ echo ======= distclean ==========; \
+ ${MAKE} ${MAKEFLAGS} distclean > /dev/null; \
+ find ${.OBJDIR} -type f -o -type l | \
+ 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}"; \
+ \
+ echo ==== SHRTOUT=yes ====; \
+ ${MAKE} ${MAKEFLAGS} distclean > /dev/null; \
+ env MKCATPAGES=no MKHTML=no SHRTOUT=yes ${MAKE} ${MAKEFLAGS} all 2>&1 |\
+ mkc_test_helper2; \
+ \
+ true ======= distclean ==========; \
+ ${MAKE} ${MAKEFLAGS} distclean > /dev/null
+
+.include <mkc.minitest.mk>