summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSiri Reiter <siri@pjones.dk>2021-03-29 18:39:11 +0200
committerSiri Reiter <siri@pjones.dk>2021-03-29 18:39:11 +0200
commit4e20a7a5f5a4ea7436bf317cf444f78d5b22d9d7 (patch)
treed4980ab74318c3aba59d23f88e141c35ca55c60f
parent89582bfaa0fd92733fc7a76b0f04a7c7a507fef7 (diff)
parent54989cc1649701a57d7ca5ad99fe32acdb0e7c3f (diff)
Merge remote-tracking branch 'jones/couchdesign/bullseye-da'HEADmaster
-rw-r--r--Makefile22
m---------shared0
2 files changed, 15 insertions, 7 deletions
diff --git a/Makefile b/Makefile
index 4217275..17cc5ec 100644
--- a/Makefile
+++ b/Makefile
@@ -13,6 +13,8 @@ export CURDIR
cssprojects ?= $(wildcard shared/themes/goab styling)
+sass_includes ?= shared/themes/default /usr/share/sass /usr/share/sass/stylesheets /usr/share/compass/frameworks/normalize-scss/stylesheets
+
all: build
-include shared/include.mk
@@ -23,6 +25,8 @@ always-make = $(findstring B,$(MAKEFLAGS))
avoid-broken-git = $(shell cd content && git symbolic-ref -q HEAD > /dev/null || echo " --no-rcs")
iki_configfiles := $(or $(patsubst %.in,%,$(wildcard config/ikiwiki*.setup.in)),config/ikiwiki.setup)
+iki_projects = $(patsubst config/%.setup,build-iki/%,$(iki_configfiles))
+form_projects := $(patsubst forms/%.cgi,build-form/%,$(wildcard forms/*.cgi forms/*/*.cgi))
init: shared/.git content
$(MAKE) $(iki_configfiles)
@@ -52,11 +56,15 @@ content:
$(if $(notempty),,mkdir -p '$@')
$(if $(notempty),,printf '# Hello world!\n\nHello world!\n' > '$@/index.mdwn')
-build:
- $(if $(cssprojects),$(MAKE) $(cssprojects))
- $(foreach config,$(shell find config -name '*.setup'),ikiwiki --setup $(config)$(avoid-broken-git)$(if $(always-make), --rebuild, --refresh);)
- $(if $(wildcard forms),cd forms && find * -name '*.cgi' \
- -exec install -DT '{}' ../build/forms/'{}' ';' \
- -exec perl -i -pe "s:'../build':'$(CURDIR)/build':g" ../build/forms/'{}' ';')
+build: $(iki_projects) $(form_projects)
+$(iki_projects): build-iki/%: config/%.setup $(cssprojects)
+ ikiwiki --setup $<$(avoid-broken-git)$(if $(always-make), --rebuild, --refresh)
+$(form_projects): build-form/%: forms/%.cgi build-iki/ikiwiki
+ install -DT $< build/$<
+ perl -i -pe "s:'../build:'$(CURDIR)/build:g" build/$<
+ cp -f build/html/$*/index.html build/html/$*/index.tmpl
+ FORMBUILDER_NOHEADER=1 build/$< > build/html/$*/index.html~
+ mv -f build/html/$*/index.html~ build/html/$*/index.html
+ rm build/html/$*/index.tmpl
-.PHONY: all build configfiles
+.PHONY: all build build-iki/% build-form/% configfiles
diff --git a/shared b/shared
-Subproject 15cba4b6b8888557b868db8008f8137e6f65093
+Subproject d3745efd8d7c654e28033465086f375253032b2