🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.mail.sendmail
Article #2750

UkSendmail1.5 dom,chn Makefiles fall over on Ultrix

#2750
From: Robert Evans
Date: Fri, 29 Jul 1988 16:27
72 lines
3441 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 $@ ] ; \
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.

I don't know if this applies to version of UN*X other than Ultrix.  I've
met this problem before when building software written for UNIX System V
on Ultrix.   Two replacement Makefiles follow:

--------- ./dom/Makefile ---- cut here
#########################################################################
#	UK-1.5(glasgow) Sendmail Configuration Package 			#
#	Author: Jem Taylor <taylor@uk.ac.glasgow.cs>			#
#	File: ./dom/Makefile						#
#	Role: generate dom/$site.dom from dom/$site.tab/*.dom files	#
#########################################################################

.SUFFIXES: .dom .tab
.PRECIOUS: *.dom

.tab.dom: $<.tab/*.dom Makefile
	-@if [ -s $@ ]; then rm -f $@.BCK && mv $@ $@.BCK; else :; fi
	./MAKE $* $</*.dom 
	-@if [ ! -s $@ ] ; \
		then	echo "$@ null - Abort" ;\
			if [ -s $@.BCK ] ; then mv $@.BCK $@ ; fi;\
			exit 99 ; else :; fi
	-@if cmp $@.BCK $@ > /dev/null 2>&1 ;\
		then	rm -f $@.BCK ; \
			echo "$@ not changed since last made." ; \
		else	echo "Saving old ../dom/$@ as ../dom/$@.OLD ..." ; \
			rm -f $@.OLD && mv $@.BCK $@.OLD ; fi
--------- ---- cut here
--------- ./chn/Makefile ---- cut here
#!/bin/make -f
#########################################################################
#	UK-1.5(glasgow) Sendmail Configuration Package 			#
#	Author: Jem Taylor <taylor@uk.ac.glasgow.cs>			#
#	File: ./chn/Makefile						#
#	Role: generate chn/$host.chn from chn/$host.tab/*.chn files	#
#########################################################################

.SUFFIXES: .chn .tab
.PRECIOUS: *.chn

.tab.chn: $</*.chn Makefile
	-@if [ -s $@ ]; then rm -f $@.BCK && mv $@ $@.BCK; else :; fi
	./MAKE $* $</*.chn 
	-@if [ ! -s $@ ] ; \
		then	echo "$@ null - Abort" ;\
			if [ -s $@.BCK ] ; then mv $@.BCK $@ ; fi;\
			exit 99 ; else :; fi
	-@if cmp $@.BCK $@ > /dev/null 2>&1 ;\
		then	rm -f $@.BCK ; \
			echo "$@ not changed since last made." ; \
		else	echo "Saving old ../chn/$@ as ../chn/$@.OLD ..." ; \
			rm -f $@.OLD && mv $@.BCK $@.OLD ; fi
--------- ---- cut here

-- 
-- 
  Robert Evans, Dept of Computing Maths, University College Cardiff,
  PO Box 916, Cardiff, Wales, UK, CF2 4YN.  Tel: +44 (0)222 874000 x 5518
  E-mail: R.Evans@computing-maths.cardiff.ac.uk     UUCP: R.Evans@cf-cm.UUCP
Technical Details
Message-ID: <20752.8807291627@uk.ac.cardiff.computing-maths.vax1>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!attcan!uunet!mcvax!ukc!strath-cs!glasgow!Robert

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!attcan!uunet!mcvax!ukc!strath-cs!glasgow!Robert
From: robert@vax1.computing-maths.cardiff.ac.uk (Robert Evans)
Newsgroups: comp.mail.sendmail,mail.uk-sendmail-workers
Subject: UkSendmail1.5 dom,chn Makefiles fall over on Ultrix
Message-ID: <20752.8807291627@uk.ac.cardiff.computing-maths.vax1>
Date: 29 Jul 88 16:27:50 GMT
Sender: daemon@cs.glasgow.ac.uk
Lines: 72
X-Mailer: Mail User's Shell (6.3 6/25/88)
X-mailer: mail gatewayed to news (mail-news 1.5a)