TiddlyGuv Makefile

14 Oct

This is the tiddlyguv makefile I mentioned previously. I’m not
checking it in as I’m using a bash script now with some Make-ish
patterns in it. The problem with make is its dependency management
would tie things to closely to the store, and I’m being advised to
make a build process that’s agnostic to the store. (ie it could work
whether you’re storing things in sql, text, etc). Tiddlyweb is unusual
(and cool) in that all the code effectively lives in the store; this
is a problem for build tools like Make which assume you know where
something will end up when you compile it (or in this case, store it).

SHELL := /bin/bash
TOP := $(shell pwd)
MAKEBAGS=$(shell pwd)/makebags.sh

all: checkroot clean server bags config

if [ -d dist ] ; then mv dist /tmp/dist.$$$$ ; fi
cp cache/devtext.py .
twanager –load tiddlyguvconfig instance dist
rm tiddlyguvconfig.pyc
rm devtext.py

if [ “$${TW_ROOT}” == “” ] ; then echo ‘Please set TW_ROOT to the
directory of TiddlyWiki SVN root’ ; exit 1 ; fi

cp -R $(TOP)/cache/*.py $(TOP)/src/server/* dist
cp $(TOP)/src/config/tiddlywebconfig.py dist

cd dist ;
$(MAKEBAGS) ‘{ “delete”: [“R:ADMIN”], “manage”: [“R:ADMIN”],
“accept”: [“R:ADMIN”] }’ documents licenses ;
$(MAKEBAGS) ‘{“create”: [“R:ADMIN”], “manage”: [“R:ADMIN”],
“accept”: [“R:ADMIN”], “write”: [“R:ADMIN”], “delete”: [“R:ADMIN”]}’
protected client ;
$(MAKEBAGS) ‘{ “delete”: [“R:ADMIN”], “manage”: [“R:ADMIN”] }’
comments # TODO change when dev store fixed

cp $(TOP)/src/recipes/* $(TOP)/src/users/* dist/store


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: