-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support DESTDIR in install targets #30
Comments
Hi Ross,
[added Coresight ML]
AFAIK we haven't had issues with packaging reported by Debian / RPM
packagers.
That said I have no objection to adding something like this. Are you
suggesting that in the makefile:
INSTALL_LIB_DIR=$(PREFIX)/$(LIB_PATH)
INSTALL_BIN_DIR=$(PREFIX)/bin
export INSTALL_INCLUDE_DIR=$(PREFIX)/include/
becomes
INSTALL_LIB_DIR=$(DESTDIR)$(PREFIX)/$(LIB_PATH)
INSTALL_BIN_DIR=$(DESTDIR)$(PREFIX)/bin
export INSTALL_INCLUDE_DIR=$(DESTDIR)$(PREFIX)/include/
?
If this works for you or you want to supply a patch that does, I can test
and providing no objections can include in next release. (probably next
week to collect up a number of minor outstanding issues)
Regards
Mike
…On Mon, 26 Oct 2020 at 09:10, Ross Burton ***@***.***> wrote:
The idiom for install rules (as per automake, cmake, meson, etc) is that
you can set PREFIX=/usr and DESTDIR=/my/build/tree, so that you can
install to /my/build/tree/usr/ for packaging.
OpenCSD doesn't support this and currently PREFIX has to be manually
extended with the DESTDIR. The moment the build wants to embed the prefix
into the binaries, this workaround will fail.
Simply adding $(DESTDIR) before the target paths in the install rule will
solve this.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#30>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADF7BM7IEV3ZTXYVXP7ZT4LSMU4I3ANCNFSM4S7DFCMA>
.
--
Mike Leach
Principal Engineer, ARM Ltd.
Manchester Design Centre. UK
|
The Debian packages also go through hoops to install, this line is working around the same issue: https://salsa.debian.org/wookey/libopencsd/-/blob/dgit/sid/debian/rules#L51 Yes, that change would be sufficient. |
Added to v0.14.4 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The idiom for install rules (as per automake, cmake, meson, etc) is that you can set
PREFIX=/usr
and DESTDIR=/my/build/tree
, so that you can install to/my/build/tree/usr/
for packaging.OpenCSD doesn't support this and currently
PREFIX
has to be manually extended with theDESTDIR
. The moment the build wants to embed the prefix into the binaries, this workaround will fail.Simply adding
$(DESTDIR)
before the target paths in theinstall
rule will solve this.The text was updated successfully, but these errors were encountered: