templates/Makefile: change TMPL_* to TEMPLATES_*
This commit is contained in:
parent
e0b78d912c
commit
4504048f87
49
Makefile
49
Makefile
@ -1,20 +1,26 @@
|
|||||||
SHELL = bash
|
SHELL = bash
|
||||||
|
|
||||||
BUILD_DIR = build
|
BUILD_DIR = build
|
||||||
DEVEL_BUILD_DIR = $(BUILD_DIR)/devel
|
DEVEL_BUILD_DIR = $(BUILD_DIR)/devel
|
||||||
PROD_BUILD_DIR = $(BUILD_DIR)/prod
|
PROD_BUILD_DIR = $(BUILD_DIR)/prod
|
||||||
|
|
||||||
FRONTEND_BUILD_DIR = frontend
|
FRONTEND_BUILD_DIR = frontend
|
||||||
FRONTEND_DEVEL_BUILD_DIR = $(FRONTEND_BUILD_DIR)/$(DEVEL_BUILD_DIR)
|
FRONTEND_DEVEL_BUILD_DIR = $(FRONTEND_BUILD_DIR)/$(DEVEL_BUILD_DIR)
|
||||||
FRONTEND_PROD_BUILD_DIR = $(FRONTEND_BUILD_DIR)/$(PROD_BUILD_DIR)
|
FRONTEND_DEVEL_ROOT_DIR = $(DEVEL_BUILD_DIR)
|
||||||
|
FRONTEND_PROD_BUILD_DIR = $(FRONTEND_BUILD_DIR)/$(PROD_BUILD_DIR)
|
||||||
|
FRONTEND_PROD_ROOT_DIR = $(PROD_BUILD_DIR)
|
||||||
|
|
||||||
API_BUILD_DIR = api
|
API_BUILD_DIR = api
|
||||||
API_DEVEL_BUILD_DIR = $(API_BUILD_DIR)/$(DEVEL_BUILD_DIR)
|
API_DEVEL_BUILD_DIR = $(API_BUILD_DIR)/$(DEVEL_BUILD_DIR)
|
||||||
API_PROD_BUILD_DIR = $(API_BUILD_DIR)/$(PROD_BUILD_DIR)
|
API_DEVEL_ROOT_DIR = $(DEVEL_BUILD_DIR)
|
||||||
|
API_PROD_BUILD_DIR = $(API_BUILD_DIR)/$(PROD_BUILD_DIR)
|
||||||
|
API_PROD_ROOT_DIR = $(PROD_BUILD_DIR)
|
||||||
|
|
||||||
TMPL_BUILD_DIR = templates
|
TEMPLATES_BUILD_DIR = templates
|
||||||
TMPL_DEVEL_BUILD_DIR = $(TMPL_BUILD_DIR)/$(DEVEL_BUILD_DIR)
|
TEMPLATES_DEVEL_BUILD_DIR = $(TEMPLATES_BUILD_DIR)/$(DEVEL_BUILD_DIR)
|
||||||
TMPL_PROD_BUILD_DIR = $(TMPL_BUILD_DIR)/$(PROD_BUILD_DIR)
|
TEMPLATES_DEVEL_ROOT_DIR = $(DEVEL_BUILD_DIR)/templates
|
||||||
|
TEMPLATES_PROD_BUILD_DIR = $(TEMPLATES_BUILD_DIR)/$(PROD_BUILD_DIR)
|
||||||
|
TEMPLATES_PROD_ROOT_DIR = $(PROD_BUILD_DIR)/templates
|
||||||
|
|
||||||
devel: frontend api templates devel-copy
|
devel: frontend api templates devel-copy
|
||||||
|
|
||||||
@ -40,24 +46,24 @@ devel-copy: devel-copy-frontend devel-copy-api devel-copy-templates
|
|||||||
prod-copy: prod-copy-frontend prod-copy-api prod-copy-templates
|
prod-copy: prod-copy-frontend prod-copy-api prod-copy-templates
|
||||||
|
|
||||||
devel-copy-frontend:
|
devel-copy-frontend:
|
||||||
cp -r $(FRONTEND_DEVEL_BUILD_DIR)/* $(DEVEL_BUILD_DIR)
|
cp -r $(FRONTEND_DEVEL_BUILD_DIR)/* $(FRONTEND_DEVEL_ROOT_DIR)
|
||||||
|
|
||||||
devel-copy-api:
|
devel-copy-api:
|
||||||
cp -r $(API_DEVEL_BUILD_DIR)/* $(DEVEL_BUILD_DIR)
|
cp -r $(API_DEVEL_BUILD_DIR)/* $(API_DEVEL_ROOT_DIR)
|
||||||
|
|
||||||
devel-copy-templates:
|
devel-copy-templates:
|
||||||
cp -r $(TMPL_DEVEL_BUILD_DIR)/* $(DEVEL_BUILD_DIR)
|
cp -r $(TEMPLATES_DEVEL_BUILD_DIR)/* $(TEMPLATES_DEVEL_ROOT_DIR)
|
||||||
|
|
||||||
prod-copy-frontend:
|
prod-copy-frontend:
|
||||||
cp -r $(FRONTEND_PROD_BUILD_DIR)/* $(PROD_BUILD_DIR)
|
cp -r $(FRONTEND_PROD_BUILD_DIR)/* $(FRONTEND_PROD_ROOT_DIR)
|
||||||
|
|
||||||
prod-copy-api:
|
prod-copy-api:
|
||||||
cp -r $(API_PROD_BUILD_DIR)/* $(PROD_BUILD_DIR)
|
cp -r $(API_PROD_BUILD_DIR)/* $(API_PROD_ROOT_DIR)
|
||||||
|
|
||||||
prod-copy-templates:
|
prod-copy-templates:
|
||||||
cp -r $(TMPL_PROD_BUILD_DIR)/* $(PROD_BUILD_DIR)
|
cp -r $(TEMPLATES_PROD_BUILD_DIR)/* $(TEMPLATES_PROD_ROOT_DIR)
|
||||||
|
|
||||||
clean: clean-root clean-frontend clean-api
|
clean: clean-root clean-frontend clean-api clean-templates
|
||||||
|
|
||||||
clean-root:
|
clean-root:
|
||||||
rm -rf build
|
rm -rf build
|
||||||
@ -68,4 +74,7 @@ clean-frontend:
|
|||||||
clean-api:
|
clean-api:
|
||||||
cd api && $(MAKE) $(MAKECMDGOALS)
|
cd api && $(MAKE) $(MAKECMDGOALS)
|
||||||
|
|
||||||
$(shell mkdir -p $(DEVEL_BUILD_DIR) $(PROD_BUILD_DIR))
|
clean-templates:
|
||||||
|
cd templates && $(MAKE) $(MAKECMDGOALS)
|
||||||
|
|
||||||
|
$(shell mkdir -p $(FRONTEND_DEVEL_ROOT_DIR) $(API_DEVEL_ROOT_DIR) $(TEMPLATES_DEVEL_ROOT_DIR) $(FRONTEND_PROD_ROOT_DIR) $(API_PROD_ROOT_DIR) $(TEMPLATES_DEVEL_ROOT_DIR))
|
||||||
|
@ -1,15 +1,15 @@
|
|||||||
SHELL = bash
|
SHELL = bash
|
||||||
|
|
||||||
BUILD_DIR = build
|
BUILD_DIR = build
|
||||||
DEVEL_BUILD_DIR = $(BUILD_DIR)/devel
|
DEVEL_BUILD_DIR = $(BUILD_DIR)/devel
|
||||||
PROD_BUILD_DIR = $(BUILD_DIR)/prod
|
PROD_BUILD_DIR = $(BUILD_DIR)/prod
|
||||||
|
|
||||||
TMPL_SRC_DIR = .
|
TEMPLATES_SRC_DIR = .
|
||||||
TMPL_SRC_FILES = $(wildcard $(TMPL_SRC_DIR)/*.tmpl)
|
TEMPLATES_SRC_FILES = $(wildcard $(TEMPLATES_SRC_DIR)/*.tmpl)
|
||||||
TMPL_DEVEL_BUILD_DIR = $(DEVEL_BUILD_DIR)
|
TEMPLATES_DEVEL_BUILD_DIR = $(DEVEL_BUILD_DIR)
|
||||||
TMPL_DEVEL_BUILD_FILES = $(patsubst $(TMPL_SRC_DIR)/%, $(TMPL_DEVEL_BUILD_DIR)/%, $(TMPL_SRC_FILES))
|
TEMPLATES_DEVEL_BUILD_FILES = $(patsubst $(TEMPLATES_SRC_DIR)/%, $(TEMPLATES_DEVEL_BUILD_DIR)/%, $(TEMPLATES_SRC_FILES))
|
||||||
TMPL_PROD_BUILD_DIR = $(PROD_BUILD_DIR)
|
TEMPLATES_PROD_BUILD_DIR = $(PROD_BUILD_DIR)
|
||||||
TMPL_PROD_BUILD_FILES = $(patsubst $(TMPL_SRC_DIR)/%, $(TMPL_PROD_BUILD_DIR)/%, $(TMPL_SRC_FILES))
|
TEMPLATES_PROD_BUILD_FILES = $(patsubst $(TEMPLATES_SRC_DIR)/%, $(TEMPLATES_PROD_BUILD_DIR)/%, $(TEMPLATES_SRC_FILES))
|
||||||
|
|
||||||
devel: devel-templates
|
devel: devel-templates
|
||||||
|
|
||||||
@ -18,14 +18,14 @@ prod: prod-templates
|
|||||||
clean:
|
clean:
|
||||||
rm -rf $(BUILD_DIR)
|
rm -rf $(BUILD_DIR)
|
||||||
|
|
||||||
devel-templates: $(TMPL_DEVEL_BUILD_FILES)
|
devel-templates: $(TEMPLATES_DEVEL_BUILD_FILES)
|
||||||
|
|
||||||
$(TMPL_DEVEL_BUILD_FILES): $(TMPL_DEVEL_BUILD_DIR)/%.tmpl: $(TMPL_SRC_DIR)/%.tmpl
|
$(TEMPLATES_DEVEL_BUILD_FILES): $(TEMPLATES_DEVEL_BUILD_DIR)/%.tmpl: $(TEMPLATES_SRC_DIR)/%.tmpl
|
||||||
cp $^ $@;
|
cp $^ $@;
|
||||||
|
|
||||||
prod-templates: $(TMPL_PROD_BUILD_FILES)
|
prod-templates: $(TEMPLATES_PROD_BUILD_FILES)
|
||||||
|
|
||||||
$(TMPL_PROD_BUILD_FILES): $(TMPL_PROD_BUILD_DIR)/%.tmpl: $(TMPL_SRC_DIR)/%.tmpl
|
$(TEMPLATES_PROD_BUILD_FILES): $(TEMPLATES_PROD_BUILD_DIR)/%.tmpl: $(TEMPLATES_SRC_DIR)/%.tmpl
|
||||||
cp $^ $@;
|
cp $^ $@;
|
||||||
|
|
||||||
$(shell mkdir -p $(TMPL_DEVEL_BUILD_DIR) $(TMPL_PROD_BUILD_DIR))
|
$(shell mkdir -p $(TEMPLATES_DEVEL_BUILD_DIR) $(TEMPLATES_PROD_BUILD_DIR))
|
||||||
|
Loading…
Reference in New Issue
Block a user