standardml / smackage

Smackage Package Manager for Standard ML

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Setting $SMACKAGE_HOME is broken.

cangiuli opened this issue · comments

After the b46b537 commit, an initial smackage install via make install attempts to install to $(DESTDIR)/bin/, where $(DESTDIR) is not set. Thus

  • The default install location is /bin, not ~/.smackage/bin as documented.
  • $SMACKAGE_HOME is ignored, contrary to the documentation. Changing the install location requires reading the Makefile to notice the DESTDIR variable.

At the least, the README should be updated to reflect reality. The default install should probably be moved back to ~/.smackage/bin instead of /bin.

When the makefile is invoked through smackage itself (smackage make smackage install), $DESTDIR is supposed to be set to $SMACKAGE_HOME. This indeed does something unpredictable when the smackage makefile is invoked directly with "make install" or "smackage exec smackage make install", but fixing this would mean at least fixing the other packages that depend on this behavior of smackage (which is not to say that's impossible, since that's like twelf, celf, and maybe one other thing I'm not an administrator of).

Yes, I think the DESTDIR business is okay, except that you need to be more friendly to the initial install, by (1) documenting it properly, and (2) fixing the default location. Maybe you can have a initial-install target in the Makefile?

Is it possible to disable a makefile command entirely if DESTDIR is not set? The README instructions for bootstrap installation will do the right thing ($SMACKAGE_HOME/bin not /bin), but nobody reads the directions of course nor should we expect this too.

I mean, the other thing is that we need to streamline this part a lot.

You could change the command to something like if [ ! -n "$(DESTDIR)" ] then ... fi (where I do not know shell so this may not be correct).

If bootstrap installation is the recommended path, then maybe you should add a special target in the smackage Makefile to do that, or at least put it much higher in the README.

Oh, now I see that I failed reading comprehension on the README, since it conspicuously doesn't recommend running make install manually. But still.

"nobody reads the directions of course nor should we expect them too"