Skip to content

Commit

Permalink
Update paths and filenames in Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
pkalita-lbl committed Jul 13, 2022
1 parent 5ec70b0 commit af62a71
Showing 1 changed file with 15 additions and 18 deletions.
33 changes: 15 additions & 18 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,36 +1,33 @@
DEEP_PREF=../..
DEEP_PREF=../../..
CONVERSION_SCRIPT=script/linkml.py
TEMPLATES_DIR=web/templates

.PHONY: all clean mixs nmdc canada_covid19

all: clean template/*/schema.js
mixs: clean template/MIxS/schema.js
nmdc: clean template/nmdc_dh/schema.js
canada_covid19: clean template/canada_covid19/schema.js
all: clean $(TEMPLATES_DIR)/*/schema.json
mixs: clean $(TEMPLATES_DIR)/MIxS/schema.json
nmdc: clean $(TEMPLATES_DIR)/nmdc_dh/schema.json
canada_covid19: clean $(TEMPLATES_DIR)/canada_covid19/schema.json

clean:
rm -rf template/menu.js
rm -rf $(TEMPLATES_DIR)/menu.json
rm -rf $(TEMPLATES_DIR)/canada_covid19/schema.json
rm -rf $(TEMPLATES_DIR)/MIxS/schema.json
rm -rf $(TEMPLATES_DIR)/nmdc_dh/schema.json
rm -rf $(TEMPLATES_DIR)/nmdc_dh/source/nmdc_dh.yaml

rm -rf template/canada_covid19/schema.js
rm -rf template/MIxS/schema.js
rm -rf template/nmdc_dh/schema.js
rm -rf template/nmdc_dh/source/nmdc_dh.yaml


template/nmdc_dh/source/nmdc_dh.yaml:
$(TEMPLATES_DIR)/nmdc_dh/source/nmdc_dh.yaml:
wget -O $@ https://raw.githubusercontent.com/microbiomedata/sheets_and_friends/main/artifacts/nmdc_dh.yaml

template/MIxS/schema.js: template/MIxS/source/mixs.yaml
$(TEMPLATES_DIR)/MIxS/schema.json: $(TEMPLATES_DIR)/MIxS/source/mixs.yaml
$(eval DIRNAME=$(shell dirname $@))
cd $(DIRNAME) ; python3 $(DEEP_PREF)/$(CONVERSION_SCRIPT) --input $(DEEP_PREF)/$<
# now open linkml.html in a web browser

template/nmdc_dh/schema.js: template/nmdc_dh/source/nmdc_dh.yaml
$(TEMPLATES_DIR)/nmdc_dh/schema.json: $(TEMPLATES_DIR)/nmdc_dh/source/nmdc_dh.yaml
$(eval DIRNAME=$(shell dirname $@))
cd $(DIRNAME) ; python3 $(DEEP_PREF)/$(CONVERSION_SCRIPT) --input $(DEEP_PREF)/$<
# now open linkml.html in a web browser

template/canada_covid19/schema.js: template/canada_covid19/schema.yaml
$(TEMPLATES_DIR)/canada_covid19/schema.json: $(TEMPLATES_DIR)/canada_covid19/schema.yaml
$(eval DIRNAME=$(shell dirname $@))
cd $(DIRNAME) ; python3 $(DEEP_PREF)/$(CONVERSION_SCRIPT) --input $(DEEP_PREF)/$<
# now open linkml.html in a web browser

0 comments on commit af62a71

Please sign in to comment.