[comp.sources.d] Problem with empire 1.1

tsf@drutx.UUCP (FisherTS) (04/19/87)

In article <2353@cit-vax> sns@tybalt (Samuel N. Southard) writes:

>Everytime war, alliance, or neutrality is declared with respect to a given
>country, it also affects the country that is 7 away.  For example, if I were to
>declare an alliance with country 8, then when I did a 'nation' I would also be
>shown as allied with country 15.  However, the newspaper would only declare my

In my version here, 0 and 7 are associated, 8 and 15, 16 and 23, 24 and 31.
Declarations with one are automatically made with the other.

The problem is in EMPSUBS/getrel.c.  In the line that calculates the
value for "shift", the expression, (c2 % 7) should be (c2 % 8).  Just
change the 7 to a 8 in both routines (getrel() and putrel()) and the
problem should be solved.

johne@crash.CTS.COM (John Cissna) (04/20/87)

I am having problems Making the empire 1.1.  For some reason it doesn't
like the way the Makefiles handled the archive loading in the EMPSUBS
and COMMANDS directories.  Can someone out there help me?


-- 
John Cissna		(The master of all he can see. (I wish!!!))

	INET:  johne@crash.CTS.COM
	UUCP:  {hplabs!hp-sdd,nosc,akgua,sdcsvax}!crash!johne

abc@mcnc.UUCP (Alan B. Clegg) (04/21/87)

In article <1029@crash.CTS.COM> johne@crash.CTS.COM (John Cissna) writes:
>
>I am having problems Making the empire 1.1.  For some reason it doesn't
>like the way the Makefiles handled the archive loading in the EMPSUBS
>and COMMANDS directories.  Can someone out there help me?

This is common of all the directories.  You have to check that there are
TABS infront of the thingies in the makefiles instead of spaces...

-abc

PS.  When I get the patches to update 1.1 to 1.2 and prove that they work,
     I will put them on anonymous FTP at ncsuvx.ncsu.edu...

ejb@think.uucp (Erik Bailey) (04/22/87)

In article <491@speedy.mcnc.UUCP> abc@speedy.UUCP (Alan B. Clegg) writes:
>In article <1029@crash.CTS.COM> johne@crash.CTS.COM (John Cissna) writes:
>>
>>I am having problems Making the empire 1.1.  For some reason it doesn't
>>like the way the Makefiles handled the archive loading in the EMPSUBS
>>and COMMANDS directories.  Can someone out there help me?
>
>This is common of all the directories.  You have to check that there are
>TABS infront of the thingies in the makefiles instead of spaces...
>

If you are on a 4.[23] machine (as I am), you'll continue to have problems.
I got so pissed off at the makefiles that I just compiled it manually.
Just do a "cc -c *" (or whatever the command was), then do the "ar" command,
then do a "ranlib" (is that right)?

Can anyone more knowledgeable than I make a new set of makefiles
that actually work under BSD? It's kinda stupid to do it by hand...
--Erik

Erik Bailey         -- 7 Oak Knoll                (USENET courtesy of
ihnp4!think!ejb        Arlington, MA  02174       Thinking Machines Corp.,
ejb@think.com          (617) 643-0732             Cambridge, MA)

mjranum@gouldsd.UUCP (04/22/87)

> Can anyone more knowledgeable than I make a new set of makefiles
> that actually work under BSD? It's kinda stupid to do it by hand...
> --Erik

	The problem with the makefiles was that the explicit pathnames ../../[blah]
were used instead of the $(LIB) expansions.
here are mine for the top level, commands and empsubs:

	If you do a diff on yours and this one, you'll see what I changed and
that may help. If that doesn't, do a 'make -p' and it will expand all the
pathnames for you. RTFM. make(1).
----------------------------cut here-------------------------
:
#the following files are in this bundle: (Use them wisely)
# Makefile.commands Makefile.empsubs Makefile.toplevel
# To unbundle - sh this file
echo unbundling: Makefile.commands Makefile.empsubs Makefile.toplevel
echo unbundling Makefile.commands
if [ -f Makefile.commands ] ; then
	echo cannot unbundle Makefile.commands - file exists already
	exit 1
