Open Rhialto opened 3 years ago
The Makefile doesn't update submodules or check dependencies there, so the emulator will not be rebuilt automatically.
As for ndskdmp.tape. I don't think KLH10 has a way to mount a tape in a mode where it will use an existing file or else create one. Hmm, I suppose this could be worked around by having the expect script check the file leave off create
if necessary.
In general, the build system doesn't really support incremental builds. This could be improved somewhat, but for now the preferred way to rebuild is "make clean all ...".
Yes I forced some rebuilds myself, and started clean, and that worked at least. Stuff mostly works on NetBSD :) Although in tools/tapeutils I had to add a bit:
+ifeq ($(UNAME),NetBSD)
+ LIBS=-lcompat
+endif
After forcibly updating submodules (the text from make normally suggests that that is done, but apparently it indeed isn't), I'm trying my way through removing all of the tools and re-building them. Some of the ones using SDL don't find their headers (those that aren't simh in some form), and for tools/dasm/klfedr and other tools in that directory I get
gmake[1]: *** No rule to make target 'lodepng/lodepng.h', needed by 'lodepng.h'. Stop.
I guess it would be convenient to have a make target to remove and to rebuild KLH10 SIMH KA10 KL10 etc.
I also got surprised by this in the Makefile:
EMULATOR ?= pdp10-ka
which somehow doesn't mean you can just do gmake
rather than gmake EMULATOR=pdp10-ka
.
oh well, enough rambling for today :)
As you have seen, the Makefile is indeed messy and has some flaws. It only works reliably for a fresh clone. Any submodule updates has to be done manually. Really, using make here doesn't have many upsides. It could just as well be a script. But now we have it, and I'm not sure it's worth the effort to change. If you want to build ITS, it's assumed you can either
Lodepng is brought in when building a fresh clone. If that's not the case, use git submodule update --init --recursive. The recursive part handles submodules of submodules.
It was my intent that EMULATOR ?= pdp10-ka
would make this the default emulator for a plain make
. But somehow it doesn't work fully. Maybe because EMULATOR needs to be set in the environment as well as a make variable?
I had some old tree from a couple of years ago that I just updated, and I tried
gmake EMULATOR=klh10
. It ended like this:Also I noticed that the programs in
build/klh10
were not updated, even though they were quite oldOct 22 2017 kn10-ks-its
and the latest commit intools/klh10
was fromSat Sep 15 21:18:04 2018 +0200
and the latest source file inits/tools/klh10/src
was fromAug 8 2019 klh10.c
.