What is the proper way to pass $CC and others to the build?
Hi. I'm looking to make some of my packages cross-buildable. Just looked
at this one:
https://salsa.debian.org/science-team/vnlog/
I'm upstream also. This uses a simple GNU-Make-based build system that
isn't a common one in the Debian archive. In any case, passing the
correct $CC, $CXX variables in the environment is enough to get it to do
the right thing.
There's a wiki page:
https://wiki.debian.org/CrossBuildPackagingGuidelines
It says that all I need to do is to
include /usr/share/dpkg/buildtools.mk
at the top of the debian/rules. This turned out to not be enough,
however: I also needed to DPKG_EXPORT_BUILDTOOLS:=1 in order to export
the build variables in the environment. After doing that, it works.
Questions:
- Is this the right way to do it?
- Should the wiki page be updated?
- Should it ALWAYS export the variables?
- Should debian/rules ALWAYS use that include implicitly?
Thanks!
Reply to: