Revision 1509
Added by Aaron Marcuse-Kubitza almost 13 years ago
input.Makefile | ||
---|---|---|
12 | 12 |
|
13 | 13 |
# Make |
14 | 14 |
SHELL := /bin/bash |
15 |
selfMake = $(MAKE) --makefile=../input.Makefile |
|
15 | 16 |
subMake = $(MAKE) $(@F) --directory=$(@D) |
16 | 17 |
+_ = $(+:_%=) |
17 | 18 |
addBeforeExt = $(basename $(2))$(1)$(suffix $(2)) |
... | ... | |
104 | 105 |
-+$(subMake) |
105 | 106 |
# ignore errors if $(selfMap) does not exist |
106 | 107 |
|
107 |
$(root)/%: _always |
|
108 |
+$(subMake) |
|
108 |
# Via maps cleanup |
|
109 |
ifneq ($(filter maps/.%.last_cleanup,$(MAKECMDGOALS)),) |
|
110 |
maps/.$(via).%.csv.last_cleanup: maps/$(via).%.csv $(selfMap) |
|
111 |
$(bin)/in_place $< $(bin)/subtract $(word 2,$+) 0 1 |
|
112 |
touch $@ |
|
113 |
# default: |
|
114 |
maps/.$(via).%.csv.last_cleanup: ; |
|
115 |
else |
|
116 |
$(viaMaps): _always |
|
117 |
$(selfMake) $(@:maps/%=maps/.%.last_cleanup) |
|
118 |
endif |
|
109 | 119 |
|
110 | 120 |
maps := |
111 | 121 |
|
... | ... | |
129 | 139 |
|
130 | 140 |
all += $(maps) |
131 | 141 |
|
142 |
##### External dependencies |
|
143 |
|
|
144 |
$(root)/%: _always |
|
145 |
+$(subMake) |
|
146 |
|
|
132 | 147 |
##### Mapping |
133 | 148 |
|
134 | 149 |
dbExport := $(firstword $(wildcard src/db.*.sql)) |
Also available in: Unified diff
input.Makefile: Clean up via maps when they change by subtracting the via format's self map from the via map (the comments column is ignored in determining which entries are redundant, and empty entries with a matching input column are also removed)