fi
cat >Makefile.commands <<'End of Makefile.commands'
CFLAGS=-c
HDRDIR=../hdrs
INSDIR=../_unix.O
LIB=$(INSDIR)/empcom.a
LIBSRC= \
	acce.c \
	add.c \
	assa.c \
	atta.c \
	boar.c \
	buil.c \
	cens.c \
	chan.c \
	chec.c \
	coll.c \
	cont.c \
	coun.c \
	decl.c \
	defe.c \
	deli.c \
	desi.c \
	diss.c \
	enli.c \
	fire.c \
	flee.c \
	fly.c \
	fore.c \
	gran.c \
	info1.c \
	info2.c \
	ledg.c \
	lend.c \
	load.c \
	look.c \
	map.c \
	mine.c \
	move.c \
	nati.c \
	navi.c \
	news.c \
	offe.c \
	powe.c \
	rada.c \
	rea.c \
	real.c \
	repa.c \
	rout.c \
	set.c \
	shi.c \
	spy.c \
	tele.c \
	tend.c \
	torp.c \
	trad.c \
	trea.c \
	turn.c \
	upda.c \
	vers.c \
	vote.c \
	weat.c

$(LIB)::	$(HDRDIR)/empdef.h
	@touch *.c;	# header change implies source change

$(LIB)::	$(LIBSRC)
	$(CC) $(CFLAGS) -I$(HDRDIR) $?
	@ar r $(LIB) *.o
	@ranlib $(LIB);		# 4.2 archive needs table of contents
	@echo $(LIB) is now up to date

clobber:

.PRECIOUS:	$(LIB)
End of Makefile.commands
echo done unbundling Makefile.commands
echo unbundling Makefile.empsubs
if [ -f Makefile.empsubs ] ; then
	echo cannot unbundle Makefile.empsubs - file exists already
	exit 1
fi
cat >Makefile.empsubs <<'End of Makefile.empsubs'
CFLAGS=-c
HDRDIR=../hdrs
INSDIR=../_unix.O
LIB=$(INSDIR)/empsub.a
LIBSRC= \
	atoip.c \
	atopi.c \
	chkok.c \
	cleared.c \
	cname.c \
	cnumb.c \
	copy.c \
	damage.c \
	erlog.c \
	getbit.c \
	getele.c \
	getloan.c \
	getlogn.c \
	getmysect.c \
	getmyship.c \
	getnat.c \
	getrel.c \
	getsect.c \
	getship.c \
	getshno.c \
	getsno.c \
	getstar.c \
	getstri.c \
	gettre.c \
	idist.c \
	landgun.c \
	landorsea.c \
	mailbox.c \
	max127.c \
	mtch.c \
	myeuid.c \
	myruid.c \
	natarg.c \
	neigh.c \
	nreport.c \
	nxtsct.c \
	nxtshp.c \
	onearg.c \
	plur.c \
	pr.c \
	prdate.c \
	prmptrd.c \
	pslsin.c \
	resetuid.c \
	round.c \
	same.c \
	sargs.c \
	sigsave.c \
	sread.c \
	tfact.c \
	trechk.c \
	ttyn.c \
	update.c \
	wethr.c \
	wu.c \
	xwrap.c \
	xytoa.c
HDRDEP= \
	chkok.c \
	cleared.c \
	cname.c \
	cnumb.c \
	damage.c \
	erlog.c \
	getele.c \
	getloan.c \
	getmysect.c \
	getmyship.c \
	getnat.c \
	getrel.c \
	getsect.c \
	getship.c \
	getsno.c \
	gettre.c \
	landgun.c \
	landorsea.c \
	mailbox.c \
	mtch.c \
	natarg.c \
	neigh.c \
	nreport.c \
	nxtsct.c \
	nxtshp.c \
	pr.c \
	prdate.c \
	sargs.c \
	sread.c \
	tfact.c \
	trechk.c \
	update.c \
	wethr.c \
	wu.c

