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, either version 3 of the License, or
4 # (at your option) any later version.
6 # This program is distributed in the hope that it will be useful,
7 # but WITHOUT ANY WARRANTY; without even the implied warranty of
8 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9 # GNU General Public License for more details.
11 # You should have received a copy of the GNU General Public License
12 # along with this program. If not, see <http://www.gnu.org/licenses/>.
17 rule -Generate-Boiler- {
22 _f = '_-boiler-target-force-_' ;
24 _f = '_-boiler-target-noforce-_' ;
28 AGenBoiler gen-boiler $(_f) ;
32 actions quietly AGenBoiler {
35 if [ "z$fregen" != "z_-boiler-target-force-_" ]; then
44 llist=`find "$1" -mindepth 1 -maxdepth 1 -type f -name "*.c" -regex "^./[^._].*$"`
45 if [ "z$llist" != "z" ]; then
48 llist=`find "$1" -mindepth 1 -maxdepth 1 -type f -name "*.d" -regex "^./[^._].*$"`
49 if [ "z$llist" != "z" ]; then
52 llist=`find "$1" -mindepth 1 -maxdepth 1 -type f -name "*.cpp" -regex "^./[^._].*$"`
53 if [ "z$llist" != "z" ]; then
56 llist=`find "$1" -mindepth 1 -maxdepth 1 -type f -name "*.c++" -regex "^./[^._].*$"`
57 if [ "z$llist" != "z" ]; then
66 llist=`find "$1" -mindepth 1 -maxdepth 1 -type f -name "*.h" -regex "^./[^._].*$"`
67 if [ "z$llist" = "z" ]; then
68 llist=`find "$1" -mindepth 1 -maxdepth 1 -type f -name "*.hpp" -regex "^./[^._].*$"`
69 if [ "z$llist" = "z" ]; then
78 if [ "z$prjname" = "z" ]; then
82 for dname in `find . -maxdepth 8 -type d -name "[^._]*" -regex "^./[^._].*$"`; do
83 fname="$dname/Jamfile"
85 if [ "$fregen" == "ona" ]; then
86 if [ -e "${fname}" ]; then
90 if [ "$xskip" != "tan" ]; then
92 if [ "$?" = "0" ]; then
96 if [ "$xskip" = "tan" ]; then
100 dpp=`echo "$dname" | sed 's/^\.\//TOP /;' | sed 's/\// /g;'`
101 echo "SubDir $dpp ;" >"$fname"
104 if [ "$dname" != "./src" ]; then
105 dpp=`basename "$dname"`
106 fc=`echo "$dpp" | cut -c1-3`
107 if [ "z$fc" != "zlib" ]; then dpp="lib${dpp}"; fi
108 echo "Library ${dpp}.a :" >>"$fname"
110 echo "Main ${prjname} :" >>"$fname"
112 llist=`find "$dname" -mindepth 1 -maxdepth 1 -type f -name "*.c" -regex "^./[^._].*$"`
113 for lname in $llist; do
114 dpp=`basename "$lname"`
115 echo " $dpp" >>"$fname"
117 llist=`find "$dname" -mindepth 1 -maxdepth 1 -type f -name "*.d" -regex "^./[^._].*$"`
118 for lname in $llist; do
119 dpp=`basename "$lname"`
120 echo " $dpp" >>"$fname"
122 llist=`find "$dname" -mindepth 1 -maxdepth 1 -type f -name "*.cpp" -regex "^./[^._].*$"`
123 for lname in $llist; do
124 dpp=`basename "$lname"`
125 echo " $dpp" >>"$fname"
127 llist=`find "$dname" -mindepth 1 -maxdepth 1 -type f -name "*.c++" -regex "^./[^._].*$"`
128 for lname in $llist; do
129 dpp=`basename "$lname"`
130 echo " $dpp" >>"$fname"
133 llist=`find "$dname" -mindepth 1 -maxdepth 8 -type d -name "[^._]*" -regex "^./[^._].*$"`
134 if [ "z$llist" != "z" ]; then
135 if [ "$dname" = "./src" ]; then
137 for lname in $llist; do
139 if [ "$?" != "0" ]; then
140 dpp=`basename "$lname"`
141 fc=`echo "$dpp" | cut -c1-3`
142 if [ "z$fc" != "zlib" ]; then dpp="lib${dpp}"; fi
143 llibs="${llibs} ${dpp}.a"
146 if [ "z$llibs" != "z" ]; then
147 echo "LinkLibraries ${prjname} :" >>"$fname"
148 for lname in $llibs; do
149 echo " ${lname}" >>"$fname"
156 for lname in $llist; do
158 if [ "$?" = "1" ]; then
159 dpp=`echo "$lname" | sed 's/^\.\//TOP /;' | sed 's/\// /g;'`
160 echo "SubInclude $dpp ;" >>"$fname"
170 if [ "$fregen" == "ona" ]; then
171 if [ -e "$fname" ]; then
175 if [ "$xskip" = "tan" ]; then
179 echo "SubDir TOP ;" >"$fname"
182 for dname in `find . -maxdepth 8 -type d -name "[^._]*" -regex "^./[^._].*$"`; do
184 if [ "$?" = "1" ]; then
185 dpp=`echo "$dname" | sed 's/^\.\//TOP /;' | sed 's/\// /g;'`
186 echo "SubInclude $dpp ;" >>"$fname"
193 if [ "$fregen" == "ona" ]; then
194 if [ -e "$fname" ]; then
198 if [ "$xskip" = "tan" ]; then
203 echo "softinclude ${dollar}(TOP)/Jamrules.configure ;" >"$fname"
205 echo "set-profile ;" >>"$fname"
206 echo "set-target-locations ;" >>"$fname"
208 for dname in `find . -maxdepth 8 -type d -name "[^._]*" -regex "^./[^._].*$"`; do
210 if [ "$?" = "0" ]; then
212 if [ "$?" = "1" ]; then
213 if [ "$firsthdrs" = "tan" ]; then
218 dpp=`echo "$dname" | sed 's/^\.\//\(TOP)\//;'`
219 echo "HDRS += \$$dpp ;" >>"$fname"
223 if [ "$firsthdrs" = "tan" ]; then
227 echo "softinclude ${dollar}(TOP)/Jamrules.local ;" >>"$fname"
228 echo "softinclude ${dollar}(TOP)/Jamrules.libs ;" >>"$fname"
229 echo "softinclude ${dollar}(TOP)/Jamrules.install ;" >>"$fname"