#! /usr/bin/perl
# Build Emacs with various options for profiling, debugging,
# with and without warnings enabled etc.
# Copyright (C) 2001-2011 Free Software Foundation, Inc.
# This file is part of GNU Emacs.
# GNU Emacs 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 3 of the License, or
# (at your option) any later version.
# GNU Emacs 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 GNU Emacs. If not, see .
require 5;
use Getopt::Long;
use File::Basename;
use Cwd;
# Default CVS sandbox directory. Only used when called from outside
# of the sandbox.
$root = $ENV{"EMACS_ROOT"};
$root = "/gd/gnu/emacs" unless $root;
# Default make command.
$make = $ENV{"EMACS_MAKE"};
$make = "gmake" unless $make;
$rc = GetOptions ("help" => \$help,
"enable-checking" => \$enable_checking,
"no-warn" => \$no_warn,
"check-marked" => \$check_marked,
"all" => \$all,
"no-optim" => \$no_optim,
"union-type" => \$union_type,
"gprof" => \$profile,
"malloc-check" => \$malloc_check,
"no-mcheck" => \$no_mcheck,
"alias" => \$aliasing,
"boot" => \$boot,
"wall" => \$wall,
"gcc3" => \$gcc3,
"trace-selection" => \$trace_selection,
"trace-move" => \$trace_move,
"stabs" => \$use_stabs,
"optim" => \$optim);
if ($rc == 0 || $help)
{
print <