From 0e57f0c510b7d7eb688695359048a1f0a585e26a Mon Sep 17 00:00:00 2001 From: rmanfredi Date: Thu, 24 Aug 2006 12:32:52 +0000 Subject: Moving project to sourceforge. git-svn-id: svn://svn.code.sf.net/p/dist/code/trunk/dist@1 2592e710-e01b-42a5-8df0-11608a6cc53d --- mcon/U/Cross.U | 349 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 349 insertions(+) create mode 100644 mcon/U/Cross.U (limited to 'mcon/U/Cross.U') diff --git a/mcon/U/Cross.U b/mcon/U/Cross.U new file mode 100644 index 0000000..feaef31 --- /dev/null +++ b/mcon/U/Cross.U @@ -0,0 +1,349 @@ +?RCS: $Id$ +?RCS: +?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi +?RCS: +?RCS: You may redistribute only under the terms of the Artistic Licence, +?RCS: as specified in the README file that comes with the distribution. +?RCS: You may reuse parts of this distribution only within the terms of +?RCS: that same Artistic Licence; a copy of which may be found at the root +?RCS: of the source tree for dist 4.0. +?RCS: +?RCS: Copyright (c) 2001 Jarkko Hietaniemi +?RCS: +?MAKE:run to from targetarch usecrosscompile: src awk cat grep test rm \ + echo sed mkdir cp touch chmod +?MAKE: -pick add $@ %< +?Y:TOP +?S:usecrosscompile: +?S: This variable conditionally defines the USE_CROSS_COMPILE symbol, +?S: and indicates that our package has been cross-compiled. +?S:. +?S:run: +?S: This variable contains the command used by Configure +?S: to copy and execute a cross-compiled executable in the +?S: target host. Useful and available only during the build. +?S: Empty string '' if not cross-compiling. +?S:. +?S:from: +?S: This variable contains the command used by Configure +?S: to copy files from the target host. Useful and available +?S: only during the build. +?S: The string ':' if not cross-compiling. +?S:. +?S:to: +?S: This variable contains the command used by Configure +?S: to copy to from the target host. Useful and available +?S: only during the build. +?S: The string ':' if not cross-compiling. +?S:. +?S:targetarch: +?S: If cross-compiling, this variable contains the target architecture. +?S: If not, this will be empty. +?S:. +?C:USE_CROSS_COMPILE: +?C: This symbol, if defined, indicates that the package is being +?C: cross-compiled. +?C:. +?C:CROSS_TARGET_ARCH: +?C: This symbol, if defined, indicates the target architecture +?C: the package has been cross-compiled to. +?C: Undefined if not a cross-compile. +?C:. +?H:?usecrosscompile:#ifndef USE_CROSS_COMPILE +?H:?usecrosscompile:#$usecrosscompile USE_CROSS_COMPILE /**/ +?H:?usecrosscompile:#define CROSS_TARGET_ARCH "$targetarch" /**/ +?H:?usecrosscompile:#endif +?H:. +?T:croak pwd exe f q i j cwd +?LINT:extern usecrosscompile +?LINT:extern cc +?LINT:extern usrinc +?LINT:change usrinc +?LINT:change ar +?LINT:change nm +?LINT:change ranlib +?LINT:extern targethost +?LINT:extern targetdir +?LINT:change targetdir +?LINT:extern targetuser +?LINT:change targetuser +?LINT:extern targetrun +?LINT:extern targetfrom +?LINT:extern targetto +?LINT:extern targetmkdir +?LINT:change targetrun +?LINT:change targetfrom +?LINT:change targetto +?LINT:change targetmkdir +?LINT:extern incpth +?LINT:extern libpth +?LINT:change incpth +?LINT:change libpth +?LINT:extern locincpth +?LINT:extern loclibpth +?LINT:change locincpth +?LINT:change loclibpth +: setup for possible cross-compilation +run='' +to=: +from=: +usecrosscompile='undef' +targetarch='' +case "$usecrosscompile" in +$define|true|[yY]*) +@if { test -d ../Cross } +?X: +?X: Cross-compilation is enabled when there is a 'Cross' directory found +?X: at the root of the package. This directory must contain the following +?X: entries for defining the cross-compilation process: +?X: +?X: FIXME FIXME +?X: WE MUST DISTINGUISH BETWEEN LOCAL cross-compiling AND REMOTE ONE +?X: ACTUALLY, REMOTE COMPILATION SHOULD BE CONFIGURED INTERACTIVELY +?X: IT WILL COPY ALL THE FILES FROM THE MANIFEST DOWN TO THE REMOTE DIR... +?X: (and copy things like 'mkdep', etc...) +?X: + $echo "Cross-compiling..." + croak='' + case "$cc" in + *-*-gcc) +?X: A cross-compiling gcc, probably. + targetarch=`$echo $cc|$sed 's/-gcc$//'` + ar=$targetarch-ar +?X: leave out ld, choosing it is more complex + nm=$targetarch-nm + ranlib=$targetarch-ranlib + $echo 'extern int foo;' > try.c + set X `$cc -v -E try.c 2>&1 | \ + $awk '/^#include &4 + for i in $*; do + j="`$echo $i|$sed 's,/include$,/lib,'`" + if $test -d $j; then + libpth="$libpth $j" + fi + done + libpth="`$echo $libpth|$sed 's/^ //'`" + echo "Guessing libpth '$libpth'." >&4 + fi + $rm -f try.c + ;; + esac + case "$targetarch" in + '') echo "Targetarch not defined." >&4; croak=y ;; + *) echo "Using targetarch $targetarch." >&4 ;; + esac + case "$incpth" in + '') echo "Incpth not defined." >&4; croak=y ;; + *) echo "Using incpth '$incpth'." >&4 ;; + esac + case "$libpth" in + '') echo "Libpth not defined." >&4; croak=y ;; + *) echo "Using libpth '$libpth'." >&4 ;; + esac + case "$usrinc" in + '') + for i in $incpth; do + if $test -f $i/errno.h -a -f $i/stdio.h -a -f $i/time.h; then + usrinc=$i + echo "Guessing usrinc $usrinc." >&4 + break + fi + done + case "$usrinc" in + '') echo "Usrinc not defined." >&4; croak=y ;; + esac + ;; + *) echo "Using usrinc $usrinc." >&4 ;; + esac + case "$targethost" in + '') echo "Targethost not defined." >&4; croak=y ;; + *) echo "Using targethost $targethost." >&4 + esac + locincpth=' ' + loclibpth=' ' + case "$croak" in + y) echo "Cannot continue, aborting." >&4; exit 1 ;; + esac + case "$src" in + /*) run=$src/Cross/run + targetmkdir=$src/Cross/mkdir + to=$src/Cross/to + from=$src/Cross/from + ;; + *) pwd=`$test -f ../Configure & cd ..; pwd` + run=$pwd/Cross/run + targetmkdir=$pwd/Cross/mkdir + to=$pwd/Cross/to + from=$pwd/Cross/from + ;; + esac + case "$targetrun" in + '') targetrun=ssh ;; + esac + case "$targetto" in + '') targetto=scp ;; + esac + case "$targetfrom" in + '') targetfrom=scp ;; + esac + run=$run-$targetrun + to=$to-$targetto + from=$from-$targetfrom + case "$targetdir" in + '') + targetdir=/tmp + echo "Guessing targetdir $targetdir." >&4 + ;; + esac + case "$targetuser" in + '') + targetuser=root + echo "Guessing targetuser $targetuser." >&4 + ;; + esac + case "$targetfrom" in + scp) q=-q ;; + *) q='' ;; + esac + case "$targetrun" in + ssh|rsh) + $cat >$run <&4 + exit 1 + ;; + esac + case "$targetmkdir" in + */Cross/mkdir) + $cat >$targetmkdir <&4 + exit 1 + ;; + esac + case "$targetto" in + scp|rcp) + $cat >$to <$to <&4 + exit 1 + ;; + esac + case "$targetfrom" in + scp|rcp) + $cat >$from <$from <&4 + exit 1 + ;; + esac + if $test ! -f $run; then + echo "Target 'run' script '$run' not found." >&4 + else + $chmod a+rx $run + fi + if $test ! -f $to; then + echo "Target 'to' script '$to' not found." >&4 + else + $chmod a+rx $to + fi + if $test ! -f $from; then + echo "Target 'from' script '$from' not found." >&4 + else + $chmod a+rx $from + fi + if $test ! -f $run -o ! -f $to -o ! -f $from; then + exit 1 + fi + $cat >&4 <&4 + exit 1 +@end + ;; +esac + -- cgit v1.2.3 From 13158f86e3904284dce3dad36b64f07414459551 Mon Sep 17 00:00:00 2001 From: rmanfredi Date: Sat, 27 Nov 2010 11:55:39 +0000 Subject: Applied mega patch from Christian Biere to greatly improve feature detection and make a huge step towards better support for cross-compiling. git-svn-id: svn://svn.code.sf.net/p/dist/code/trunk/dist@34 2592e710-e01b-42a5-8df0-11608a6cc53d --- mcon/U/Cross.U | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'mcon/U/Cross.U') diff --git a/mcon/U/Cross.U b/mcon/U/Cross.U index feaef31..ba461df 100644 --- a/mcon/U/Cross.U +++ b/mcon/U/Cross.U @@ -83,6 +83,7 @@ ?LINT:extern loclibpth ?LINT:change locincpth ?LINT:change loclibpth +?LINT:extern TMPDIR : setup for possible cross-compilation run='' to=: @@ -196,7 +197,7 @@ $define|true|[yY]*) from=$from-$targetfrom case "$targetdir" in '') - targetdir=/tmp + targetdir="${TMPDIR:-/tmp}" echo "Guessing targetdir $targetdir." >&4 ;; esac -- cgit v1.2.3 From a48d4a094464be38b11b832a31394b240e88ea83 Mon Sep 17 00:00:00 2001 From: rmanfredi Date: Wed, 8 May 2013 17:58:00 +0000 Subject: Fixed spelling: Licence -> License. git-svn-id: svn://svn.code.sf.net/p/dist/code/trunk/dist@167 2592e710-e01b-42a5-8df0-11608a6cc53d --- mcon/U/Cross.U | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mcon/U/Cross.U') diff --git a/mcon/U/Cross.U b/mcon/U/Cross.U index ba461df..a54b091 100644 --- a/mcon/U/Cross.U +++ b/mcon/U/Cross.U @@ -2,10 +2,10 @@ ?RCS: ?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi ?RCS: -?RCS: You may redistribute only under the terms of the Artistic Licence, +?RCS: You may redistribute only under the terms of the Artistic License, ?RCS: as specified in the README file that comes with the distribution. ?RCS: You may reuse parts of this distribution only within the terms of -?RCS: that same Artistic Licence; a copy of which may be found at the root +?RCS: that same Artistic License; a copy of which may be found at the root ?RCS: of the source tree for dist 4.0. ?RCS: ?RCS: Copyright (c) 2001 Jarkko Hietaniemi -- cgit v1.2.3 From 77e4271ceb24212cfd025be9ce880bdeb5a14013 Mon Sep 17 00:00:00 2001 From: "H.Merijn Brand" Date: Sun, 22 May 2016 17:07:59 +0200 Subject: Remove trailing whitespace in meta-lines in units (#3) --- mcon/U/Cross.U | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mcon/U/Cross.U') diff --git a/mcon/U/Cross.U b/mcon/U/Cross.U index a54b091..7f1df8a 100644 --- a/mcon/U/Cross.U +++ b/mcon/U/Cross.U @@ -1,13 +1,13 @@ ?RCS: $Id$ ?RCS: ?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi -?RCS: +?RCS: ?RCS: You may redistribute only under the terms of the Artistic License, ?RCS: as specified in the README file that comes with the distribution. ?RCS: You may reuse parts of this distribution only within the terms of ?RCS: that same Artistic License; a copy of which may be found at the root ?RCS: of the source tree for dist 4.0. -?RCS: +?RCS: ?RCS: Copyright (c) 2001 Jarkko Hietaniemi ?RCS: ?MAKE:run to from targetarch usecrosscompile: src awk cat grep test rm \ -- cgit v1.2.3