🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.mail.sendmail
1 messages
1 total messages Started by Robert Evans Fri, 29 Jul 1988 16:27
UkSendmail1.5 dom,chn Makefiles fall over on Ultrix
#2750
Author: 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
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