Revision 1821
Added by Aaron Marcuse-Kubitza over 12 years ago
inputs/input.Makefile | ||
---|---|---|
11 | 11 |
|
12 | 12 |
selfDir_uZPPqC := $(dir $(lastword $(MAKEFILE_LIST))) |
13 | 13 |
|
14 |
# Paths |
|
15 |
datasrc := $(notdir $(realpath .)) |
|
16 |
root := $(selfDir_uZPPqC).. |
|
17 |
bin := $(root)/bin |
|
18 |
mappings := $(root)/mappings |
|
19 |
|
|
14 | 20 |
# Make |
15 | 21 |
SHELL := /bin/bash |
16 | 22 |
selfMake = $(MAKE) --makefile=../input.Makefile |
17 |
subMake = $(MAKE) $(@F) --directory=$(@D)
|
|
23 |
subMake = $(MAKE) $(@:$(root)/%=%) --directory=$(root)
|
|
18 | 24 |
+_ = $(+:_%=) |
19 | 25 |
addBeforeExt = $(basename $(2))$(1)$(suffix $(2)) |
20 | 26 |
|
... | ... | |
43 | 49 |
diffVerbose = $(if $(verbose),diff --side-by-side --left-column\ |
44 | 50 |
--width=$(termCols),$(diff)) |
45 | 51 |
|
46 |
# Paths |
|
47 |
datasrc := $(notdir $(realpath .)) |
|
48 |
root := $(selfDir_uZPPqC).. |
|
49 |
bin := $(root)/bin |
|
50 |
mappings := $(root)/mappings |
|
51 |
|
|
52 | 52 |
# Commands |
53 | 53 |
selfMap = $(bin)/cols 0 0 |
54 | 54 |
psqlOpts := --set ON_ERROR_STOP=1 --quiet |
Also available in: Unified diff
input.Makefile: Vars/functions: Make: $(subMake): When forwarding to another dir based off of $(root), forward to $(root) rather than directly to the dir of the target. This ensures that any special targets that are only defined in the root Makefile still get run, even when the target is in a subdir with its own Makefile.