pkg(Makefile): package entire directory
This commit is contained in:
parent
dc7f0ed86c
commit
905ed435fd
|
@ -8,22 +8,15 @@ help:
|
||||||
@echo "Run $`make [language]-[version].pkg.tar.gz$` to build a specific language"
|
@echo "Run $`make [language]-[version].pkg.tar.gz$` to build a specific language"
|
||||||
|
|
||||||
build build-all: $(addsuffix .pkg.tar.gz, ${PACKAGES})
|
build build-all: $(addsuffix .pkg.tar.gz, ${PACKAGES})
|
||||||
clean clean-all: $(addprefix clean-, ${PACKAGES})
|
|
||||||
|
|
||||||
clean-%: %/
|
%.pkg.tar.gz: %/ %/pkg-info.json
|
||||||
rm -rf $</build $</output
|
cd $< && chmod +x ./build.sh && ./build.sh
|
||||||
|
|
||||||
%.pkg.tar.gz: %/output %/run %/environment %/pkg-info.json
|
|
||||||
rm -f $@
|
rm -f $@
|
||||||
tar czf $@ -C $* $(patsubst $*/%,%,output run environment pkg-info.json $(shell find $*/compile)) --transform='s|output|$*|;s|environment|$*/environment|'
|
tar czf $@ $* --transform='s|$*||'
|
||||||
|
|
||||||
%/pkg-info.json: %/metadata.json
|
%/pkg-info.json: %/metadata.json
|
||||||
jq '.build_platform="${BUILD_PLATFORM}"' $< > $@
|
jq '.build_platform="${BUILD_PLATFORM}"' $< > $@
|
||||||
|
|
||||||
%/output: %/ %/build.sh
|
|
||||||
cd $< && chmod +x ./build.sh && ./build.sh
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue