[comp.windows.x] V11R2 SunOS 3.4 installation failure

rbd@lamont.Columbia.edu (roger davis) (03/23/88)

I'm having a very fundamental (and probably stupid) problem
bringing up R2 on a Sun 3/180 running 3.4. The installation
crashes very early on. Following is the entire output
from 'make World':


cd ./util/imake; make clean; make
rm -f ccflags imake
rm -f *.CKP *.ln *.BAK *.bak *.o core errs ,* *~ *.a  tags TAGS make.log \#*
cc -o ccflags ccflags.c
cc -o imake imake.c `./ccflags`
mv Makefile Makefile.bak
make -f Makefile.bak Makefile
rm -f Makefile.bak; mv Makefile Makefile.bak
mv: Makefile: Cannot access: No such file or directory
*** Error code 1 (ignored)
./util/imake/imake -TImake.tmpl  -I./util/imake.includes  -s Makefile -DTOPDIR=.
make Makefiles
Making Makefiles in ./include...
rm -f ./include/Makefile.bak
mv ./include/Makefile ./include/Makefile.bak
mv: ./include/Makefile: Cannot access: No such file or directory
*** Error code 1 (ignored)
cd ./include; .././util/imake/imake -TImake.tmpl  -I.././util/imake.includes  -s Makefile -DTOPDIR=./..; \
make -b Makefiles
sh: ./include: bad directory
*** Error code 1

Stop.
*** Error code 1

Stop.
*** Error code 1

Stop.


I've done only minimal editing of Sun.macros (just setting DESTDIR to
an absolute pathname), but tried the original version of the file as
well, to no avail. I've seen several postings from other Sun sites
saying that installation went without a hitch, so I'm assuming that I
did something wrong. I picked the distribution up via ftp the day
that our site got the release announcement -- was there a problem with
imake or any makefiles that was fixed just after the announcement?

The top-level Makefile looks suspicious to me:

World::
	cd $(IMAKESRC); $(MAKE) clean; $(MAKE)
	-$(MV) Makefile Makefile.bak
	$(MAKE) -f Makefile.bak Makefile
	$(MAKE) Makefiles
	$(MAKE) clean
	$(MAKE) depend
	$(MAKE) $(WORLDOPTS)

...

Makefile:: $(IMAKE)

Makefile:: Imakefile \
	$(IRULESRC)/Imake.tmpl \
	$(IRULESRC)/Imake.rules \
	$(IRULESRC)/$(MACROFILE)
	-$(RM) Makefile.bak; $(MV) Makefile Makefile.bak
	$(IMAKE_CMD) -DTOPDIR=$(TOP)


When the 'make -f Makefile.bak Makefile' happens,
the '$(RM) Makefile.bak; $(MV) Makefile Makefile.bak' fails because
'-$(MV) Makefile Makefile.bak' has already been done. It goes downhill fast
from that point.

This was great fun to debug, considering that the
imake that's done immediately after the failed mv not only destroys the original
Makefile, thus covering its tracks, but also replaces it with an even
worse Makefile which contains no define for $(MV). Thus, any subsequent attempt
comes back with

cd ./util/imake; make clean; make
rm -f ccflags imake
rm -f *.CKP *.ln *.BAK *.bak *.o core errs ,* *~ *.a  tags TAGS make.log \#*
cc -o ccflags ccflags.c
cc -o imake imake.c `./ccflags`
 Makefile Makefile.bak
Make: Cannot load Makefile.  Stop.
Make: Cannot open Makefile.bak.  Stop.

and really leaves you scratching your head. What have I done wrong?