Alien-Build icon indicating copy to clipboard operation
Alien-Build copied to clipboard

DESTDIR in environment will be ignored if DESTDIR defined in Makefile

Open djerius opened this issue 1 year ago • 0 comments

Howdy,

The value of a Makefile variable is decided by whichever of these definitions comes first:

  1. on command line
  2. in Makefile
  3. in environment

Alien::Build uses approach 3 to define DESTDIR, but upstream packages can break this if they define DESTDIR in the Makefile (if only to define it as empty). For example, the CFITSIO library maintainers recently changed the Makefile to define DESTDIR as empty, which broke Alien::Build's installation to blib, as instead it installed it directly to the final destination.

I'm not sure why upstream CFITSIO made this change, but to be safe, Alien::Build should specify DESTDIR on the command line.

Cheers, Diab

djerius avatar Mar 04 '24 17:03 djerius