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