makefile-targets.txt revision 3996
3996N/A
3996N/AThis is a guide to explain various useful targets in Userland component
3996N/AMakefiles. There is a set of targets that all Makefiles must include, plus
3996N/Asome addtional targets that are there for convenience.
3996N/A
3996N/Acomponent-environment-check::
3996N/A This target is an optional target that will be included in most Makefiles
3996N/A automatically. It is defined in $(WS_MAKE_RULES)/environment.mk which is
3996N/A included by $(WS_MAKE_RULES)/shares-macros.mk. It reports on some interesting
3996N/A information about the current environment and whether or not it is suitable
3996N/A to build, publish, or test the component.
3996N/A
3996N/Acomponent-environment-prep::
3996N/A This target is an optional target that will be included in most Makefiles
3996N/A automatically. It is defined in $(WS_MAKE_RULES)/environment.mk which is
3996N/A included by $(WS_MAKE_RULES)/shares-macros.mk. It uses the REQUIRE_PACKAGES
3996N/A macro contents to attempt to install any required packages in the current
3996N/A environment. It should never by used by developers to update any public
3996N/A build machines as those are managed by dedicated staff.
3996N/A
3996N/Adownload::
3996N/A This target must be present in all Makefiles. It can be used at the top level
3996N/A to act across all components, or on an individual component basis. It is
3996N/A typically defined by including $(WS_MAKE_RULES)/prep.mk in your component
3996N/A Makefile. This target depends on your component Makefile, so changes to your
3996N/A component Makefile will automatically trigger a re-download and subsequent
3996N/A build steps that depend on it. You can use the MAKEFILE_PREREQ macro to
3996N/A override this behaviour and avoid rebuilding with each Makefile change. This
3996N/A macro should only be used in the calling environment via something like:
3996N/A $ gmake MAKEFILE_PREREQ= install
3996N/A
3996N/Aprep::
3996N/A This target must be present in all Makefiles. It can be used at the top level
3996N/A to act across all components, or on an individual component basis. It is
3996N/A typically defined by including $(WS_MAKE_RULES)/prep.mk in your component
3996N/A Makefile. It depends on the previously described "download" target, as well
3996N/A as internal interum targets to unpack source archives and apply patches to
3996N/A the unpacked source.
3996N/A
3996N/Aconfigure:
3996N/A This target is an optional target that can be included in component Makefiles
3996N/A to run the community source configuration phase of a component build. It is
3996N/A typically defined in component Makefiles that make use of the
3996N/A $(WS_MAKE_RULES)/configure.mk Makefile fragment, but could be defined in
3996N/A others that include a source code configuration step. It is not explicitly
3996N/A called during the build, but provides a convenient means of downloading,
3996N/A unpacking, patching, and "configuring" component source for building without
3996N/A actually compiling the bits.
3996N/A
3996N/Abuild::
3996N/A This target must be present in all Makefiles. It can be used at the top level
3996N/A to act across all components, or on an individual component basis. It is
3996N/A defined in the individual component Makefiles, but most Makefile fragments
3996N/A under $(WS_MAKE_RULES) include targets that allow the definitions to depend
3996N/A on one of several convenience macros $(BUILD_32), $(BUILD_64),
3996N/A $(BUILD_32_and_64), and $(BUILD_NO_ARCH) to build 32-bit support, 64-bit
3996N/A support, both 32 and 64 bit support, or architecture neutral support. The
3996N/A macro used will depend on the component.
3996N/A
3996N/Ainstall::
3996N/A This target must be present in all Makefiles. It can be used at the top level
3996N/A to act across all components, or on an individual component basis. It is
3996N/A defined in the individual component Makefiles, but most Makefile fragments
3996N/A under $(WS_MAKE_RULES) include targets that allow the definitions to depend
3996N/A on one of several convenience macros $(INSTALL_32), $(INSTALL_64),
3996N/A $(INSTALL_32_and_64), and $(INSTALL_NO_ARCH) to install 32-bit support, 64-bit
3996N/A support, both 32 and 64 bit support, or architecture neutral support. The
3996N/A macro used will depend on the component and corresponds to the build target
3996N/A macro used.
3996N/A
3996N/Apkglint::
3996N/A This target is an optional target is automatically defined in each Makefile
3996N/A by the inclusion of $(WS_MAKE_RULES)/prep.mk. It will run the build steps
3996N/A necessary to pkglint the manifests for a component.
3996N/A
3996N/Apublish::
3996N/A This target must be present in all Makefiles. It can be used at the top level
3996N/A to act across all components, or on an individual component basis. It is
3996N/A often automatically defined by including $(WS_MAKE_RULES)/prep.mk. It depends
3996N/A on the previously described 'install' target and will perform a series of
3996N/A internal, intermediate steps to use the component package manifests to
3996N/A generate and publish packages for that component.
3996N/A
3996N/Aclean::
3996N/A This target must be present in all Makefiles. It can be used at the top level
3996N/A to act across all components, or on an individual component basis. It is
3996N/A often automatically defined by including one of the $(WS_MAKE_RULES)
3996N/A Makefile fragments. It cleans up any files created by building the component
3996N/A with the exception of any downloaded files.
3996N/A
3996N/Aclobber::
3996N/A This target must be present in all Makefiles. It can be used at the top level
3996N/A to act across all components, or on an individual component basis. It is
3996N/A often automatically defined by including one of the $(WS_MAKE_RULES)
3996N/A Makefile fragments. It depends on the previously described 'clean' target
3996N/A and additionally cleans up any downloaded source archives.
3996N/A
3996N/AREQUIRED_PACKAGES::
3996N/A This target is present in all component Makefiles. It is automatically
3996N/A defined by including $(WS_MAKE_RULES)/ips.mk. It is a convenience that can
3996N/A be used to generate the set of REQUIRED_PACKAGES that is needed by the
3996N/A 'pkgdepend resolve' portion of package generation and publication (publish
3996N/A target). It automatically appends to the component Makefile, but the results
3996N/A should be
3996N/A manually verified.