Project

General

Profile

« Previous | Next » 

Revision 224

mappings/Makefile: Fixed bug where var containing prerequisistes needed to be defined before used. Added support for different sed flags to use extended regular expressions.

View differences:

Makefile
1
SED = sed -$(if $(filter Darwin,$(shell uname)),E,r)
2

  
3
repl = ../scripts/util/repl
4
sort = ../scripts/util/sort 1 0
5
chRoot = ../scripts/util/ch_root <$< >$@
6
empty = $(SED) -n \
7
's/^CREATE TABLE ([0-9A-Za-z_]+) \($$/TRUNCATE \1 CASCADE;/p' <$< >$@
8

  
1 9
misc = schemas/vegbien.sql schemas/vegbien_empty.sql VegX-VegBIEN.organisms.csv
2 10

  
11

  
3 12
all: FORCE $(misc)
4 13
	$(MAKE) plots
5 14
	./join VegX VegBank
......
20 29
clean: FORCE
21 30
	$(RM) $(all)
22 31

  
23
repl = ../scripts/util/repl
24
sort = ../scripts/util/sort 1 0
25
chRoot = ../scripts/util/ch_root <$< >$@
26
empty = sed -nE 's/^CREATE TABLE ([0-9A-Za-z_]+) \($$/TRUNCATE \1 CASCADE;/p' \
27
<$< >$@
28 32

  
29

  
30 33
schemas/vegbien.sql: schemas/vegbank.sql
31 34
	$(repl) <$< VegBank-VegBIEN.schema.csv|$(repl) VegBank-VegBIEN.csv >$@
32 35

  

Also available in: Unified diff