aboutsummaryrefslogtreecommitdiff
path: root/buildm3.conf
blob: ccc71316d8a130e05e785a8733c2cb96de242769 (plain)
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# vim: syntax=build

set CXXFLAGS += "-ggdb -W -Wall";

action "default"
{
	build: [targets("header-links"), "libbu++.a"];
}

action "pkg"
{
	build: targets("pkg");
}

target files("src/*.h").replace("src/", "bu/")
{
	tag "header-links";
	display "symlink";
	input OUTPUT.replace("bu/","src/");
	profile "build"
	{
		execute("ln -s ../${INPUT} ${OUTPUT}");
	}
}

target "libbu++.a"
{
	input files("src/*.cpp");
	rule "lib";
	set CXXFLAGS += "-I. -fPIC";
}

target "libbu++-r$(svnversion "-n").tar.bz2"
{
	input [
		"LICENSE",
		"build.conf",
		"Doxyfile",
		"buildm3.conf",
		"support/vim/syntax/taf.vim",
		"support/vim/ftdetect/taf.vim",
		"support/vim/ftplugin/taf.vim",
		files("*.sh"),
		files("src/*.cpp"),
		files("src/*.h"),
		files("src/tests/*.cpp"),
		files("src/tests*.h"),
		files("src/tools/*.cpp"),
		files("src/tools/*.h"),
		files("src/unit/*.unit"),
		files("src/doxy/*.dox")
		];
	rule "tarball";
	tag "pkg";
}

rule "tarball"
{
	input matches("LICENSE", "*.cpp", "*.h", "*.conf", "Doxyfile", "*.vim",
		"*.sh");
	profile "build"
	{
		set OUTDIR = OUTPUT.replace(".tar.bz2","");
		execute("tar --transform=\"s@^@${OUTDIR}/@\" -c ${INPUT} |"
			" bzip2 -9 > ${OUTPUT}");
	}
}