automation is here

automatically minifies scripts before embedding them
gotta save them bytes
This commit is contained in:
bleck9999
2021-07-27 00:01:46 +01:00
parent d4f95da062
commit e9fb276e46
2 changed files with 186 additions and 2 deletions

View File

@@ -111,8 +111,11 @@ $(BUILDDIR)/$(TARGET)/script/builtin.o: $(BUILDDIR)/$(TARGET)/script/builtin.c
$(BUILDDIR)/$(TARGET)/script/builtin.c: scripts/*.te
@mkdir -p "$(@D)"
@mkdir -p "$(BUILDDIR)/$(TARGET)/scripts"
ifeq ($(OS),Windows_NT)
@py te2c.py "$(BUILDDIR)/$(TARGET)/script/builtin" scripts
@py ts-minifier.py --no-replace-functions -d "$(BUILDDIR)/$(TARGET)/scripts" $(wildcard scripts/*.te)
@py te2c.py "$(BUILDDIR)/$(TARGET)/script/builtin" "$(BUILDDIR)/$(TARGET)/scripts"
else
@python3 te2c.py "$(BUILDDIR)/$(TARGET)/script/builtin" scripts
@python3 ts-minifier.py --no-replace-functions -d "$(BUILDDIR)/$(TARGET)/scripts" $(wildcard scripts/*.te)
@python3 te2c.py "$(BUILDDIR)/$(TARGET)/script/builtin" "$(BUILDDIR)/$(TARGET)/scripts"
endif