makefile: unified per-course pattern rules (build-/dev-/deploy-/klausur-<course>) statt hdm-/dhbw- duplikate, ~100 zeilen weg, neue kurse via variablen

This commit is contained in:
2026-05-06 18:37:59 +02:00
parent 96362e2959
commit 6e41b8c3eb
2 changed files with 168 additions and 258 deletions

View File

@@ -4,9 +4,9 @@ This project builds presentation decks for Marp, supporting multiple courses.
## Courses
- **223015b** - Dateiformate, Schnittstellen, Speichermedien (HdM, 6 Kapitel)
- **223015c** - Internettechnologien (HdM, 3 Kapitel)
- **dhbw** - Technik I Grundlagen IT (DHBW, 4 Kapitel)
- **223015b** - Dateiformate, Schnittstellen, Speichermedien (HdM, 6 Kapitel + Klausur)
- **223015c** - Internettechnologien (HdM, 3 Kapitel + Klausur)
- **dhbw** - Technik I Grundlagen IT (DHBW, 8 Kapitel)
## Agent Restrictions
@@ -36,21 +36,31 @@ build/ # Generated output (gitignored)
## Build Commands
Unified per-course pattern: `make <target>-<course>`. Group targets without
suffix run for all courses.
```bash
make hdm-dev # HdM live server all (port 1312)
make hdm-dev-b # HdM 223015b only (port 1313)
make hdm-dev-c # HdM 223015c only (port 1314)
make dhbw-dev # DHBW live server (port 1315)
make hdm-build # Build all HdM courses
make dhbw-build # Build DHBW course
make hdm-html # HTML only (HdM)
make hdm-pdf # PDF only (HdM)
make hdm-klausur # Extract klausur slides → slides/*/klausurfolien.md
make hdm-deploy # Deploy HdM (ASK FIRST!)
make dhbw-deploy # Deploy DHBW (ASK FIRST!)
make deploy # Deploy all (ASK FIRST!)
# Per-course (replace <c> with course id: 223015b, 223015c, dhbw)
make dev-<c> # Live server (HMR) on per-course port
make build-<c> # Build HTML + PDF
make html-<c> # HTML only
make pdf-<c> # PDF only
make klausur-<c> # Extract klausur slides (HdM only)
make deploy-<c> # Build + deploy single course (ASK FIRST!)
# All courses
make dev # Combined dev server (port 1312, all courses)
make build # Build everything
make html / pdf # HTML / PDF only
make klausur # Extract klausur (HdM courses only)
make deploy # Deploy everything (ASK FIRST!)
```
Per-course ports: `223015b` → 1313, `223015c` → 1314, `dhbw` → 1315.
**Adding a new course:** add id to `COURSES` in Makefile + define `<id>_NAME`,
`<id>_KAPITEL`, `<id>_DEPLOY`, `<id>_PORT`, `<id>_KLAUSUR`. No new targets needed.
## Nix Flake Commands
```bash