Default conventions in Destdir:gnu make

Source: Internet
Author: User

In GNU make, there are many conventions, such as this destdir: a prefix variable used to add to the path of the file to be installed.

For example, we compile a third-party library locally, but need to package it for other people to use, on the one hand, if we install to the default directory, such as/usr, at this time, after the installation of a large number of files, the package is very difficult to find full; or we configure the--prefix, Or CMake when Cmake_install_prefix is specified, then the compilation dependencies within the PC file will go wrong and become the path we specified, which is inconvenient to use. At this point, Destdir will come in handy.

Destdir works only when make install, and it is not related to what tool the makefile is generated from, as follows:

Make install destdir=< $CUSTOM _prefix>

When you specify the path to install when configure or CMake, the files made install installed in this manner are all installed in a $custom_prefix-prefixed directory so that developers can publish and use the files in this directory directly by packaging them.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.