Makefile: share $(DATA) on internal/external, keep record of build flags

This means you could make precompile, then make INTERNAL=on then make
INTERNAL=off and each time it would re-generate the go files only since
the flags have changed.
This commit is contained in:
Harvey Tindall
2025-12-01 14:18:10 +00:00
parent 429538688c
commit 331e7c13fa
2 changed files with 18 additions and 6 deletions
+2 -2
View File
@@ -14,7 +14,7 @@ const binaryType = "internal"
func BuildTagsExternal() {}
//go:embed data data/html data/web data/web/css data/web/js
//go:embed build/data build/data/html build/data/web build/data/web/css build/data/web/js
var loFS embed.FS
//go:embed lang/common lang/admin lang/email lang/form lang/setup lang/pwreset lang/telegram
@@ -38,6 +38,6 @@ func FSJoin(elem ...string) string {
func loadFilesystems(rootDir string, logger *logger.Logger) {
langFS = rewriteFS{laFS, "lang/"}
localFS = rewriteFS{loFS, "data/"}
localFS = rewriteFS{loFS, "build/data/"}
logger.Println("Using internal storage")
}