Makefile.package¶
The Makefile.package file is a Makefile that provides a handfull of targets
(recipes) for dealing with Conan packages in this repository. The provided
targets are documented in the file and in the help target, so you know
which targets we think you should know about and also what they do.
This is incidentally also good way to see which Conan commands we think
you should know about when going about interacting with Conan packages.
Note
The
Makefile.packagefile is designed in such a way that you can easily copy it to another repository.
Generally, you should not need to specify the Makefile itself when calling
make, so packages that make use of this Makefile should create a
Makefile file and then include Makefile.package like so:
include ../Makefile.package
Then in the directory with the Makefile, you can simply run make help and
you will see the help:
Usage: make [34mtarget[0m The following targets define common operations with this package in editable (local in-source) and uneditable (in the Conan cache) modes. Available targets: [34mhelp [0m show this help [2m[0m [34mstatus [0m show status of package [2m[0m [34minfo [0m show detailed package info [2m[0m [34msmoketest-deps [0m build smoketest dependencies for package [2m[0m [34msmoketest [0m run smoketests for package (requires built packages) [2m[0m [34mexport [0m export recipe and sources [2m[conan-cache][0m [34mdownload [0m download or create package [2m[conan-cache][0m [34mpackage [0m create package with build policy [2m[conan-cache][0m [34mpackage-all [0m create package and dependencies [2m[conan-cache][0m [34mpackage-outdated [0m create package if outdated [2m[conan-cache][0m [34mlist [0m list installed package files [2m[conan-cache][0m [34mpurge [0m remove package from cache [2m[conan-cache][0m [34meditable [0m instruct Conan to use in-source build [2m[0m [34muneditable [0m instruct Conan to use local cache [2m[0m [34mall [0m build the package [2m[in-source][0m [34mconfigure [0m install dependencies and configure package [2m[in-source][0m [34mtest [0m run CMake tests if they are available [2m[in-source][0m [34mexport-pkg [0m export build artifacts to Conan cache [2m[in-source][0m [34mclean [0m remove build directory [2m[in-source][0m Configuration: [32mLOCKFILE_SOURCE [0m=[2m [0m [32mSOURCE_DIR [0m=[2m .[0m [32mBUILD_DIR [0m=[2m build[0m [32mBUILD_POLICY [0m=[2m outdated[0m [32mBUILD_TYPE [0m=[2m [0m [32mCONAN_OPTIONS [0m=[2m [0m Package information: [32mPACKAGE_NAME [0m=[2m fable[0m [32mPACKAGE_VERSION [0m=[2m 0.23.0-dirty[0m [32mPACKAGE_CHANNEL [0m=[2m cloe/develop[0m [32mPACKAGE_FQN [0m=[2m fable/0.23.0-dirty@cloe/develop[0m [32mPACKAGE_EDITABLE[0m=[2m not-editable[0m [32mPACKAGE_ID [0m=[2m [0m [32mPACKAGE_DIR [0m=[2m [0m [32mPACKAGE_DATE [0m=[2m [0m [32mGIT_COMMIT_HASH [0m=[2m 27dbc38[0mTodo
This file is a work-in-progress and will be extended as we find time.
status¶
The status target prints information about Conan’s view of the current
package. This is specific to the package name, version, user, channel, and
profile, such as settings and package options, as well as resolved
dependencies. For this reason, it is recommended to use the LOCKFILE_SOURCE
option where reasonable, since you otherwise may receive incorrect answers.
Note
This is a somewhat more involved target, since it by-passes Conan to provide some of the more valuable information. Normally, we try not to do this much “work” in Makefiles, but this target is used often enough to warrant it.
The following descriptive words are used, prepended to the name of the package in question:
- ok
Package is built and up-to-date.
- outdated
Package is not available or source is newer.
- editable
Package is editable.
- editable-other-name
Package path is editable, but by another name. This can happen when you set editable and then change the version of the package by either setting VERSION or by checking out another state of the code.
- editable-elsewhere
Package is editable, but from a different location. This can happen when you have multiple clones of the repository at different locations.