🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.mail.sendmail
1 messages
1 total messages Started by Jem Taylor Fri, 29 Jul 1988 17:26
Re: UkSendmail1.5 dom,chn Makefiles fall over on Ultrix
#2751
Author: Jem Taylor
Date: Fri, 29 Jul 1988 17:26
28 lines
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
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads