| 1 | # $FreeWRT: src/share/misc/licence.template,v 1.20 2006/12/11 21:04:56 tg Rel $
|
|---|
| 2 | #-
|
|---|
| 3 | # Copyright (c) 2006, 2007
|
|---|
| 4 | # Thorsten Glaser <tg@mirbsd.de>
|
|---|
| 5 | #
|
|---|
| 6 | # Provided that these terms and disclaimer and all copyright notices
|
|---|
| 7 | # are retained or reproduced in an accompanying document, permission
|
|---|
| 8 | # is granted to deal in this work without restriction, including un-
|
|---|
| 9 | # limited rights to use, publicly perform, distribute, sell, modify,
|
|---|
| 10 | # merge, give away, or sublicence.
|
|---|
| 11 | #
|
|---|
| 12 | # Advertising materials mentioning features or use of this work must
|
|---|
| 13 | # display the following acknowledgement:
|
|---|
| 14 | # This product includes material provided by Thorsten Glaser.
|
|---|
| 15 | # This acknowledgement does not need to be reprinted if this work is
|
|---|
| 16 | # linked into a bigger work whose licence does not allow such clause
|
|---|
| 17 | # and the author of this work is given due credit in the bigger work
|
|---|
| 18 | # or its accompanying documents, where such information is generally
|
|---|
| 19 | # kept, provided that said credits are retained.
|
|---|
| 20 | #
|
|---|
| 21 | # This work is provided "AS IS" and WITHOUT WARRANTY of any kind, to
|
|---|
| 22 | # the utmost extent permitted by applicable law, neither express nor
|
|---|
| 23 | # implied; without malicious intent or gross negligence. In no event
|
|---|
| 24 | # may a licensor, author or contributor be held liable for indirect,
|
|---|
| 25 | # direct, other damage, loss, or other issues arising in any way out
|
|---|
| 26 | # of dealing in the work, even if advised of the possibility of such
|
|---|
| 27 | # damage or existence of a defect, except proven that it results out
|
|---|
| 28 | # of said person's immediate fault when using the work as intended.
|
|---|
| 29 | #-
|
|---|
| 30 | # Scan for prerequisite host tools.
|
|---|
| 31 |
|
|---|
| 32 | if test -z "$BASH_VERSION"; then
|
|---|
| 33 | echo FreeWRT requires GNU bash to be installed, sorry.
|
|---|
| 34 | exit 1
|
|---|
| 35 | fi
|
|---|
| 36 |
|
|---|
| 37 | shopt -s extglob
|
|---|
| 38 | topdir=$(pwd)
|
|---|
| 39 | opath=$PATH
|
|---|
| 40 | out=0
|
|---|
| 41 | bmake=
|
|---|
| 42 |
|
|---|
| 43 | if [[ $NO_ERROR != @(0|1) ]]; then
|
|---|
| 44 | echo Please do not invoke this script directly!
|
|---|
| 45 | exit 1
|
|---|
| 46 | fi
|
|---|
| 47 |
|
|---|
| 48 | set -e
|
|---|
| 49 | rm -rf $topdir/lbin/tmp
|
|---|
| 50 | mkdir -p $topdir/lbin/tmp
|
|---|
| 51 | cd $topdir/lbin/tmp
|
|---|
| 52 |
|
|---|
| 53 | rm -f foo
|
|---|
| 54 | echo >FOO
|
|---|
| 55 | if [[ -e foo ]]; then
|
|---|
| 56 | cat >&2 <<-EOF
|
|---|
| 57 | ERROR: FreeWRT cannot be built in a case-insensitive
|
|---|
| 58 | file system. Please use scripts/darwindiskimage on a
|
|---|
| 59 | Macintosh to create a case-sensitive filesystem image,
|
|---|
| 60 | or reconfigure your Windows system approprately.
|
|---|
| 61 | EOF
|
|---|
| 62 | exit 1
|
|---|
| 63 | fi
|
|---|
| 64 | rm -f FOO
|
|---|
| 65 |
|
|---|
| 66 | os=$(uname)
|
|---|
| 67 | case $os in
|
|---|
| 68 | Linux)
|
|---|
| 69 | # supported with no extra quirks at the moment
|
|---|
| 70 | ;;
|
|---|
| 71 | OpenBSD)
|
|---|
| 72 | # supported with no extra quirks at the moment
|
|---|
| 73 | # although some packages' autoconf scripts may
|
|---|
| 74 | # not properly recognise OpenBSD
|
|---|
| 75 | ;;
|
|---|
| 76 | MirBSD)
|
|---|
| 77 | # needs a little quirk, because the autoconf
|
|---|
| 78 | # version of some packages doesn't recognise
|
|---|
| 79 | # it as valid OS, and as build (not host) OS
|
|---|
| 80 | # faking OpenBSD is close enough
|
|---|
| 81 | rm -f $topdir/lbin/uname
|
|---|
| 82 | sed -e 's!@@FromOS@@!MirBSD!g' -e 's!@@ToOS@@!OpenBSD!g' \
|
|---|
| 83 | -e "s!@@PROG@@!$($topdir/lbin/which uname)!g" \
|
|---|
| 84 | <$topdir/scripts/uname.fake >$topdir/lbin/uname
|
|---|
| 85 | chmod 555 $topdir/lbin/uname
|
|---|
| 86 | bmake=/usr/bin/make
|
|---|
| 87 | ;;
|
|---|
| 88 | *)
|
|---|
| 89 | # unsupported
|
|---|
| 90 | echo "Building FreeWRT on $os is currently unsupported."
|
|---|
| 91 | echo "Sorry."
|
|---|
| 92 | echo
|
|---|
| 93 | case $os in
|
|---|
| 94 | Darwin|Cyg*)
|
|---|
| 95 | echo "The most prominent issue is that filesystems"
|
|---|
| 96 | echo "can be case-insensitive. Some macros are missing."
|
|---|
| 97 | echo
|
|---|
| 98 | ;;
|
|---|
| 99 | NetBSD|FreeBSD|DragonFly)
|
|---|
| 100 | echo "Building should succeed with relatively few"
|
|---|
| 101 | echo "patches, but perl must live in /usr/bin for"
|
|---|
| 102 | echo "now in FreeWRT, which should indeed be fixed."
|
|---|
| 103 | echo
|
|---|
| 104 | ;;
|
|---|
| 105 | esac
|
|---|
| 106 | echo "If you need FreeWRT building on $os, please contact"
|
|---|
| 107 | echo "the development team; there may be contractors available"
|
|---|
| 108 | echo "for this task. If you intend on turning $os into one of"
|
|---|
| 109 | echo "the supported build OSes, please contact us as well so"
|
|---|
| 110 | echo "that we can feed back your enhancements into FreeWRT."
|
|---|
| 111 | exit 1
|
|---|
| 112 | ;;
|
|---|
| 113 | esac
|
|---|
| 114 |
|
|---|
| 115 | set +e
|
|---|
| 116 |
|
|---|
| 117 | if [[ ! -e $topdir/lbin/gmake ]]; then
|
|---|
| 118 | for f in $topdir/tools_build/gmake/make \
|
|---|
| 119 | "$($topdir/lbin/which gmake)" "$($topdir/lbin/which make)"; do
|
|---|
| 120 | [[ -e $f ]] || continue
|
|---|
| 121 | if [[ $f = $topdir/tools_build/gmake/make ]]; then
|
|---|
| 122 | install -c -s -m 555 $f $topdir/lbin/gmake
|
|---|
| 123 | else
|
|---|
| 124 | ln -s "$f" $topdir/lbin/gmake
|
|---|
| 125 | fi
|
|---|
| 126 | break
|
|---|
| 127 | done
|
|---|
| 128 | fi
|
|---|
| 129 | X=$($topdir/lbin/gmake --version 2>&1 | grep '^GNU Make' | \
|
|---|
| 130 | sed -e 's/GNU Make //' -e 's/version //' -e 's/, by.*$//')
|
|---|
| 131 | [[ $X = +([0-9]).+([0-9]).+([0-9]) ]] && X=${X%.*}
|
|---|
| 132 | if [[ $X = +([0-9]).+([0-9]) ]]; then
|
|---|
| 133 | let major=${X%.*}
|
|---|
| 134 | let minor=${X#*.}
|
|---|
| 135 | elif [[ $X = +([0-9]).+([0-9])beta* ]]; then
|
|---|
| 136 | # Beta version is not "the real thing"
|
|---|
| 137 | let major=${X%.*}
|
|---|
| 138 | X=${X%beta*}
|
|---|
| 139 | let minor=${X#*.}-1
|
|---|
| 140 | else
|
|---|
| 141 | let major=0
|
|---|
| 142 | fi
|
|---|
| 143 | if (( (major < 3) || ((major == 3) && (minor < 81)) )); then
|
|---|
| 144 | echo "---> building GNU make 3.81"
|
|---|
| 145 | rm -rf $topdir/tools_build/gmake $topdir/lbin/gmake
|
|---|
| 146 | set -e
|
|---|
| 147 | mkdir -p $topdir/tools_build/gmake
|
|---|
| 148 | cd $topdir/tools_build/gmake
|
|---|
| 149 | env CPPFLAGS="$CPPFLAGS -Dstrcmpi=strcasecmp" \
|
|---|
| 150 | CFLAGS="$(grep '^HOSTCFLAGS' $topdir/lbin/prereq.mk | \
|
|---|
| 151 | sed 's/HOSTCFLAGS:=//')" \
|
|---|
| 152 | $BASH $topdir/tools/gmake/configure \
|
|---|
| 153 | --program-prefix=g \
|
|---|
| 154 | --disable-dependency-tracking \
|
|---|
| 155 | --disable-nls \
|
|---|
| 156 | --without-libiconv-prefix \
|
|---|
| 157 | --without-libintl-prefix
|
|---|
| 158 | make all
|
|---|
| 159 | install -c -s -m 555 make $topdir/lbin/gmake
|
|---|
| 160 | set +e
|
|---|
| 161 | cd $topdir/lbin; ls -l gmake
|
|---|
| 162 | cd $topdir/lbin/tmp
|
|---|
| 163 | fi
|
|---|
| 164 | export PATH=$topdir/lbin:$PATH
|
|---|
| 165 |
|
|---|
| 166 | cat >Makefile <<'EOF'
|
|---|
| 167 | include ${TOPDIR}/lbin/prereq.mk
|
|---|
| 168 | HOSTCFLAGS+= ${FLAG_TEST}
|
|---|
| 169 | all: run-test
|
|---|
| 170 |
|
|---|
| 171 | test: test.c
|
|---|
| 172 | ${HOSTCC} ${HOSTCFLAGS} -o $@ $^ ${LDADD}
|
|---|
| 173 |
|
|---|
| 174 | run-test: test
|
|---|
| 175 | ./test
|
|---|
| 176 | EOF
|
|---|
| 177 | cat >test.c <<-'EOF'
|
|---|
| 178 | #include <stdio.h>
|
|---|
| 179 | int
|
|---|
| 180 | main()
|
|---|
| 181 | {
|
|---|
| 182 | printf("Yay! Native compiler works.\n");
|
|---|
| 183 | return (0);
|
|---|
| 184 | }
|
|---|
| 185 | EOF
|
|---|
| 186 | X=$(gmake TOPDIR=$topdir 2>&1)
|
|---|
| 187 | if [[ $X != *@(Native compiler works)* ]]; then
|
|---|
| 188 | echo "$X" | sed 's/^/| /'
|
|---|
| 189 | echo Cannot compile a simple test programme.
|
|---|
| 190 | echo You must install a host make and C compiler,
|
|---|
| 191 | echo usually GCC, to proceed.
|
|---|
| 192 | echo
|
|---|
| 193 | out=1
|
|---|
| 194 | fi
|
|---|
| 195 | rm test
|
|---|
| 196 |
|
|---|
| 197 | X=$(gmake FLAG_TEST=-fwrapv TOPDIR=$topdir 2>&1)
|
|---|
| 198 | grep '^HOSTCFLAGS.*-fwrapv' ../prereq.mk >/dev/null 2>&1 || \
|
|---|
| 199 | if [[ $X = *@(Native compiler works)* ]]; then
|
|---|
| 200 | printf '/^HOSTCFLAGS/s/$/ -fwrapv/\nwq\n' | ed -s ../prereq.mk
|
|---|
| 201 | else
|
|---|
| 202 | echo "$X" | sed 's/^/| /'
|
|---|
| 203 | fi
|
|---|
| 204 | rm test
|
|---|
| 205 |
|
|---|
| 206 | need_fnotreevrp=0
|
|---|
| 207 | X=$(gmake FLAG_TEST=-fno-tree-vrp TOPDIR=$topdir 2>&1)
|
|---|
| 208 | grep '^HOSTCFLAGS.*-fno-tree-vrp' ../prereq.mk >/dev/null 2>&1 || \
|
|---|
| 209 | if [[ $X = *@(Native compiler works)* ]]; then
|
|---|
| 210 | need_fnotreevrp=1
|
|---|
| 211 | else
|
|---|
| 212 | #echo "$X" | sed 's/^/| /'
|
|---|
| 213 | :
|
|---|
| 214 | fi
|
|---|
| 215 | rm test*
|
|---|
| 216 | if [[ $need_fnotreevrp = 1 ]]; then
|
|---|
| 217 | cat >test.c <<-'EOF'
|
|---|
| 218 | typedef unsigned size_t;
|
|---|
| 219 | char *strncpy(char *, const char *, size_t);
|
|---|
| 220 | char *
|
|---|
| 221 | strncpy(char *d, const char *s, size_t n)
|
|---|
| 222 | {
|
|---|
| 223 | if (!d || !s) {
|
|---|
| 224 | if (d)
|
|---|
| 225 | *d = n;
|
|---|
| 226 | return (d);
|
|---|
| 227 | }
|
|---|
| 228 | return (*d = 1, d);
|
|---|
| 229 | }
|
|---|
| 230 | int
|
|---|
| 231 | main(void)
|
|---|
| 232 | {
|
|---|
| 233 | char a[] = "t";
|
|---|
| 234 | strncpy(a, (void *)0, 2);
|
|---|
| 235 | return (*a);
|
|---|
| 236 | }
|
|---|
| 237 | EOF
|
|---|
| 238 | X=$(gmake test TOPDIR=$topdir 2>&1)
|
|---|
| 239 | if [[ -x test ]]; then
|
|---|
| 240 | ./test >/dev/null 2>&1
|
|---|
| 241 | [[ $? = 2 ]] && need_fnotreevrp=0
|
|---|
| 242 | fi
|
|---|
| 243 | rm test*
|
|---|
| 244 | fi
|
|---|
| 245 | [[ $need_fnotreevrp = 1 ]] && \
|
|---|
| 246 | printf '/^HOSTCFLAGS/s/$/ -fno-tree-vrp/\nwq\n' | ed -s ../prereq.mk
|
|---|
| 247 |
|
|---|
| 248 | if ! which flex >/dev/null 2>&1; then
|
|---|
| 249 | echo You must install flex to continue.
|
|---|
| 250 | echo
|
|---|
| 251 | out=1
|
|---|
| 252 | else
|
|---|
| 253 | echo '%%' | flex -
|
|---|
| 254 | if fgrep _POSIX_SOURCE lex.yy.c; then
|
|---|
| 255 | echo Your lexer \(flex\) contains a broken skeleton.
|
|---|
| 256 | if [[ $NO_ERROR = 1 ]]; then
|
|---|
| 257 | echo WARNING: continue at your own risk.
|
|---|
| 258 | echo Some packages may be broken.
|
|---|
| 259 | else
|
|---|
| 260 | echo You can continue the build by issuing \'make prereq-noerror\'
|
|---|
| 261 | echo However, several packages may faild to build correctly.
|
|---|
| 262 | out=1
|
|---|
| 263 | fi
|
|---|
| 264 | echo
|
|---|
| 265 | fi
|
|---|
| 266 | fi
|
|---|
| 267 |
|
|---|
| 268 | if ! which bison >/dev/null 2>&1; then
|
|---|
| 269 | echo You must install GNU Bison to continue.
|
|---|
| 270 | echo While you can install any version, it is '*STRONGLY*' suggested
|
|---|
| 271 | echo to install GNU Bison version 2.3 because of its bug fixes.
|
|---|
| 272 | echo
|
|---|
| 273 | out=1
|
|---|
| 274 | fi
|
|---|
| 275 | X=$(bison --version 2>&1 | fgrep 'GNU Bison' | sed 's/^[^0-9]*//')
|
|---|
| 276 | V=old
|
|---|
| 277 | if [[ $X = +([0-9]).+([0-9]) ]]; then
|
|---|
| 278 | let major=${X%.*}
|
|---|
| 279 | let minor=${X#*.}
|
|---|
| 280 | if (( (major > 2) || ((major == 2) && (minor >= 3)) )); then
|
|---|
| 281 | V=new
|
|---|
| 282 | fi
|
|---|
| 283 | fi
|
|---|
| 284 | if [[ $V = old ]]; then
|
|---|
| 285 | echo It is suggested to upgrade your copy of bison to
|
|---|
| 286 | echo GNU Bison 2.3 because of its bug fixes.
|
|---|
| 287 | fi
|
|---|
| 288 |
|
|---|
| 289 | if ! which gzip >/dev/null 2>&1; then
|
|---|
| 290 | echo You must install gzip to continue.
|
|---|
| 291 | echo
|
|---|
| 292 | out=1
|
|---|
| 293 | fi
|
|---|
| 294 |
|
|---|
| 295 | if ! which bzip2 >/dev/null 2>&1; then
|
|---|
| 296 | echo You must install bzip2 to continue.
|
|---|
| 297 | echo
|
|---|
| 298 | out=1
|
|---|
| 299 | fi
|
|---|
| 300 |
|
|---|
| 301 | if ! which unzip >/dev/null 2>&1; then
|
|---|
| 302 | echo You must install unzip to continue, sorry.
|
|---|
| 303 | echo
|
|---|
| 304 | out=1
|
|---|
| 305 | fi
|
|---|
| 306 |
|
|---|
| 307 | if ! which zip >/dev/null 2>&1; then
|
|---|
| 308 | echo You must install zip to continue, sorry.
|
|---|
| 309 | echo
|
|---|
| 310 | out=1
|
|---|
| 311 | fi
|
|---|
| 312 |
|
|---|
| 313 | if ! which patch >/dev/null 2>&1; then
|
|---|
| 314 | echo You must install patch \(from Larry Wall\) to continue.
|
|---|
| 315 | echo
|
|---|
| 316 | out=1
|
|---|
| 317 | fi
|
|---|
| 318 |
|
|---|
| 319 | cat >test.c <<-'EOF'
|
|---|
| 320 | #include <stdio.h>
|
|---|
| 321 | #include <zlib.h>
|
|---|
| 322 |
|
|---|
| 323 | #ifndef STDIN_FILENO
|
|---|
| 324 | #define STDIN_FILENO 0
|
|---|
| 325 | #endif
|
|---|
| 326 |
|
|---|
| 327 | int
|
|---|
| 328 | main()
|
|---|
| 329 | {
|
|---|
| 330 | gzFile zstdin;
|
|---|
| 331 | char buf[1024];
|
|---|
| 332 | int i;
|
|---|
| 333 |
|
|---|
| 334 | zstdin = gzdopen(STDIN_FILENO, "rb");
|
|---|
| 335 | i = gzread(zstdin, buf, sizeof (buf));
|
|---|
| 336 | if ((i > 0) && (i < sizeof (buf)))
|
|---|
| 337 | buf[i] = '\0';
|
|---|
| 338 | buf[sizeof (buf) - 1] = '\0';
|
|---|
| 339 | printf("%s\n", buf);
|
|---|
| 340 | return (0);
|
|---|
| 341 | }
|
|---|
| 342 | EOF
|
|---|
| 343 | X=$(echo 'Yay! Native compiler works.' | gzip | \
|
|---|
| 344 | gmake TOPDIR=$topdir LDADD=-lz 2>&1)
|
|---|
| 345 | if [[ $X != *@(Native compiler works)* ]]; then
|
|---|
| 346 | echo "$X" | sed 's/^/| /'
|
|---|
| 347 | echo Cannot compile a libz test programme.
|
|---|
| 348 | echo You must install the zlib development package,
|
|---|
| 349 | echo usually called libz-dev, and the run-time library.
|
|---|
| 350 | echo
|
|---|
| 351 | out=1
|
|---|
| 352 | fi
|
|---|
| 353 |
|
|---|
| 354 | if [[ ! -s /usr/include/ncurses.h ]]; then
|
|---|
| 355 | echo Install ncurses header files, please.
|
|---|
| 356 | echo
|
|---|
| 357 | out=1
|
|---|
| 358 | fi
|
|---|
| 359 |
|
|---|
| 360 | if ! which g++ >/dev/null 2>&1; then
|
|---|
| 361 | echo You must install the host GNU C++ compiler to continue.
|
|---|
| 362 | echo
|
|---|
| 363 | out=1
|
|---|
| 364 | fi
|
|---|
| 365 |
|
|---|
| 366 | #if ! which perl >/dev/null 2>&1; then
|
|---|
| 367 | if [[ "$(which perl 2>/dev/null)" != /usr/bin/perl ]]; then
|
|---|
| 368 | echo You must install Perl in /usr/bin to continue.
|
|---|
| 369 | echo
|
|---|
| 370 | out=1
|
|---|
| 371 | fi
|
|---|
| 372 |
|
|---|
| 373 | if ! which wget >/dev/null 2>&1; then
|
|---|
| 374 | echo You must install GNU wget to continue.
|
|---|
| 375 | echo
|
|---|
| 376 | out=1
|
|---|
| 377 | fi
|
|---|
| 378 |
|
|---|
| 379 | if ! which makeinfo >/dev/null 2>&1; then
|
|---|
| 380 | echo You must install GNU texinfo to continue.
|
|---|
| 381 | echo
|
|---|
| 382 | out=1
|
|---|
| 383 | fi
|
|---|
| 384 |
|
|---|
| 385 | if ! which ed >/dev/null 2>&1; then
|
|---|
| 386 | echo Why does your distribution not package the standard
|
|---|
| 387 | echo text editor, ed? Please install it to continue.
|
|---|
| 388 | echo
|
|---|
| 389 | out=1
|
|---|
| 390 | elif [[ "$(PATH=/bin:$PATH which ed 2>/dev/null)" != /bin/ed ]]; then
|
|---|
| 391 | echo Your operating system installs ed, the standard text
|
|---|
| 392 | echo editor, not as /bin/ed. While you can build FreeWRT
|
|---|
| 393 | echo with this, ask your vendor to fix it, point to the
|
|---|
| 394 | echo FHS if needed.
|
|---|
| 395 | echo
|
|---|
| 396 | fi
|
|---|
| 397 |
|
|---|
| 398 | if ! which file >/dev/null 2>&1; then
|
|---|
| 399 | echo You must install \"file\" to continue.
|
|---|
| 400 | echo
|
|---|
| 401 | out=1
|
|---|
| 402 | fi
|
|---|
| 403 |
|
|---|
| 404 | have_tsort=0
|
|---|
| 405 | if which tsort >/dev/null 2>&1; then
|
|---|
| 406 | v=$(printf 'a b\nb c\n' | tsort -r 2>/dev/null | md5sum)
|
|---|
| 407 | [[ ${v%% *} = 0617bc44e824dd65da71d04b29c85e63 ]] && have_tsort=1
|
|---|
| 408 | fi
|
|---|
| 409 |
|
|---|
| 410 | if [[ $have_tsort = 0 ]]; then
|
|---|
| 411 | bmake=
|
|---|
| 412 | else
|
|---|
| 413 | for x in $bmake $(which mmake) $(which bmake) /usr/bin/make; do
|
|---|
| 414 | bmake=
|
|---|
| 415 | y=$(printf 't:\n\t@echo ${_MIRMAKE_VER}\n' | \
|
|---|
| 416 | $x -f - t 2>/dev/null)
|
|---|
| 417 | [[ $y = +([0-9]) ]] || continue
|
|---|
| 418 | [[ $y < 20070626 ]] && continue
|
|---|
| 419 | bmake=$x
|
|---|
| 420 | break
|
|---|
| 421 | done
|
|---|
| 422 | fi
|
|---|
| 423 | [[ $bmake = $topdir/lbin/bmake ]] && bmake=
|
|---|
| 424 |
|
|---|
| 425 | if [[ $have_tsort = 0 || -z $bmake ]]; then
|
|---|
| 426 | echo USE_TOOLS_MIRMAKE=1 >>$topdir/lbin/prereq.mk
|
|---|
| 427 | bmake=$topdir/lbin/bmake
|
|---|
| 428 | if ! which mksh >/dev/null 2>&1; then
|
|---|
| 429 | echo USE_TOOLS_MKSH=1 >>$topdir/lbin/prereq.mk
|
|---|
| 430 | fi
|
|---|
| 431 | fi
|
|---|
| 432 |
|
|---|
| 433 | echo "BMAKE='$bmake'" >>$topdir/lbin/prereq.mk
|
|---|
| 434 |
|
|---|
| 435 |
|
|---|
| 436 | cd $topdir
|
|---|
| 437 | rm -rf lbin/tmp
|
|---|
| 438 |
|
|---|
| 439 | # populate some more tools
|
|---|
| 440 | cat >lbin/autoconf <<-EOF
|
|---|
| 441 | #!$BASH
|
|---|
| 442 | echo '===> Warning: this package calls autoconf!'
|
|---|
| 443 | exit 0
|
|---|
| 444 | EOF
|
|---|
| 445 | cp lbin/autoconf lbin/autoheader
|
|---|
| 446 | for v in 2.13 2.52 2.53 2.54 2.55 2.56 2.57 2.58 2.59 2.60 2.61; do
|
|---|
| 447 | cp lbin/autoconf lbin/autoconf-$v
|
|---|
| 448 | cp lbin/autoconf lbin/autoheader-$v
|
|---|
| 449 | done
|
|---|
| 450 | cat >lbin/automake <<-EOF
|
|---|
| 451 | #!$BASH
|
|---|
| 452 | echo '===> Warning: this package calls automake!'
|
|---|
| 453 | exit 0
|
|---|
| 454 | EOF
|
|---|
| 455 | cp lbin/automake lbin/aclocal
|
|---|
| 456 | for v in 1.4 1.5 1.6 1.7 1.8 1.9 1.10; do
|
|---|
| 457 | cp lbin/automake lbin/automake-$v
|
|---|
| 458 | cp lbin/automake lbin/aclocal-$v
|
|---|
| 459 | done
|
|---|
| 460 | chmod a+x lbin/{autoconf,autoheader,automake,aclocal}*
|
|---|
| 461 |
|
|---|
| 462 | exit $out
|
|---|