• Kir Kolyshkin's avatar
    Makefile.install: cure LIBDIR guessing logic · 5502b5b5
    Kir Kolyshkin authored
    Commit 6a51c7ec ("make: Allow to install in custom dirs") replaced
    all := assignments with ?=, effectively disabling the LIBDIR guessing
    logic (as once a variable is assigned, further ?= make no sense).
    
    That commit description says that setting PREFIX from make command line
    didn't work. I can't find the original bug report but according to
    GNU make documentation (see [1], [2]) as well as to my best knowledge,
    any variable set in Makefile can be overridden from the command line,
    unless "override VAR = value" is used in the Makefile.
    
    The result of this patch is LIBDIR is correctly set for distros such as
    Fedora and Debian, so "make install" works more correct. Surely, any
    variable can still be overriden from the command line.
    
    I have also checked the build of Fedora package from criu.spec with this
    change -- it works fine.
    
    Now, I am not sure why it was not working for the original bug reporter.
    The only hypothesis I have is he tried to do something like
    
    	PREFIX=/usr make
    
    instead of
    
    	make PREFIX=/usr
    
    If this was the case, it was not a bug but wrong usage.
    
    While at it, fix LIBDIR description in INSTALL.md.
    
    [1] https://www.gnu.org/software/make/manual/html_node/Overriding.html
    [2] https://www.gnu.org/software/make/manual/html_node/Override-Directive.html
    
    travis-ci: success for Makefile.install fixes
    Cc: Cyrill Gorcunov <gorcunov@openvz.org>
    Cc: Andrei Vagin <avagin@virtuozzo.com>
    Signed-off-by: 's avatarKir Kolyshkin <kir@openvz.org>
    Acked-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
    Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
    5502b5b5
Name
Last commit
Last update
Documentation Loading commit data...
contrib Loading commit data...
coredump Loading commit data...
crit Loading commit data...
criu Loading commit data...
images Loading commit data...
include/common Loading commit data...
lib Loading commit data...
scripts Loading commit data...
soccr Loading commit data...
test Loading commit data...
.gitignore Loading commit data...
.mailmap Loading commit data...
.travis.yml Loading commit data...
COPYING Loading commit data...
CREDITS Loading commit data...
INSTALL.md Loading commit data...
Makefile Loading commit data...
Makefile.config Loading commit data...
Makefile.install Loading commit data...
Makefile.versions Loading commit data...
README.md Loading commit data...