916dd6b235
Report an error when Lumi runtime compilation fails. Also adds a reusable install_release.sh script to use for installing Lumi package releases, plus expansion of symlinks in package Makefiles.
39 lines
1 KiB
Makefile
39 lines
1 KiB
Makefile
PROCCNT=$(shell nproc --all)
|
|
LUMIROOT ?= /usr/local/lumi
|
|
LUMILIB = ${LUMIROOT}/packs
|
|
THISLIB = ${LUMILIB}/lumirt
|
|
|
|
.PHONY: default
|
|
default: banner build install
|
|
|
|
.PHONY: banner
|
|
banner:
|
|
@echo "\033[1;37m==================\033[0m"
|
|
@echo "\033[1;37mLumi Rtlib Package\033[0m"
|
|
@echo "\033[1;37m==================\033[0m"
|
|
|
|
.PHONY: clean
|
|
clean:
|
|
rm -rf ./.lumi/bin
|
|
rm -rf ${THISLIB}
|
|
|
|
.PHONY: lint
|
|
lint:
|
|
@echo "\033[0;32mLINT:\033[0m"
|
|
@./pack/node_modules/.bin/tslint lumirt/.lumi/...
|
|
|
|
.PHONY: build
|
|
build:
|
|
@echo "\033[0;32mBUILD:\033[0m"
|
|
@lumijs # compile the LumiPack
|
|
@lumi pack verify # ensure the pack verifies
|
|
|
|
.PHONY: install
|
|
install:
|
|
@echo "\033[0;32mINSTALL:\033[0m [${LUMILIB}]"
|
|
@yarn link # ensure NPM references resolve locally
|
|
@mkdir -p ${LUMILIB} # ensure the machine-wide library dir exists.
|
|
@cp -R ./.lumi/bin/ ${THISLIB} # copy to the standard library location.
|
|
@cp package.json ${THISLIB} # ensure the result is an NPM package.
|
|
@if [ -d ./node_modules ]; then cp -RL ./node_modules ${LUMIROOT}; fi # copy the links we depend upon.
|
|
|