Project

General

Profile

« Previous | Next » 

Revision 1776

input.Makefile: Factored out sources-related code to new Sources section

View differences:

inputs/input.Makefile
106 106

  
107 107
reinstall: _always uninstall install ;
108 108

  
109
##### Sources
110

  
111
srcs = $(shell $(bin)/sort_filenames $(wildcard $(exts:%=src/*.$*.%)))
112
isXml = $(filter %.xml,$(firstword $(srcs)))
113
catSrcs = cat$(if $(isXml),,_csv) $(srcs)
114

  
109 115
##### Maps
110 116

  
111 117
srcMap := maps/src.%.csv
......
191 197

  
192 198
+maps = $(filter maps/% $(mappings)/%,$(+_))
193 199
<in = $(firstword $(filter-out $(+maps),$(+_)))
194
srcs = $(shell $(bin)/sort_filenames $(wildcard $(exts:%=src/*.$*.%)))
195
isXml = $(filter %.xml,$(firstword $(srcs)))
196 200
map = $(if $(<in),<$(<in),\
197
$(if $(srcs),$(bin)/with_cat$(if $(isXml),,_csv) $(srcs) --,\
201
$(if $(srcs),$(bin)/with_$(catSrcs) --,\
198 202
$(if $(mapEnv),env $(mapEnv),\
199 203
$(error No input file src/*.$*.{$(exts)}))))\
200 204
$(root)/map $(+maps)

Also available in: Unified diff