syndicate-js/Makefile

35 lines
693 B
Makefile
Raw Permalink Normal View History

bootstrap: node_modules/lerna
node_modules/lerna:
npm i .
$(MAKE) clean
+$(MAKE) -j$$(nproc) all
PACKAGE_JSONS=$(wildcard packages/*/package.json)
PACKAGE_DIRS=$(PACKAGE_JSONS:/package.json=)
2021-01-23 22:38:00 +00:00
clean.local:
2021-01-19 23:48:27 +00:00
rm -f deps.mk
2021-01-23 22:38:00 +00:00
clean: clean.local
2021-01-19 23:48:27 +00:00
for d in $(PACKAGE_DIRS); do make -C $$d $@; done
2021-01-23 22:38:00 +00:00
veryclean: clean.local
for d in $(PACKAGE_DIRS); do make -C $$d $@; done
2021-01-20 00:09:22 +00:00
rm -rf node_modules
2021-01-19 23:48:27 +00:00
all: $(PACKAGE_DIRS:=/.phony_all)
include deps.mk
deps.mk:
for d in $(PACKAGE_DIRS); do \
2021-01-23 22:38:00 +00:00
echo $$d/.phony_all: $$(fgrep 'file:' "$$d/package.json" | sed -e 's:.*/\([^/"]*\)",\?:packages/\1/.phony_all:'); \
2021-01-19 23:48:27 +00:00
done > $@
%/.phony_all:
+$(MAKE) -C $* all
watch:
inotifytest make -j$$(nproc) all