diff options
| author | LLLL Colonq <llll@colonq> | 2024-11-18 04:19:01 -0500 |
|---|---|---|
| committer | LLLL Colonq <llll@colonq> | 2024-11-18 04:19:01 -0500 |
| commit | cbc11cf5d23375071c186bf36a292225ed66ec48 (patch) | |
| tree | 97f62e9fbbe32b5103d378e5c69378562b44003b /Makefile | |
| parent | 57e6b3735787f8136ad344a8d170dbf2981d0509 (diff) | |
Initial auth page
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 25 |
1 files changed, 25 insertions, 0 deletions
@@ -2,6 +2,7 @@ TEMPLATES_API=$(shell ls templates/api) TEMPLATES_PUBNIX=$(shell ls templates/pubnix) +TEMPLATES_AUTH=$(shell ls templates/auth) all: api pubnix extension @@ -10,6 +11,8 @@ dist: mkdir -p dist/api/deploy mkdir -p dist/pubnix/test mkdir -p dist/pubnix/deploy + mkdir -p dist/auth/test + mkdir -p dist/auth/deploy main.js: $(shell find src) purs-nix bundle @@ -59,6 +62,28 @@ dist/pubnix/%/$(template): config/%.m4 templates/pubnix/$(template) endef $(foreach template,$(TEMPLATES_PUBNIX), $(eval $(GEN_RULE_PUBNIX))) +# auth +deploy_auth: dist $(addprefix dist/auth/deploy/,$(TEMPLATES_AUTH)) dist/auth/deploy/assets dist/auth/deploy/main.js dist/auth/deploy/main.css + +auth: dist $(addprefix dist/auth/test/,$(TEMPLATES_AUTH)) dist/auth/test/assets dist/auth/test/main.js dist/auth/test/main.css + +dist/auth/%/main.js: main.js dist + cp $< $@ + +dist/auth/%/main.css: main.css dist + cp $< $@ + +dist/auth/%/assets: $(shell find assets) dist + rm -rf $@ + mkdir -p $@ + cp -r assets/* $@ + +define GEN_RULE_AUTH +dist/auth/%/$(template): config/%.m4 templates/auth/$(template) + sh -c "m4 $$^ >$$@" +endef +$(foreach template,$(TEMPLATES_AUTH), $(eval $(GEN_RULE_AUTH))) + # extension extension: dist dist/extension/assets dist/extension/manifest.json dist/extension/background.js dist/extension/main.js dist/extension/main.css dist/extension/config.js |
