Browse Source

Dependencies among packages

typescript1
Tony Garnock-Jones 11 months ago
parent
commit
63c52d6b46
  1. 2
      .gitignore
  2. 17
      Makefile

2
.gitignore

@ -11,3 +11,5 @@ scratch/
.do_built.dir/
tsconfig.tsbuildinfo
deps.mk

17
Makefile

@ -8,8 +8,21 @@ node_modules/lerna:
PACKAGE_JSONS=$(wildcard packages/*/package.json)
PACKAGE_DIRS=$(PACKAGE_JSONS:/package.json=)
all clean veryclean:
+for d in $(PACKAGE_DIRS); do make -C $$d $@ & done; wait
clean veryclean:
rm -f deps.mk
for d in $(PACKAGE_DIRS); do make -C $$d $@; done
all: $(PACKAGE_DIRS:=/.phony_all)
include deps.mk
deps.mk:
for d in $(PACKAGE_DIRS); do \
echo $$d/.phony_all: $$(fgrep 'file:' "$$d/package.json" | sed -e 's:.*/\([^/"]*\)",:packages/\1/.phony_all:'); \
done > $@
%/.phony_all:
+$(MAKE) -C $* all
watch:
inotifytest make -j$$(nproc) all

Loading…
Cancel
Save