tg.sh: handle help -h
[topgit/pro.git] / t / Makefile
blobfbd002a6599c49f980f258917656dc983195a6ea
1 # Makefile - POSIX Makefile for TopGit tests
2 # Copyright (C) 2017,2021 Kyle J. McKay
3 # All rights reserved
4 # License GPL2
7 ## THIS IS NOT THE MAKEFILE YOU ARE LOOKING FOR!
8 ##
9 ## You likely want Makefile.mak (docs are in there)
11 ## NOTE: Makefile.sh feeds variables into Makefile.mak
12 ## You might want to look there too
14 ## Makefile drives the process
15 ## Makefile.sh provides POSIX sh support
16 ## Makefile.mak does the actual building
17 # ../Makefile.sh provides POSIX sh utility functions
18 # ../Makefile.mt always exists and is always empty (i.e. zero length)
21 .POSIX:
23 # Anything explicitly listed here will always avoid a bogus "up to date" result
24 TARGETS = \
25 all prove test pre-clean clean post-clean-except-prove-cache post-clean \
26 test-lint test-lint-duplicates test-lint-executable test-lint-shell-syntax \
27 test-lint-filenames run-individual-tests aggregate-results-and-cleanup \
28 aggregate-results TG-TEST-SETTINGS settings
29 #TARGETS
31 Makefile/default: Makefile/phony
32 +@set -- && set -ae && MAKE="$(MAKE)" && . ./Makefile.sh && $(MAKE) $${GNO_PD_OPT} -e -f Makefile.mak
34 .DEFAULT:
35 +@set -- "$@" && set -ae && MAKE="$(MAKE)" && . ./Makefile.sh && $(MAKE) $${GNO_PD_OPT} -e -f Makefile.mak "$$@"
37 target: Makefile/phony
38 +@set -- $(TARGET) && set -ae && MAKE="$(MAKE)" && . ./Makefile.sh && $(MAKE) $${GNO_PD_OPT} -e -f Makefile.mak "$$@"
40 Makefile/any $(TARGETS): Makefile/phony
41 +@set -- "$@" && set -ae && MAKE="$(MAKE)" && . ./Makefile.sh && $(MAKE) $${GNO_PD_OPT} -e -f Makefile.mak "$$@"
43 # Very important rule to avoid "accidents" caused by Makefile.sh's existence
44 # Some ridiculous "make" implementations will always implicitly "make Makefile"
45 # even though .POSIX: has been specified and that's definitely NOT POSIX!
46 Makefile Makefile.mak ../Makefile.mt ../Makefile.dep Makefile.sh:
47 -@true
49 .PRECIOUS:
51 # Clean out the standard six single suffix inference rules
52 .SUFFIXES:
53 .SUFFIXES: .c .sh .f .c˜ .sh˜ .f˜
54 .c:;
55 .f:;
56 .sh:;
57 .c~:;
58 .f~:;
59 .sh~:;
60 .SUFFIXES:
62 # This "phony" target must have at least one command otherwise it will not
63 # actually run anything and so will not actually trigger the rules that depend
64 # on it to run either. By using "true" instead of ":" "makes" that
65 # short-circuit directly to execvp should be able to run "true" directly.
66 Makefile/phony:
67 -@true