vis icon indicating copy to clipboard operation
vis copied to clipboard

make install: Copy from .CURDIR

Open falsifian opened this issue 4 months ago • 11 comments

Running make install on NetBSD currently gives

cp: vis: No such file or directory
cp: vis-menu: No such file or directory
cp: vis-digraph: No such file or directory
cp: vis-clipboard: No such file or directory
cp: vis-complete: No such file or directory
cp: vis-open: No such file or directory

(I configured with --path=$HOME/sw/vis in case that matters.)

Apparently this is because BSD make (at least on NetBSD and OpenBSD) runs commands from $.OBJDIR, which defaults to ./obj if it exists, otherwise the current working directly. I don't know why this ever worked.

~~NB: I have not successfully tested this results in a working vis installation. I can confirm that make install installs stuff, but vis currently just hangs on NetBSD and I don't currently have time to investigate why.~~ Edit: oops, it actually does work. I was just accidentally running the base system's vis filter instead of the editor.

falsifian avatar Sep 01 '25 18:09 falsifian

I should also mention I have not yet checked that make install is broken on OpenBSD, for example, or that this patch fixes it. But if I have time later I may do that.

falsifian avatar Sep 01 '25 18:09 falsifian

Edit: oops, it actually does work. I was just accidentally running the base system's vis filter instead of the editor.

So, should this be closed or not?

mcepl avatar Sep 16 '25 21:09 mcepl

Edit: oops, it actually does work. I was just accidentally running the base system's vis filter instead of the editor.

So, should this be closed or not?

No, it should not be. Sorry, my comment was remarking that vis worked after I installed it with this patch, contradicting the crossed-out text. It was only an aside, and the main point of this patch still stands. (I have been using vis built with this patch without trouble.)

falsifian avatar Sep 16 '25 21:09 falsifian

On Fri Nov 14, 2025 at 9:12 PM CET, James Cook wrote:

I would be happy to try updating this PR to do that, but first, do you have any other make implementations in mind?

Looking at https://github.com/martanne/vis/wiki/Distribution-Packages I think we are really talking about various Linuxes (which I suppose use all GNU Make), *BSD which use BSD Make, right? and Mac OS X with Homebrew (what do they use? Gemini told me that it is an ancient, and I mean ancient, from 2006, GNU Make, but Homebrew installs something more recent for its packages).

Matěj

-- http://matej.ceplovi.cz/blog/, @@.*** GPG Finger: 3C76 A027 CA45 AD70 98B5 BC1D 7920 5802 880B C9D8

No matter what happens in the kitchen, never apologize. -- Julia Child

mcepl avatar Nov 15 '25 21:11 mcepl

On Fri Nov 14, 2025 at 9:14 PM CET, James Cook wrote:

(For clarity: I mean ${.CURDIR} is set on {Open,Net,Free}BSD's makes. Also I think the bug will affect all three of those platforms, when using base system make instead of GNU make, but I haven't tried.)

Another thought which I have had on back burner for a long time … do we really need two Makefiles? Couldn’t we somehow join them together?

Best,

Matěj

-- http://matej.ceplovi.cz/blog/, @@.*** GPG Finger: 3C76 A027 CA45 AD70 98B5 BC1D 7920 5802 880B C9D8

Afraid to die alone? Become a bus driver. -- alleged easter egg in notepad++

mcepl avatar Nov 15 '25 21:11 mcepl

Also, what do you think about https://github.com/martanne/vis/pull/1270?

mcepl avatar Nov 28 '25 14:11 mcepl

Also, what do you think about #1270?

I don't know much about CMake or how vis's configure script currently works, but I'll note two things:

  • The current ./configure seems to work for me; this PR is just about a Makefile incompatibility.
  • vis currently builds just fine on NetBSD (probably other BSDs) if I simply make sure to use gmake (GNU make) instead of make (from the BSD base system). The purpose of this pull request is to try to get it working (again?) with {Open,Net,maybe other}BSD's native make tools.

falsifian avatar Nov 28 '25 15:11 falsifian

@mcepl I just realized GNUmakefile includes Makefile, so my change actually broke the build with GNU make.

I just pushed new changes tested with both GNU make and NetBSD's make. The assumption is anything that uses Makefile directly sets .CURDIR.

(Your suggestion to cd to $(.CURDIR) if set unfortunately doesn't work. I think the problem is each line of the build recipe is executed separately, and the effect of cd doesn't last from one to another. If you really want to go that way, we could add ; \ to the end of each shell command so the whole recipe gets executed as one big shell command.)

falsifian avatar Nov 28 '25 16:11 falsifian

Sorry, I just force pushed a correction. If you happened to be taking a look in the past few minutes, please update.

falsifian avatar Nov 28 '25 16:11 falsifian

On Fri Nov 28, 2025 at 4:44 PM CET, James Cook wrote:

falsifian left a comment (martanne/vis#1263)

Also, what do you think about #1270?

Ignore that reference, it was a moment of temporary insanity to even consider CMake. Of course, it is complete nonsense to even consider it (see my comments on #1270). If we want to ever move to anything more fancy (and I generally don’t), then we could think about mk-configure, but as long as we can live with nothing, I would stay with it.

mcepl avatar Nov 29 '25 20:11 mcepl

BTW @mcepl GitHub is showing "1 requested change" by you (see attached screenshot), but I don't know what it's talking about and can't see any proposed changes. If that's real then please help me find the change you're requesting. Sorry, I don't have a lot of experience with GitHub.

2025-11-30-014233_918x401_scrot

falsifian avatar Nov 30 '25 01:11 falsifian

I assume this is not a problem if obj doesn't exist? If that is the case this will be superseded by #1290 which will no longer generate temporary .o or .d files.

rnpnr avatar Dec 14 '25 15:12 rnpnr