Don't assume runtest is executable in the source tree

Alexandre Oliva aoliva@redhat.com
Sat Jul 1 14:43:00 GMT 2000


On Jun 30, 2000, Stan Shebs <shebs@apple.com> wrote:

> Alexandre Oliva wrote:
>> 
>> Due to disk space shortage, I had to temporarily store my GCC and
>> Sourceware checked-out trees in a FAT file system mounted on
>> GNU/Linux.  Needless to say, all executable bits were lost.  This has
>> forced me to remove the assumption that runtest is executable in the
>> source tree.  Ok to install?

> This doesn't seem like a great idea actually, because a) the problem
> is a one-time one-person problem that is presumably temporary, and b)
> more importantly, you're assuming that runtest is a shell script,
> which may happen to be true now, but is not always guaranteed to be so.

Running scripts without specifying the shell is generally regarded as
a bug, because there are still some stupid systems out there that
either can't run shell scripts as such or pick the wrong shell when
doing so.  Therefore, explicitly specifying the shell is always The
Right Thing (TM) to do.

If runtest ever stops being a shell script, it will certainly stop
living in the source tree, so Makefiles will have to be changed
anyway.  If it becomes a binary program, it will have be to be built,
thus it will live in the build tree.  If it becomes a script in
another language, such as perl, the full pathname of perl will have to
be added to the script, and, since this is a build-system property, it
will have to be auto-detected, and the system-specific runtest script
will be generated in the build tree.

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                  aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist    *Please* write to mailing lists, not to me



More information about the Gcc-patches mailing list