Revision 6915
Added by Aaron Marcuse-Kubitza almost 12 years ago
input.Makefile | ||
---|---|---|
34 | 34 |
|
35 | 35 |
# Terminal |
36 | 36 |
termCols := $(shell tput cols) |
37 |
esc := '[' |
|
38 |
reset := $(esc)'0m' |
|
39 |
emph := $(esc)'7m ' |
|
40 |
endEmph := ' '$(reset) |
|
41 | 37 |
|
42 |
# User interaction |
|
43 |
|
|
44 |
confirm = $(if $(shell read -p $(emph)"$(1)"$(endEmph)$$'$(if\ |
|
45 |
$(2),\n$(2))\nContinue? (y/n) ' REPLY; test "$$REPLY" = y && echo t),,\ |
|
46 |
$(error Aborting)) |
|
47 |
|
|
48 | 38 |
# Commands |
49 | 39 |
MKDIR = mkdir -p |
50 | 40 |
mkdir = $(MKDIR) $(@D) |
51 |
CP = cp -p |
|
52 | 41 |
diff = diff --unified=2 |
53 | 42 |
diffIgnoreSpace = $(diff) --ignore-space-change |
54 | 43 |
diffVerbose = $(if $(verbose),diff --side-by-side --left-column\ |
... | ... | |
63 | 52 |
inDatasrc := echo 'SET search_path TO "$(datasrc)";' |
64 | 53 |
|
65 | 54 |
# SVN |
66 |
addDir = $(if $(wildcard $(1)/),svn add --depth=empty $(1),svn mkdir $(1)) |
|
67 | 55 |
setSvnIgnore = svn propset svn:ignore $(2) $(1) |
68 | 56 |
define addDirWithIgnore |
69 | 57 |
$(addDir) |
Also available in: Unified diff
Makefiles: Factored out common vars/functions into lib/common.Makefile