aboutsummaryrefslogtreecommitdiff
path: root/default.bld
diff options
context:
space:
mode:
Diffstat (limited to 'default.bld')
-rw-r--r--default.bld114
1 files changed, 57 insertions, 57 deletions
diff --git a/default.bld b/default.bld
index 4c71725..265da03 100644
--- a/default.bld
+++ b/default.bld
@@ -16,17 +16,17 @@ if PREFIX == null then
16 16
17action "default" 17action "default"
18{ 18{
19 build: ["build", targets("plugins")]; 19 build: ["build", targets("plugins")];
20} 20}
21 21
22action "man" 22action "man"
23{ 23{
24 build: targets("all"); 24 build: targets("all");
25} 25}
26 26
27action "clean" 27action "clean"
28{ 28{
29 clean: "build"; 29 clean: "build";
30} 30}
31 31
32action "docs" 32action "docs"
@@ -41,85 +41,85 @@ action "install"
41 41
42action "devinstall" 42action "devinstall"
43{ 43{
44 if "$(id -u)" != "0" then 44 if "$(id -u)" != "0" then
45 { 45 {
46 error "You can only install as the root user, su then run this."; 46 error "You can only install as the root user, su then run this.";
47 } 47 }
48 install: targets("devinstall"); 48 install: targets("devinstall");
49} 49}
50 50
51action "viminstall" 51action "viminstall"
52{ 52{
53 if "$(id -u)" != "0" then 53 if "$(id -u)" != "0" then
54 { 54 {
55 error "You can only install as the root user, su then run this."; 55 error "You can only install as the root user, su then run this.";
56 } 56 }
57 install: targets("viminstall"); 57 install: targets("viminstall");
58} 58}
59 59
60target "build" 60target "build"
61{ 61{
62 input [files("src/*.y"), files("src/*.l"), files("src/*.cpp")]; 62 input [files("src/*.y"), files("src/*.l"), files("src/*.cpp")];
63 rule "exe"; 63 rule "exe";
64 LDFLAGS += "-Llibbu++ -lbu++ -ldl"; 64 LDFLAGS += "-Llibbu++ -lbu++ -ldl";
65 CXXFLAGS += "-Ilibbu++"; 65 CXXFLAGS += "-Ilibbu++";
66 CFLAGS = CXXFLAGS; 66 CFLAGS = CXXFLAGS;
67 tag "tools"; 67 tag "tools";
68} 68}
69 69
70for IN in files("src/plugins/*.cpp") do 70for IN in files("src/plugins/*.cpp") do
71{ 71{
72 target IN.replace("src/","").replace(".cpp", ".so") 72 target IN.replace("src/","").replace(".cpp", ".so")
73 { 73 {
74 input IN; 74 input IN;
75 rule "so"; 75 rule "so";
76 LDFLAGS += "-Llibbu++ -lbu++ -ldl"; 76 LDFLAGS += "-Llibbu++ -lbu++ -ldl";
77 CXXFLAGS += "-Ilibbu++ -Isrc"; 77 CXXFLAGS += "-Ilibbu++ -Isrc";
78 tag "plugins"; 78 tag "plugins";
79 } 79 }
80} 80}
81 81
82target "/usr/share/build" 82target "/usr/share/build"
83{ 83{
84 input "$(echo -n $PWD)/share"; 84 input "$(echo -n $PWD)/share";
85 tag "devinstall"; 85 tag "devinstall";
86 display "symlink"; 86 display "symlink";
87 profile "install" 87 profile "install"
88 { 88 {
89 execute("ln -fsv \"${INPUT}\" \"${OUTPUT}\""); 89 execute("ln -fsv \"${INPUT}\" \"${OUTPUT}\"");
90 } 90 }
91} 91}
92 92
93target "/usr/lib/build" 93target "/usr/lib/build"
94{ 94{
95 input "$(echo -n $PWD)/plugins"; 95 input "$(echo -n $PWD)/plugins";
96 tag "devinstall"; 96 tag "devinstall";
97 display "symlink"; 97 display "symlink";
98 profile "install" 98 profile "install"
99 { 99 {
100 execute("ln -fsv \"${INPUT}\" \"${OUTPUT}\""); 100 execute("ln -fsv \"${INPUT}\" \"${OUTPUT}\"");
101 } 101 }
102} 102}
103 103
104for vimdir in [dirs("/usr/share/vim/vim*"), 104for vimdir in [dirs("/usr/share/vim/vim*"),
105 dirs("/usr/local/share/vim/vim*")] do 105 dirs("/usr/local/share/vim/vim*")] do
106{ 106{
107 for ftype in ["ftplugin/build.vim", "ftdetect/build.vim", 107 for ftype in ["ftplugin/build.vim", "ftdetect/build.vim",
108 "syntax/build.vim"] do 108 "syntax/build.vim"] do
109 { 109 {
110 target vimdir + "/" + ftype 110 target vimdir + "/" + ftype
111 { 111 {
112 input "support/vim/" + ftype; 112 input "support/vim/" + ftype;
113 tag "viminstall"; 113 tag "viminstall";
114 display "install"; 114 display "install";
115 profile "install" 115 profile "install"
116 { 116 {
117 DIR = OUTPUT.dirName(); 117 DIR = OUTPUT.dirName();
118 execute("mkdir -p ${DIR}"); 118 execute("mkdir -p ${DIR}");
119 execute("cp -f ${INPUT} ${OUTPUT}"); 119 execute("cp -f ${INPUT} ${OUTPUT}");
120 } 120 }
121 } 121 }
122 } 122 }
123} 123}
124 124
125target PREFIX + "/bin/build" 125target PREFIX + "/bin/build"