topgit_*_prepare.awk: do not append ^{} to missing
[topgit/pro.git] / Makefile
blob0947a2329674d4217ae7d7581b78485ab7154c73
1 # Makefile - POSIX Makefile for TopGit
2 # Copyright (C) 2017 Kyle J. McKay
3 # All rights reserved
4 # License GPL2
6 # Makefile drives the process
7 # Makefile.sh provides POSIX sh support
8 # Makefile.mak does the actual building
9 # Makefile.mt always exists and is always empty (i.e. zero length)
11 .POSIX:
13 # Anything explicitly listed here will always avoid a bogus "up to date" result
14 TARGETS = \
15 all clean tg awk hooks helpers doc html \
16 precheck TG-BUILD-SETTINGS settings \
17 install install-doc install-html \
18 tg--awksome tg-tg.txt topgit.html \
19 shell_compatibility_test \
20 bin-wrappers/tg bin-wrapper/pre-commit \
21 test \
22 #TARGETS
24 __default_target__: __file_which_should_not_exist
25 +@set -- && set -ae && MAKE="$(MAKE)" && . ./Makefile.sh && $(MAKE) $${GNO_PD_OPT} -e -f Makefile.mak
27 .DEFAULT:
28 +@set -- "$@" && set -ae && MAKE="$(MAKE)" && . ./Makefile.sh && $(MAKE) $${GNO_PD_OPT} -e -f Makefile.mak "$@"
30 target: __file_which_should_not_exist
31 +@set -- $(TARGET) && set -ae && MAKE="$(MAKE)" && . ./Makefile.sh && $(MAKE) $${GNO_PD_OPT} -e -f Makefile.mak $(TARGET)
33 __any_target__ $(TARGETS): __file_which_should_not_exist
34 +@set -- "$@" && set -ae && MAKE="$(MAKE)" && . ./Makefile.sh && $(MAKE) $${GNO_PD_OPT} -e -f Makefile.mak "$@"
36 # Very important rule to avoid "accidents" caused by Makefile.sh's existence
37 # Some ridiculous "make" implementations will always implicitly "make Makefile"
38 # even though .POSIX: has been specified and that's definitely NOT POSIX!
39 Makefile:
40 @true
42 .PRECIOUS:
44 # Clean out the standard six single suffix inference rules
45 # Except for .sh (because it would then elicit a redefiniton warning)
46 .SUFFIXES:
47 .SUFFIXES: .c .sh .f .c˜ .sh˜ .f˜
48 .c:;
49 .f:;
50 #.sh:;
51 .c~:;
52 .f~:;
53 .sh~:;
54 .SUFFIXES:
55 .SUFFIXES: .sh .awk .txt .html
57 # These are imperfect because they don't really reflect the correct dependencies
58 # Running the default "make" or "make all" will always get it right, but when
59 # trying to make a specific target, these will often avoid the "up to date"
60 # output that would otherwise occur for existing files with no dependencies
61 .sh:
62 +@set -- "$@" && set -ae && MAKE="$(MAKE)" && . ./Makefile.sh && $(MAKE) $${GNO_PD_OPT} -e -f Makefile.mak "$@"
63 .awk:
64 +@set -- "$@" && set -ae && MAKE="$(MAKE)" && . ./Makefile.sh && $(MAKE) $${GNO_PD_OPT} -e -f Makefile.mak "$@"
65 .sh.txt:
66 +@set -- "$@" && set -ae && MAKE="$(MAKE)" && . ./Makefile.sh && $(MAKE) $${GNO_PD_OPT} -e -f Makefile.mak "$@"
67 .sh.html:
68 +@set -- "$@" && set -ae && MAKE="$(MAKE)" && . ./Makefile.sh && $(MAKE) $${GNO_PD_OPT} -e -f Makefile.mak "$@"
70 # This "phony" target must have at least one command otherwise it will not
71 # actually run anything and so will not actually trigger the rules that depend
72 # on it to run either. By using "true" instead of ":" "makes" that
73 # short-circuit directly to execvp should be able to run "true" directly.
74 __file_which_should_not_exist:
75 -@true