diff options
| author | Florian Fischer <florian.fischer@muhq.space> | 2026-06-13 13:22:31 +0200 |
|---|---|---|
| committer | Florian Fischer <florian.fischer@muhq.space> | 2026-06-13 13:23:24 +0200 |
| commit | 500e267852f98c1ad0f68adb942e7cf82e54d650 (patch) | |
| tree | 5f2b1055cca66fe1d5b9c1a589987f1b16457a36 | |
| parent | 7c58eeacf121cebb42818aa059c99c706e2d25e1 (diff) | |
| download | bycs-sol-500e267852f98c1ad0f68adb942e7cf82e54d650.tar.gz bycs-sol-500e267852f98c1ad0f68adb942e7cf82e54d650.zip | |
generalize Makefile
| -rw-r--r-- | cockpit/Makefile | 19 | ||||
| -rw-r--r-- | cockpit/index.css (renamed from cockpit/cockpit.css) | 0 | ||||
| -rw-r--r-- | cockpit/index.html (renamed from cockpit/cockpit.html) | 2 | ||||
| -rw-r--r-- | common.mk | 18 |
4 files changed, 20 insertions, 19 deletions
diff --git a/cockpit/Makefile b/cockpit/Makefile index ca7194a..23f8a8f 100644 --- a/cockpit/Makefile +++ b/cockpit/Makefile @@ -1,18 +1 @@ -dist/index.html: cockpit.html cockpit.css dist/main.js - echo | pandoc --template cockpit.html --embed-resources --standalone > $@ - -dist/main.js: $(wildcard js/*.js) - $(MAKE) dev - -.PHONY: mock dev prod -mock: - npm run build:mock - $(MAKE) - -dev: - npm run build:dev - $(MAKE) - -prod: - npm run build - $(MAKE) +include ../common.mk diff --git a/cockpit/cockpit.css b/cockpit/index.css index 810442e..810442e 100644 --- a/cockpit/cockpit.css +++ b/cockpit/index.css diff --git a/cockpit/cockpit.html b/cockpit/index.html index 909a109..d0bb0c7 100644 --- a/cockpit/cockpit.html +++ b/cockpit/index.html @@ -3,7 +3,7 @@ <head> <meta charset="utf-8"> <title>Cockpit</title> - <link rel="stylesheet" href="cockpit.css"> + <link rel="stylesheet" href="index.css"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <script src="./dist/main.js"></script> </head> diff --git a/common.mk b/common.mk new file mode 100644 index 0000000..47a3fe9 --- /dev/null +++ b/common.mk @@ -0,0 +1,18 @@ +dist/index.html: index.html index.css dist/main.js + echo | pandoc --template $< --embed-resources --standalone > $@ + +dist/main.js: $(wildcard js/*.js) + npm run build:dev + +.PHONY: mock dev prod +mock: + npm run build:mock + $(MAKE) dist/index.html + +dev: + npm run build:dev + $(MAKE) dist/index.html + +prod: + npm run build + $(MAKE) dist/index.html |
