From ceb717266f0ad50a631c84305f9588a9bed61fe5 Mon Sep 17 00:00:00 2001 From: Emmy Leke Date: Fri, 7 Jun 2024 15:14:45 +0100 Subject: [PATCH] Add Make file for linking libraries --- Makefile | 6 +++--- client/Makefile | 10 ++++++++-- lib/Makefile | 8 +++++--- 3 files changed, 16 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index 7a489c832..5751865a2 100644 --- a/Makefile +++ b/Makefile @@ -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 \ No newline at end of file diff --git a/client/Makefile b/client/Makefile index fbade8e67..6c87f2fcd 100644 --- a/client/Makefile +++ b/client/Makefile @@ -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 \ No newline at end of file +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 \ No newline at end of file diff --git a/lib/Makefile b/lib/Makefile index b60d1ad63..f0044d22e 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -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 \ No newline at end of file +.DEFAULT_GOAL := dev