Changeset 1318

Show
Ignore:
Timestamp:
12/18/06 20:27:23 (2 years ago)
Author:
tg
Message:

got another great idea: why not check for supported OSes
during 'make prereq', tell the user to contact us (we may
even have a (commercial) contractor available for the task
of porting to a new build (not host) system) and what the
issues with some of the OSes are

also move other uname-related stuff from Makefile into
scan-tools.sh so that we keep them in one place

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/freewrt/Makefile

    r1232 r1318  
    9090                chmod 555 lbin/md5sum; \ 
    9191        fi 
    92         @if test x"$$(uname)" = x"MirBSD"; then \ 
    93                 sed -e 's!@@FromOS@@!MirBSD!g' -e 's!@@ToOS@@!OpenBSD!g' \ 
    94                     -e "s!@@PROG@@!$$(lbin/which uname)!g" \ 
    95                     <scripts/uname.fake >lbin/uname; \ 
    96                 chmod 555 lbin/uname; \ 
    97         fi 
    9892        @echo "TOPDIR:=$$(readlink -nf .)" >lbin/prereq.mk 
    9993        @echo "BASH:=$$(lbin/which bash)" >>lbin/prereq.mk 
  • trunk/freewrt/scripts/scan-tools.sh

    r1224 r1318  
    11#!/usr/bin/env bash 
    2 # $FreeWRT: src/share/misc/licence.template,v 1.8 2006/06/16 23:03:39 tg Rel $ 
     2# $FreeWRT: src/share/misc/licence.template,v 1.20 2006/12/11 21:04:56 tg Rel $ 
    33#- 
    44# Copyright (c) 2006 
    55#       Thorsten Glaser <tg@mirbsd.de> 
    66# 
    7 # Licensee is hereby permitted to deal in this work without restric- 
    8 # tion, including unlimited rights to use, publicly perform, modify, 
    9 # merge, distribute, sell, give away or sublicence, provided all co- 
    10 # pyright notices above, these terms and the disclaimer are retained 
    11 # in all redistributions or reproduced in accompanying documentation 
    12 # or other materials provided with binary redistributions. 
     7# Provided that these terms and disclaimer and all copyright notices 
     8# are retained or reproduced in an accompanying document, permission 
     9# is granted to deal in this work without restriction, including un- 
     10# limited rights to use, publicly perform, distribute, sell, modify, 
     11# merge, give away, or sublicence. 
    1312# 
    1413# Advertising materials mentioning features or use of this work must 
     
    1817# linked into a bigger work whose licence does not allow such clause 
    1918# and the author of this work is given due credit in the bigger work 
    20 # or its documentation. 
     19# or its accompanying documents, where such information is generally 
     20# kept, provided that said credits are retained. 
    2121# 
    22 # Licensor offers the work "AS IS" and WITHOUT WARRANTY of any kind, 
    23 # express, or implied, to the maximum extent permitted by applicable 
    24 # law, without malicious intent or gross negligence; in no event may 
    25 # licensor, an author or contributor be held liable for any indirect 
    26 # or other damage, or direct damage except proven a consequence of a 
    27 # direct error of said person and intended use of this work, loss or 
    28 # other issues arising in any way out of its use, even if advised of 
    29 # the possibility of such damage or existence of a defect
     22# This work is provided "AS IS" and WITHOUT WARRANTY of any kind, to 
     23# the utmost extent permitted by applicable law, neither express nor 
     24# implied; without malicious intent or gross negligence. In no event 
     25# may a licensor, author or contributor be held liable for indirect, 
     26# direct, other damage, loss, or other issues arising in any way out 
     27# of dealing in the work, even if advised of the possibility of such 
     28# damage or existence of a defect, except proven that it results out 
     29# of said person's immediate fault when using the work as intended
    3030#- 
    3131# Scan for prerequisite host tools. 
     
    5050mkdir -p $topdir/lbin/tmp 
    5151cd $topdir/lbin/tmp 
     52 
     53os=$(uname) 
     54case $os in 
     55Linux) 
     56        # supported with no extra quirks at the moment 
     57        ;; 
     58OpenBSD) 
     59        # supported with no extra quirks at the moment 
     60        # although some packages' autoconf scripts may 
     61        # not properly recognise OpenBSD 
     62        ;; 
     63MirBSD) 
     64        # needs a little quirk, because the autoconf 
     65        # version of some packages doesn't recognise 
     66        # it as valid OS, and as build (not host) OS 
     67        # faking OpenBSD is close enough 
     68        rm -f $topdir/lbin/uname 
     69        sed -e 's!@@FromOS@@!MirBSD!g' -e 's!@@ToOS@@!OpenBSD!g' \ 
     70            -e "s!@@PROG@@!$($topdir/lbin/which uname)!g" \ 
     71            <$topdir/scripts/uname.fake >$topdir/lbin/uname 
     72        chmod 555 $topdir/lbin/uname 
     73        ;; 
     74*) 
     75        # unsupported 
     76        echo "Building FreeWRT on $os is currently unsupported." 
     77        echo "Sorry." 
     78        echo 
     79        case $os in 
     80        Darwin|Cyg*) 
     81                echo "The most prominent issue is that filesystems" 
     82                echo "can be case-insensitive. Some macros are missing." 
     83                echo 
     84                ;; 
     85        NetBSD|FreeBSD|DragonFly) 
     86                echo "Building should succeed with relatively few" 
     87                echo "patches, but perl must live in /usr/bin for" 
     88                echo "now in FreeWRT, which should indeed be fixed." 
     89                echo 
     90                ;; 
     91        esac 
     92        echo "If you need FreeWRT building on $os, please contact" 
     93        echo "the development team; there may be contractors available" 
     94        echo "for this task. If you intend on turning $os into one of" 
     95        echo "the supported build OSes, please contact us as well so" 
     96        echo "that we can feed back your enhancements into FreeWRT." 
     97        exit 1 
     98        ;; 
     99esac 
     100 
    52101set +e 
    53102cat >Makefile <<'EOF'