$(LIB)::	$(HDRDIR)/empdef.h
	@touch $(HDRDEP);	# header change implies source change

$(LIB)::	$(LIBSRC)
	$(CC) $(CFLAGS) -I$(HDRDIR) $?
	@ar r $(LIB) *.o
	@ranlib $(LIB);		# 4.2 archive needs table of contents
	@echo $(LIB) is now up to date

clobber:
	rm -f $(LIB)

.PRECIOUS:	$(LIB)
End of Makefile.empsubs
echo done unbundling Makefile.empsubs
echo unbundling Makefile.toplevel
if [ -f Makefile.toplevel ] ; then
	echo cannot unbundle Makefile.toplevel - file exists already
	exit 1
fi
cat >Makefile.toplevel <<'End of Makefile.toplevel'
MAKE=make
LIBDIR=./_unix.O
BINDIR=./BIN
EMPGLB=$(LIBDIR)/empglb.o
EMPDIS=$(LIBDIR)/empdis.o
EMPSUB=$(LIBDIR)/empsub.a
EMPCOM=$(LIBDIR)/empcom.a
EMPS=\
	$(BINDIR)/emp1 \
	$(BINDIR)/emp2 \
	$(BINDIR)/emp3 \
	$(BINDIR)/emp4 \
	$(BINDIR)/emp5 \
	$(BINDIR)/emp7 \
	empn

all:	$(LIBDIR) $(BINDIR) $(EMPGLB) $(EMPDIS) $(EMPSUB) $(EMPCOM) \
	empire empcre \
	$(BINDIR)/empfix empn
	@echo All done!

$(EMPGLB):	FRC
	@echo EMPGLB:
	@cd EMPGLB; $(MAKE)

empglb.o:	$(EMPGLB)

$(EMPDIS):	FRC
	@echo EMPDIS:
	@cd EMPDIS; $(MAKE)

empdis.o:	$(EMPDIS)

$(EMPSUB):	FRC
	@echo EMPSUBS:
	@cd EMPSUBS; $(MAKE)

empsub.a:	$(EMPSUB)

$(EMPCOM):	FRC
	@echo COMMANDS:
	@cd COMMANDS; $(MAKE)

empcom.a:	$(EMPCOM)

empire:		FRC
	@echo EMPIRE:
	@cd EMPIRE; $(MAKE)

empcre:		FRC
	@echo EMPCRE:
	@cd EMPCRE; $(MAKE)

$(BINDIR)/empfix:	empfix

empfix:		FRC
	@echo EMPFIX:
	@cd EMPFIX; $(MAKE)

$(EMPS):	FRC
	@echo EMPN: $@;		# 4.2 change $(@F) to $@
	@cd EMPN; $(MAKE) $@;	# 4.2 change $(@F) to $@

emp1:	$(BINDIR)/emp1

emp2:	$(BINDIR)/emp2

emp3:	$(BINDIR)/emp3

emp4:	$(BINDIR)/emp4

emp5:	$(BINDIR)/emp5

emp7:	$(BINDIR)/emp7

FRC:

$(LIBDIR): $(LIBDIR)
	mkdir $(LIBDIR)

$(BINDIR): $(BINDIR)
	mkdir $(BINDIR)
End of Makefile.toplevel
echo done unbundling Makefile.toplevel
# end of the bundle !!
-- 
Copyright, 1987 -  Anarchist Software Foundation - ALL RIGHTS RESERVED
In reproducing this document in any form, the licensee (you) agrees to
pay the ASF  5$/copy distributed,  and to admit that software law is a
subject better left for lawyers and slimy nerds.    Live Free or die !