Article View: comp.mail.sendmail
Article #2751Re: UkSendmail1.5 dom,chn Makefiles fall over on Ultrix
From: Jem Taylor
Date: Fri, 29 Jul 1988 17:26
Date: Fri, 29 Jul 1988 17:26
28 lines
1600 bytes
1600 bytes
The Makefiles in ./dom and ./chn in the UK Sendmail-1.5 distribution
fall over in certain circumstances under make on Ultrix.
Rules of the form:
-@if [ some test ]; then statement; fi
emit error code 1 (which is ignored by make) if sometest is false.
Without the "-", the error causes make to fail.
The second test in the Makefiles (for host.{chn,dom} being non-empty)
didn't have the "-" and so stopped the make. A solution is to put a "-"
at the front of the command:
-@if [ ! -s $@ ] ; \
But the intention *is* to stop the make if the generated file is null ...
are you saying the make stops when the file is non-null ? That is, when
the test fails ? This is really nasty !
To abort when the file is null, we need to invert the test.
Another improvement is to put a dummy "else" part into these if commands.
This stops the "Error code 1 (ignored)" message if `some test' is false.
Good idea.
I suggest the following fragment.
@if [ -s $@ ] ; \
then :; \
else echo "$@ null - Abort" ;\
if [ -s $@.BCK ] ; then mv $@.BCK $@ ; fi;\
exit 99 ; fi
Technical Details
Message-ID:
<3533.8807291726@tanna.cs.glasgow.ac.uk>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!attcan!uunet!mcvax!ukc!strath-cs!glasgow!JemShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!attcan!uunet!mcvax!ukc!strath-cs!glasgow!Jem From: taylor@cs.glasgow.ac.uk (Jem Taylor) Newsgroups: comp.mail.sendmail,mail.uk-sendmail-workers Subject: Re: UkSendmail1.5 dom,chn Makefiles fall over on Ultrix Message-ID: <3533.8807291726@tanna.cs.glasgow.ac.uk> Date: 29 Jul 88 17:26:57 GMT Sender: daemon@cs.glasgow.ac.uk Lines: 28 X-mailer: mail gatewayed to news (mail-news 1.5a)