ryde/tools/makefile
2026-03-06 08:37:53 +01:00

147 lines
2.8 KiB
Makefile

cmd_mkdir := mkdir -p
cmd_log := echo "--"
cmd_tsc := tsc --target es2020 --lib es2020,dom
cmd_copy := cp --recursive --update
cmd_lessc := lessc
all: \
structure \
logic \
style \
conf \
media \
localization \
fonts
.PHONY: all
structure: structure-log structure-exe
.PHONY: structure
structure-exe: \
build/index.html
.PHONY: structure-exe
structure-log:
@ ${cmd_log} "structure …"
.PHONY: structure-log
build/index.html: source/structure/index.html
@ ${cmd_mkdir} build
@ ${cmd_copy} $^ $@
logic: logic-log logic-exe
.PHONY: logic
logic-log:
@ ${cmd_log} "logic …"
.PHONY: logic-log
logic-exe: \
build/logic.js
.PHONY: logic-exe
build/logic.js: \
source/logic/base.ts \
source/logic/helpers/call.ts \
source/logic/helpers/string.ts \
source/logic/helpers/storage.ts \
source/logic/helpers/dom.ts \
source/logic/helpers/mvc.ts \
source/logic/helpers/loc.ts \
source/logic/helpers/conf.ts \
source/logic/helpers/nextbike.ts \
source/logic/model/rental.ts \
source/logic/model/app.ts \
source/logic/platform/web/app.ts \
source/logic/platform/web/rental.ts \
source/logic/view/console/rental.ts \
source/logic/view/console/app.ts \
source/logic/view/web/rental.ts \
source/logic/view/web/app.ts \
source/logic/control/rental.ts \
source/logic/control/app.ts \
source/logic/main.ts
@ ${cmd_mkdir} build
@ ${cmd_tsc} $^ --outFile $@
style: style-log style-exe
.PHONY: style
style-log:
@ ${cmd_log} "style …"
.PHONY: style-log
style-exe: \
build/style/base.css \
build/style/default.css \
build/style/strogg.css
.PHONY: style-exe
build/style/base.css: source/style/base.less
@ ${cmd_mkdir} $(dir $@)
@ ${cmd_lessc} $^ > $@
build/style/default.css: source/style/default.less
@ ${cmd_mkdir} $(dir $@)
@ ${cmd_lessc} $^ > $@
build/style/strogg.css: source/style/strogg.less
@ ${cmd_mkdir} $(dir $@)
@ ${cmd_lessc} $^ > $@
conf: conf-log conf-exe
.PHONY: conf
conf-log:
@ ${cmd_log} "conf …"
.PHONY: conf-log
conf-exe: \
build/conf.json
.PHONY: conf-exe
build/conf.json: source/data/conf.json
@ ${cmd_mkdir} $(dir $@)
@ ${cmd_copy} $^ $@
media: media-log media-exe
.PHONY: media
media-log:
@ ${cmd_log} "media …"
.PHONY: media-log
media-exe: \
build/logo.svg
.PHONY: media-exe
build/logo.svg: source/media/logo.svg
@ ${cmd_mkdir} $(dir $@)
@ ${cmd_copy} $^ $@
localization: localization-log localization-exe
.PHONY: localization
localization-log:
@ ${cmd_log} "localization …"
.PHONY: localization-log
localization-exe:
@ ${cmd_mkdir} build/localization
@ ${cmd_copy} source/data/localization/* build/localization/
.PHONY: localization-exe
fonts: fonts-log fonts-exe
.PHONY: fonts
fonts-log:
@ ${cmd_log} "fonts …"
.PHONY: fonts-log
fonts-exe:
@ ${cmd_mkdir} build/fonts
@ ${cmd_copy} source/fonts/* build/fonts/
.PHONY: fonts-exe