1 # Makefile - POSIX Makefile for TopGit
2 # Copyright (C) 2017 Kyle J. McKay
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)
13 # Anything explicitly listed here will always avoid a bogus "up to date" result
15 all clean tg awk hooks helpers doc html \
16 precheck TG-BUILD-SETTINGS \
17 install install-doc install-html \
18 tg--awksome tg-tg.txt topgit.html \
19 shell_compatibility_test \
24 __default_target__
: __file_which_should_not_exist
25 +@set
-- && set
-ae
&& . .
/Makefile.sh
&& $(MAKE
) -f Makefile.mak
28 +@set
-- "$@" && set
-ae
&& . .
/Makefile.sh
&& $(MAKE
) -f Makefile.mak
"$@"
30 __any_target__
$(TARGETS
): __file_which_should_not_exist
31 +@set
-- "$@" && set
-ae
&& . .
/Makefile.sh
&& $(MAKE
) -f Makefile.mak
"$@"
33 # Very important rule to avoid "accidents" caused by Makefile.sh's existence
34 # Some ridiculous "make" implementations will always implicitly "make Makefile"
35 # even though .POSIX: has been specified and that's definately NOT POSIX!
41 # Clean out the standard six single suffix inference rules
42 # Except for .sh (because it would then elicit a redefiniton warning)
43 .SUFFIXES
: .c .sh .f .c˜ .sh˜ .f˜
50 .SUFFIXES
: .sh .awk .txt .html
52 # These are imperfect because they don't really reflect the correct dependencies
53 # Running the default "make" or "make all" will always get it right, but when
54 # trying to make a specific target, these will often avoid the "up to date"
55 # output that would otherwise occur for existing files with no dependencies
57 +@set
-- "$@" && set
-ae
&& . .
/Makefile.sh
&& $(MAKE
) -f Makefile.mak
"$@"
59 +@set
-- "$@" && set
-ae
&& . .
/Makefile.sh
&& $(MAKE
) -f Makefile.mak
"$@"
61 +@set
-- "$@" && set
-ae
&& . .
/Makefile.sh
&& $(MAKE
) -f Makefile.mak
"$@"
63 +@set
-- "$@" && set
-ae
&& . .
/Makefile.sh
&& $(MAKE
) -f Makefile.mak
"$@"
65 # This "phony" target must have at least one command otherwise it will not
66 # actually run anything and so will not actually trigger the rules that depend
67 # on it to run either. By using "true" instead of ":" "makes" that
68 # short-circuit directly to execvp should be able to run "true" directly.
69 __file_which_should_not_exist
: