[comp.os.vms] Modified version of COMPILE.COM for GNU EMACS

carl@CITHEX.CALTECH.EDU (Carl J Lydick) (11/12/87)

As anybody out there who has tried to install GNU EMACS v 18.48 using the
VAXC compiler version 2.3-024 knows, the file LREAD.C blows said C compiler
out of the water.  The problem is somewhere in the optimizer.  The following
modified version of the command procedure to compile the source modules
checks for a failure of the compiler and retries with the /NOOPT modifier.
By the way, I haven't yet found an electronic mailing address for the Free
Software Foundation in the distribution (it may be there; I just haven't
found it), so if some kind soul would forward this to them, I'd appreciate
it.  Thanks.
------------------------------------Cut Here------------------------------------
$ set noverify
$ ! VMS command file to recompile all .C files which need recompilation.
$ ! These are all .C files that have no .OBJ files or that are newer
$ ! than the corresponding .OBJ files.  This file is self contained
$ ! and does not require you to do anything before running it.
$ !***
$ !***  Mukesh Prasad		compile.com	Nov. 18, 1985
$ !***
$ !***	Compile all .C files in the directory 'sourcedir'.
$ !***  If an argument is present, compiles all files, otherwise
$ !***  compiles only files modified since last compile.
$ !***
$ !%%%  Modified by Carl J Lydick (CARL@CITHEX.CALTECH.EDU) Nov. 11 1987
$ !%%%  If the default C compiler fails, now tries using the VAXC compiler
$ !%%%  with the /NOOPT modifier.
$
$    @precomp
$    call comp dispnew.c
$    call comp scroll.c
$    call comp xdisp.c
$    call comp window.c
$    call comp term.c
$    call comp cm.c
$    call comp emacs.c
$    call comp keyboard.c
$    call comp macros.c
$    call comp keymap.c
$    call comp sysdep.c
$    call comp buffer.c
$    call comp filelock.c
$    call comp insdel.c
$    call comp marker.c
$    call comp minibuf.c
$    call comp fileio.c
$    call comp dired.c
$    call comp filemode.c
$    call comp cmds.c
$    call comp casefiddle.c
$    call comp indent.c
$    call comp search.c
$    call comp regex.c
$    call comp undo.c
$    call comp alloc.c
$    call comp data.c
$    call comp doc.c
$    call comp editfns.c
$    call comp callint.c
$    call comp eval.c
$    call comp fns.c
$    call comp print.c
$    call comp lread.c
$    call comp abbrev.c
$    call comp syntax.c
$    call comp mocklisp.c
$    call comp bytecode.c
$    call comp process.c
$    call comp callproc.c
$    call comp vmsfns.c
$    call comp doprnt.c
$    call comp vmsmap.c
$    call comp termcap.c
$    call comp tparam.c
$    call comp lastfile.c
$    call comp malloc.c
$    call comp alloca.c
$    exit
$ comp:    subroutine    ! invoke cc/noopt if the cc command in recomp fails
$    on severe_error then goto noopt
$    @recomp 'p1'
$    exit
$ noopt:
$   write sys$output "Compiling ",p1," without optimizer."
$   set noon
$   oldcc = "''cc'"
$   cc := cc/noopt
$   @recomp 'p1'
$   status = $status
$   delete/symbol cc
$   if oldcc .nes. "" then cc = oldcc
$   exit 'status'