How to make a re-distributable release from source (make dist?)

I’d like to build on one computer and transport the result to another computer with the same architecture, OS, etc. (but which doesn’t have or need build tools installed). It looks like there are “make dist” targets to do this, but they are not working for me:

I had previously had done ‘mkdir build && cd build’ and ‘…/configure … && make’ using the 1.10.2 source

$ make dist
make dist-gzip am__post_remove_distdir=’@:’
make[1]: Entering directory ‘##.some path.##/hdf5-1.10.2/build’
make[1]: *** No rule to make target ‘bin/README’, needed by ‘distdir’. Stop.
make[1]: Leaving directory ‘##.some path.##/hdf5-1.10.2/build’
Makefile:851: recipe for target ‘dist’ failed
make: *** [dist] Error 2
$ make dist-zip
make: *** No rule to make target ‘bin/README’, needed by ‘distdir’. Stop.

IIUC after that’s done, I should use h5redeploy to set up the path correctly on the target system.

You can probably just do a make DESTDIR=somefolder install, and then tar that somefolder.