[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-AUCTeX] auctex build fixes for xemacs
From: |
David Kastrup |
Subject: |
Re: [Bug-AUCTeX] auctex build fixes for xemacs |
Date: |
Sun, 29 Jan 2006 18:56:21 +0100 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) |
Ralf Angeli <address@hidden> writes:
>> + test -r info/auctex.info
>> + echo info/auctex.info
>> + for i in auctex preview-latex
>> + test -r info/preview-latex.info
>> ghanima:/usr/local/lib/xemacs/xemacs-packages# echo $?
>> + echo 1
>> 1
>> ghanima:/usr/local/lib/xemacs/xemacs-packages#
>>
>> This is because the return code of "test" becomes the return code of
>> "for". My patch was of course to hackish. Better do:
>>
>> if test -r ...; then
>> echo ... > pkginfo;
>> fi
>>
>> "if" does not propagate the value of its conditional, in contrast to the
>> "conditional && then" construction.
A myth, unfortunately.
(info "(autoconf) Limitations of Builtins")
`if'
[...]
There are shells that do not reset the exit status from an `if':
$ if (exit 42); then true; fi; echo $?
42
whereas a proper shell should have printed `0'. This is especially
bad in Makefiles since it produces false failures. This is why
properly written Makefiles, such as Automake's, have such hairy
constructs:
if test -f "$file"; then
install "$file" "$dest"
else
:
fi
I don't remember off-bat what the test is supposed to do. Maybe the
right operation would be
test ! -r whatever || do something with whatever
> David can probably say more about why && is used instead of if..then
> in the case at hand.
if..then without else is not always good with regard to exit status.
It may be that the wrong replacement was used here.
--
David Kastrup, Kriemhildstr. 15, 44793 Bochum