1 # This program is free software: you can redistribute it and/or modify
2 # it under the terms of the GNU General Public License as published by
3 # the Free Software Foundation, version 3 of the License ONLY.
5 # This program is distributed in the hope that it will be useful,
6 # but WITHOUT ANY WARRANTY; without even the implied warranty of
7 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
8 # GNU General Public License for more details.
10 # You should have received a copy of the GNU General Public License
11 # along with this program. If not, see <http://www.gnu.org/licenses/>.
16 rule -Generate-Boiler- {
21 _f = '_-boiler-target-force-_' ;
23 _f = '_-boiler-target-noforce-_' ;
27 AGenBoiler gen-boiler $(_f) ;
31 actions quietly AGenBoiler {
34 if [ "z$fregen" != "z_-boiler-target-force-_" ]; then
43 llist=`find "$1" -mindepth 1 -maxdepth 1 -type f -name "*.c" -regex "^./[^._].*$"`
44 if [ "z$llist" != "z" ]; then
47 llist=`find "$1" -mindepth 1 -maxdepth 1 -type f -name "*.d" -regex "^./[^._].*$"`
48 if [ "z$llist" != "z" ]; then
51 llist=`find "$1" -mindepth 1 -maxdepth 1 -type f -name "*.cpp" -regex "^./[^._].*$"`
52 if [ "z$llist" != "z" ]; then
55 llist=`find "$1" -mindepth 1 -maxdepth 1 -type f -name "*.c++" -regex "^./[^._].*$"`
56 if [ "z$llist" != "z" ]; then
65 llist=`find "$1" -mindepth 1 -maxdepth 1 -type f -name "*.h" -regex "^./[^._].*$"`
66 if [ "z$llist" = "z" ]; then
67 llist=`find "$1" -mindepth 1 -maxdepth 1 -type f -name "*.hpp" -regex "^./[^._].*$"`
68 if [ "z$llist" = "z" ]; then
77 if [ "z$prjname" = "z" ]; then
81 for dname in `find . -maxdepth 8 -type d -name "[^._]*" -regex "^./[^._].*$"`; do
82 fname="$dname/Jamfile"
84 if [ "$fregen" == "ona" ]; then
85 if [ -e "${fname}" ]; then
89 if [ "$xskip" != "tan" ]; then
91 if [ "$?" = "0" ]; then
95 if [ "$xskip" = "tan" ]; then
99 dpp=`echo "$dname" | sed 's/^\.\//TOP /;' | sed 's/\// /g;'`
100 echo "SubDir $dpp ;" >"$fname"
103 if [ "$dname" != "./src" ]; then
104 dpp=`basename "$dname"`
105 fc=`echo "$dpp" | cut -c1-3`
106 if [ "z$fc" != "zlib" ]; then dpp="lib${dpp}"; fi
107 echo "Library ${dpp}.a :" >>"$fname"
109 echo "Main ${prjname} :" >>"$fname"
111 llist=`find "$dname" -mindepth 1 -maxdepth 1 -type f -name "*.c" -regex "^./[^._].*$"`
112 for lname in $llist; do
113 dpp=`basename "$lname"`
114 echo " $dpp" >>"$fname"
116 llist=`find "$dname" -mindepth 1 -maxdepth 1 -type f -name "*.d" -regex "^./[^._].*$"`
117 for lname in $llist; do
118 dpp=`basename "$lname"`
119 echo " $dpp" >>"$fname"
121 llist=`find "$dname" -mindepth 1 -maxdepth 1 -type f -name "*.cpp" -regex "^./[^._].*$"`
122 for lname in $llist; do
123 dpp=`basename "$lname"`
124 echo " $dpp" >>"$fname"
126 llist=`find "$dname" -mindepth 1 -maxdepth 1 -type f -name "*.c++" -regex "^./[^._].*$"`
127 for lname in $llist; do
128 dpp=`basename "$lname"`
129 echo " $dpp" >>"$fname"
132 llist=`find "$dname" -mindepth 1 -maxdepth 8 -type d -name "[^._]*" -regex "^./[^._].*$"`
133 if [ "z$llist" != "z" ]; then
134 if [ "$dname" = "./src" ]; then
136 for lname in $llist; do
138 if [ "$?" != "0" ]; then
139 dpp=`basename "$lname"`
140 fc=`echo "$dpp" | cut -c1-3`
141 if [ "z$fc" != "zlib" ]; then dpp="lib${dpp}"; fi
142 llibs="${llibs} ${dpp}.a"
145 if [ "z$llibs" != "z" ]; then
146 echo "LinkLibraries ${prjname} :" >>"$fname"
147 for lname in $llibs; do
148 echo " ${lname}" >>"$fname"
155 for lname in $llist; do
157 if [ "$?" = "1" ]; then
158 dpp=`echo "$lname" | sed 's/^\.\//TOP /;' | sed 's/\// /g;'`
159 echo "SubInclude $dpp ;" >>"$fname"
169 if [ "$fregen" == "ona" ]; then
170 if [ -e "$fname" ]; then
174 if [ "$xskip" = "tan" ]; then
178 echo "SubDir TOP ;" >"$fname"
181 for dname in `find . -maxdepth 8 -type d -name "[^._]*" -regex "^./[^._].*$"`; do
183 if [ "$?" = "1" ]; then
184 dpp=`echo "$dname" | sed 's/^\.\//TOP /;' | sed 's/\// /g;'`
185 echo "SubInclude $dpp ;" >>"$fname"
192 if [ "$fregen" == "ona" ]; then
193 if [ -e "$fname" ]; then
197 if [ "$xskip" = "tan" ]; then
202 echo "if ! ${dollar}(THIS_IS_K8JAM) { Exit \"You need k8jam to build this: https://repo.or.cz/k8jam.git\" ; }" >"$fname"
204 echo "softinclude ${dollar}(TOP)/Jamrules.local.preconfig ;" >>"$fname"
205 echo "softinclude ${dollar}(TOP)/Jamrules.configure ;" >>"$fname"
206 echo "softinclude ${dollar}(TOP)/Jamrules.local.pre ;" >>"$fname"
208 echo "set-profile ;" >>"$fname"
209 echo "set-target-locations ;" >>"$fname"
211 for dname in `find . -maxdepth 8 -type d -name "[^._]*" -regex "^./[^._].*$"`; do
213 if [ "$?" = "0" ]; then
215 if [ "$?" = "1" ]; then
216 if [ "$firsthdrs" = "tan" ]; then
221 dpp=`echo "$dname" | sed 's/^\.\//\(TOP)\//;'`
222 echo "HDRS += \$$dpp ;" >>"$fname"
226 if [ "$firsthdrs" = "tan" ]; then
230 echo "softinclude ${dollar}(TOP)/Jamrules.local ;" >>"$fname"
231 echo "softinclude ${dollar}(TOP)/Jamrules.libs ;" >>"$fname"
232 echo "softinclude ${dollar}(TOP)/Jamrules.install ;" >>"$fname"