#! /usr/bin/perl # # dpkg-architecture # # Copyright 1999 Marcus Brinkmann # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # History # 0.0.1 Initial release. # 0.0.2 Don't use dpkg to get default gnu system, so the default is # correct even on non-linux system. # Warn if the host gnu system does not match the gcc system. # Determine default from gcc if possible, else fall back to native # compilation. # Do not set environment variables which are already defined unless # force flag is given. # 1.0.0 Changed target to host, because this complies with GNU # nomenclature. # Added command facility. # 1.0.1 Moved to GNU nomenclature arch->cpu, system->type, os->system # 1.0.2 Add facility to query single values, suggested by Richard Braakman. # 1.0.3 Make it work with egcs, too. # 1.0.4 Suppress single "export" with "-s" when all env variables are already set # 1.0.5 Update default for rules files (i386->i486). # Print out overridden values, so make gets them, too. # 1.0.6 Revert to i386 to comply with policy § 5.1. # 1.0.7 -q should not imply -f, because this prevents setting # make variables with non-standard names correctly. $version="1.0.0"; $0 = `basename $0`; chomp $0; $dpkglibdir="/usr/lib/dpkg"; push(@INC,$dpkglibdir); require 'controllib.pl'; %archtable=('i386', 'i386-linux', 'sparc', 'sparc-linux', 'sparc64', 'sparc64-linux', 'alpha', 'alpha-linux', 'm68k', 'm68k-linux', 'arm', 'arm-linux', 'powerpc', 'powerpc-linux', 'mips', 'mips-linux', 'mipsel', 'mipsel-linux', 'hurd-i386', 'i386-gnu'); sub usageversion { print STDERR "Debian GNU/Linux $0 $version. Copyright (C) 1999 Marcus Brinkmann. This is free software; see the GNU General Public Licence version 2 or later for copying conditions. There is NO warranty. Usage: $0 [