solemnwarning / rehex

Reverse Engineers' Hex Editor
https://rehex.solemnwarning.net/
GNU General Public License v2.0
2.3k stars 113 forks source link

Remove -D from install commands #166

Closed clausecker closed 2 years ago

clausecker commented 2 years ago

The install target in the Makefile provided by this project uses the -D option which is specific to the GNU implementation of install. This causes the target to fail on other systems such as FreeBSD.

As the maintainer of the FreeBSD port for this package, I have thus added a patch to remove use of this option. The patch also adds the ability to select if the binaries should be stripped on installation by use of the STRIP macro (expands to -s if stripping is desired).

Please check if this patch can be incorporated into the project.

solemnwarning commented 2 years ago

Changing the install commands looks fine to me. Is the mkdir -p $(DESTDIR)$(libdir)/rehex/exe command necessary? The plugin makefiles already do mkdir+install like this, so I think it should work without?

Also is the $STRIP variable a BSD standard thing?

clausecker commented 2 years ago

I haven't checked if the $(DESTDIR)$(libdir)/rehex/exe directory really has to be created here. This command was present in an earlier version of the patch and I didn't try to remove it. You can remove it if you find it not to be needed. As for STRIP, this is not a standard thing. You can add

STRIP?=

to the Makefile so no stripping happens by default. The user can then install with stripping by invoking

make STRIP=-s install

I am open to other solutions.

solemnwarning commented 2 years ago

If the ports system lets you run any command to do the install like that, I'll probably add an install-strip target as per the GNU conventions: https://www.gnu.org/prep/standards/html_node/Standard-Targets.html

clausecker commented 2 years ago

That would work for me, too.

solemnwarning commented 2 years ago

Fixed on master