1 # Makefile - POSIX Makefile for TopGit
2 # Copyright (C) 2017,2021 Kyle J. McKay
7 ## THIS IS NOT THE MAKEFILE YOU ARE LOOKING FOR!
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.mt always exists and is always empty (i.e. zero length)
22 # Anything explicitly listed here will always avoid a bogus "up to date" result
24 all clean tg awk hooks helpers doc html \
25 precheck TG-BUILD-SETTINGS settings \
26 install install-doc install-html \
27 tg--awksome tg-tg.txt topgit.html \
28 shell_compatibility_test \
29 bin-wrappers
/tg bin-wrapper
/pre-commit \
33 Makefile
/default
: Makefile
/phony
34 +@set
-- && set
-ae
&& MAKE
="$(MAKE)" && . .
/Makefile.sh
&& $(MAKE
) $${GNO_PD_OPT} -e
-f Makefile.mak
37 +@set
-- "$@" && set
-ae
&& MAKE
="$(MAKE)" && . .
/Makefile.sh
&& $(MAKE
) $${GNO_PD_OPT} -e
-f Makefile.mak
"$$@"
39 target
: Makefile
/phony
40 +@set
-- $(TARGET
) && set
-ae
&& MAKE
="$(MAKE)" && . .
/Makefile.sh
&& $(MAKE
) $${GNO_PD_OPT} -e
-f Makefile.mak
"$$@"
42 Makefile
/any
$(TARGETS
): Makefile
/phony
43 +@set
-- "$@" && set
-ae
&& MAKE
="$(MAKE)" && . .
/Makefile.sh
&& $(MAKE
) $${GNO_PD_OPT} -e
-f Makefile.mak
"$$@"
45 # Very important rule to avoid "accidents" caused by Makefile.sh's existence
46 # Some ridiculous "make" implementations will always implicitly "make Makefile"
47 # even though .POSIX: has been specified and that's definitely NOT POSIX!
48 Makefile Makefile.mak Makefile.mt Makefile.dep Makefile.sh
:
53 # Clean out the standard six single suffix inference rules
54 # Except for .sh (because it would then elicit a redefiniton warning)
56 .SUFFIXES
: .c .sh .f .c˜ .sh˜ .f˜
64 .SUFFIXES
: .sh .awk .txt .html
66 # These are imperfect because they don't really reflect the correct dependencies
67 # Running the default "make" or "make all" will always get it right, but when
68 # trying to make a specific target, these will often avoid the "up to date"
69 # output that would otherwise occur for existing files with no dependencies
71 +@set
-- "$@" && set
-ae
&& MAKE
="$(MAKE)" && . .
/Makefile.sh
&& $(MAKE
) $${GNO_PD_OPT} -e
-f Makefile.mak
"$$@"
73 +@set
-- "$@" && set
-ae
&& MAKE
="$(MAKE)" && . .
/Makefile.sh
&& $(MAKE
) $${GNO_PD_OPT} -e
-f Makefile.mak
"$$@"
75 +@set
-- "$@" && set
-ae
&& MAKE
="$(MAKE)" && . .
/Makefile.sh
&& $(MAKE
) $${GNO_PD_OPT} -e
-f Makefile.mak
"$$@"
77 +@set
-- "$@" && set
-ae
&& MAKE
="$(MAKE)" && . .
/Makefile.sh
&& $(MAKE
) $${GNO_PD_OPT} -e
-f Makefile.mak
"$$@"
79 # This "phony" target must have at least one command otherwise it will not
80 # actually run anything and so will not actually trigger the rules that depend
81 # on it to run either. By using "true" instead of ":" "makes" that
82 # short-circuit directly to execvp should be able to run "true" directly.