diff options
| author | Gerd Moellmann | 2001-10-19 11:31:22 +0000 |
|---|---|---|
| committer | Gerd Moellmann | 2001-10-19 11:31:22 +0000 |
| commit | 53e7bbb89f7ad9b07b281f2fe826167779863ade (patch) | |
| tree | a69df901995c1da7133f55ff882183fbe862b53a /admin | |
| parent | c4e7e308b3e3b4f1911089b11a47d47b6198fec2 (diff) | |
| download | emacs-53e7bbb89f7ad9b07b281f2fe826167779863ade.tar.gz emacs-53e7bbb89f7ad9b07b281f2fe826167779863ade.zip | |
Add --help option. Add support for building
in arbitrary source trees.
Diffstat (limited to 'admin')
| -rwxr-xr-x | admin/build-configs | 31 |
1 files changed, 30 insertions, 1 deletions
diff --git a/admin/build-configs b/admin/build-configs index 521afb3acff..5827276bf5e 100755 --- a/admin/build-configs +++ b/admin/build-configs | |||
| @@ -21,6 +21,11 @@ | |||
| 21 | 21 | ||
| 22 | # Build Emacs in several different configurations. | 22 | # Build Emacs in several different configurations. |
| 23 | 23 | ||
| 24 | require 5; | ||
| 25 | use Getopt::Long; | ||
| 26 | use File::Basename; | ||
| 27 | use Cwd; | ||
| 28 | |||
| 24 | @configs = | 29 | @configs = |
| 25 | ( | 30 | ( |
| 26 | ["--without-x", "--optim"], | 31 | ["--without-x", "--optim"], |
| @@ -39,7 +44,31 @@ unlink $log; | |||
| 39 | 44 | ||
| 40 | $root = $ENV{"EMACS_ROOT"}; | 45 | $root = $ENV{"EMACS_ROOT"}; |
| 41 | $root = "/gd/gnu/emacs" unless $root; | 46 | $root = "/gd/gnu/emacs" unless $root; |
| 42 | chdir ($root) or die "Cannot chdir to emacs"; | 47 | |
| 48 | $rc = GetOptions ("help" => \$help); | ||
| 49 | if ($rc == 0 || $help) | ||
| 50 | { | ||
| 51 | print <<USAGE; | ||
| 52 | build-configs | ||
| 53 | |||
| 54 | Build Emacs in different configurations. | ||
| 55 | |||
| 56 | --help show this help | ||
| 57 | |||
| 58 | USAGE | ||
| 59 | exit 1; | ||
| 60 | } | ||
| 61 | |||
| 62 | # Chdir to the top-level directory of the tree. If not in a tree | ||
| 63 | # containing Emacs, use the default. | ||
| 64 | |||
| 65 | while (! -f "src/emacs.c" && cwd () ne "/") | ||
| 66 | { | ||
| 67 | chdir ".."; | ||
| 68 | } | ||
| 69 | |||
| 70 | chdir $root if cwd () eq "/"; | ||
| 71 | print "Build in ", cwd (), "\n"; | ||
| 43 | 72 | ||
| 44 | foreach $config (@configs) | 73 | foreach $config (@configs) |
| 45 | { | 74 | { |