Closed rossburton closed 3 years ago
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 notifications@github.com 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 https://github.com/Linaro/OpenCSD/issues/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
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.