diff options
author | Jonas Smedegaard <dr@jones.dk> | 2012-03-01 01:56:54 +0100 |
---|---|---|
committer | Jonas Smedegaard <dr@jones.dk> | 2012-03-01 01:56:54 +0100 |
commit | b0bcfa85400922e44184379e8fee74611581957b (patch) | |
tree | 27d727953cd874eab5e72b9bd7c5173e0f02a151 | |
parent | 192f9b20b08f84deea743af5349054378c58bf6d (diff) |
Generate Ikiwiki setup files from defaults, hardcoding (path) options and optional *.in YAML file.
-rw-r--r-- | Makefile | 18 | ||||
-rw-r--r-- | config/include.mk | 47 |
2 files changed, 14 insertions, 51 deletions
@@ -1,7 +1,16 @@ +IKIWIKI_DEFAULTS ?= \ + --rcs git \ + --set cgi_wrappermode=00755 \ + --set git_wrappermode=06755 \ + $(IKIWIKI_SHARED_DEFAULTS) + IKIWIKI_OPTIONS ?= \ - --set srcdir='$(CURDIR)/content' \ - --set destdir='$(CURDIR)/build/html' \ - $(IKIWIKI_SHARED_OPTIONS) $(IKIWIKI_CONFIG_OPTIONS) + --set srcdir='$(CURDIR)/content' \ + --set destdir='$(CURDIR)/build/html$(iki_flavor:%=-%)' \ + --set cgi_wrapper='$(CURDIR)/build/cgi$(iki_flavor:%=-%)/ikiwiki.cgi' \ + --set git_wrapper='$(CURDIR)/build/git/post-update-ikiwiki$(iki_flavor:%=-%)' \ + --set wikistatedir='$(CURDIR)/.ikiwiki$(iki_flavor:%=-%)' \ + $(IKIWIKI_SHARED_OPTIONS) cssprojects ?= $(wildcard shared/themes/goab styling) @@ -22,9 +31,10 @@ shared/.git: git submodule init git submodule update --init --recursive +$(iki_configfiles): iki_flavor = $(if $(filter config/ikiwiki-%.setup,$@),$(@:config/ikiwiki-%.setup=%)) $(iki_configfiles): % : %.in shared/.git $(if $(wildcard config),,mkdir config) - ikiwiki $(IKIWIKI_OPTIONS) --dumpsetup $@ + ikiwiki $(IKIWIKI_DEFAULTS) $(patsubst %,--setup %,$(wildcard $<)) $(IKIWIKI_OPTIONS) --dumpsetup $@ content: notempty = $(wildcard $@/*.mdwn) content: shared/.git diff --git a/config/include.mk b/config/include.mk deleted file mode 100644 index 60c0f68..0000000 --- a/config/include.mk +++ /dev/null @@ -1,47 +0,0 @@ -domain = example.com -website = www.$(domain) -srcsite = source.$(domain) -gitrepo = site/content - -plugins = goodstuff \ - -plugins-off = - -admins = \ - -IKIWIKI_CONFIG_OPTIONS = \ - --wikiname 'SampleWiki' \ - --adminemail 'webmaster@$(domain)' \ - $(patsubst %,--adminuser '%',$(admins)) \ - $(patsubst %,--plugin %,$(plugins)) \ - $(patsubst %,--disable-plugin %,$(plugins-off)) \ - -# paths -#IKIWIKI_CONFIG_OPTIONS += --set-yaml add_underlays='- $(CURDIR)/styling' -IKIWIKI_CONFIG_OPTIONS += \ - --set wikistatedir='$(CURDIR)/.ikiwiki' \ - -# collaboration/aggregation -IKIWIKI_CONFIG_OPTIONS += \ - --allowrss \ - --allowatom \ - -# styling -IKIWIKI_CONFIG_OPTIONS += \ - --set theme=goab \ - -# CGI -IKIWIKI_CONFIG_OPTIONS += \ - --url 'http://$(website)/' \ - --cgiurl 'http://$(website)/ikiwiki.cgi' \ - --set cgi_wrapper='$(CURDIR)/build/cgi/ikiwiki.cgi' \ - --set cgi_wrappermode=00755 \ - -# VCS -IKIWIKI_CONFIG_OPTIONS += \ - --rcs=git \ - --historyurl 'http://$(srcsite)/?p=$(gitrepo).git;a=history;f=[[file]]' \ - --diffurl 'http://$(srcsite)/?p=$(gitrepo).git;a=blobdiff;f=[[file]];h=[[sha1_to]];hp=[[sha1_from]];hb=[[sha1_commit]];hpb=[[sha1_parent]]' \ - --set git_wrapper='$(CURDIR)/build/git/post-update-ikiwiki' \ - --set git_wrappermode=06755 \ - |