DSL for HTML Cascading Style Sheets

root / Makefile

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
.PHONY: all

package = $(or $(filter-out skeleton,$(patsubst %.cabal,%,$(wildcard *.cabal))),$(notdir $(realpath .)))

all: dist/setup-config $(package).cabal
	cabal-dev build
	cabal-dev test

$(package).cabal:
	sed -i -e 's/_PACKAGE_/$(package)/g' \
		.boring \
		LICENSE \
		README.md \
		Setup.lhs \
		program/Main.hs \
		skeleton.cabal \
		test/Props.hs \
		test/Test.hs
	mv skeleton.cabal $(package).cabal
	darcs init
	darcs setpref boringfile .boring
	darcs add -r .
	darcs record -am "Initial revision."

dist/setup-config: $(package).cabal
	cabal-dev install -j4 --enable-tests --only-dependencies
	cabal-dev configure --enable-tests