From 9a2bd3665c11496d027725a0ed064789d9dffd09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C5=BEe=20Fortun?= Date: Fri, 8 Mar 2024 09:21:37 +0100 Subject: [PATCH] Added 3 dev makefiles, use make dev on root to build and yarn libs/clients --- Makefile | 9 +++++++++ client/Makefile | 7 +++---- lib/Makefile | 13 +++++++++++++ 3 files changed, 25 insertions(+), 4 deletions(-) create mode 100644 Makefile create mode 100644 lib/Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 000000000..7a489c832 --- /dev/null +++ b/Makefile @@ -0,0 +1,9 @@ +.PHONY: dev + +dev: + @echo "---Building 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) + +.DEFAULT_GOAL := dev \ No newline at end of file diff --git a/client/Makefile b/client/Makefile index 488cf880f..fbade8e67 100644 --- a/client/Makefile +++ b/client/Makefile @@ -1,12 +1,11 @@ -WEB_SUBDIRS := $(filter %/, $(wildcard web/*/)) +WEB_SUBDIRS := $(filter %/, $(wildcard $(CURDIR)/web/*/)) .PHONY: yarn yarn: @for dir in $(WEB_SUBDIRS); do \ - echo "Entering $$dir"; \ - cd $$dir && yarn; \ - cd ../..; \ + echo "---Yarning $$dir---"; \ + (cd $$dir && yarn) || (echo "Failed to yarn $$dir"; exit 1); \ done .DEFAULT_GOAL := yarn \ No newline at end of file diff --git a/lib/Makefile b/lib/Makefile new file mode 100644 index 000000000..b60d1ad63 --- /dev/null +++ b/lib/Makefile @@ -0,0 +1,13 @@ +LIB_SUBDIRS := $(filter %/, $(wildcard */)) + +.PHONY: build dev + +build: + @echo "---Building js---" + @(cd $(CURDIR)/js && yarn && yarn build) || (echo "Failed to build js"; exit 1) + @echo "---Building vue---" + @(cd $(CURDIR)/vue && yarn && yarn build) || (echo "Failed to build vue"; exit 1) + +dev: build + +.DEFAULT_GOAL := dev \ No newline at end of file