3
0

Add Make file for linking libraries

This commit is contained in:
Emmy Leke 2024-06-07 15:14:45 +01:00 committed by EmmyMay
parent 72d6ff8ee5
commit ceb717266f
3 changed files with 16 additions and 8 deletions

View File

@ -1,9 +1,9 @@
.PHONY: dev
dev:
@echo "---Building libs---"
@echo "---Processing libs---"
@(cd $(CURDIR)/lib && make dev) || (echo "Failed to build libs"; exit 1)
@echo "---Yarning clients---"
@(cd $(CURDIR)/client && make yarn) || (echo "Failed to yarn clients"; exit 1)
@echo "---Processing clients---"
@(cd $(CURDIR)/client && make dev) || (echo "Failed to yarn clients"; exit 1)
.DEFAULT_GOAL := dev

View File

@ -1,6 +1,6 @@
WEB_SUBDIRS := $(filter %/, $(wildcard $(CURDIR)/web/*/))
.PHONY: yarn
.PHONY: dev
yarn:
@for dir in $(WEB_SUBDIRS); do \
@ -8,4 +8,10 @@ yarn:
(cd $$dir && yarn) || (echo "Failed to yarn $$dir"; exit 1); \
done
.DEFAULT_GOAL := yarn
dev:
@for dir in $(WEB_SUBDIRS); do \
echo "---Installing and linking clients $$dir---"; \
(cd $$dir && yarn && yarn link @cortezaproject/corteza-js && yarn link @cortezaproject/corteza-vue) || (echo "Failed to run yarn or link libs $$dir"; exit 1); \
done
.DEFAULT_GOAL := dev

View File

@ -1,5 +1,3 @@
LIB_SUBDIRS := $(filter %/, $(wildcard */))
.PHONY: build dev
build:
@ -9,5 +7,9 @@ build:
@(cd $(CURDIR)/vue && yarn && yarn build) || (echo "Failed to build vue"; exit 1)
dev: build
@echo "---Creating sym link for js---"
@(cd $(CURDIR)/js && yarn link) || (echo "Failed to link js"; exit 1)
@echo "---Building vue and creating sym link---"
@(cd $(CURDIR)/vue && yarn link && yarn link @cortezaproject/corteza-js) || (echo "Failed to process vue lib"; exit 1)
.DEFAULT_GOAL := dev
.DEFAULT_GOAL := dev