python36: add libressl patch
[unleashed-userland.git] / doc / makefile-targets.txt
bloba0f2cb950a9749d4015942aeddb147a2f10b565f
1 This is a guide to explain various useful targets in Userland component
2 Makefiles.  There is a set of targets that all Makefiles must include, plus
3 some addtional targets that are there for convenience.
5 component-environment-check::
6   This target is an optional target that will be included in most Makefiles
7   automatically.  It is defined in $(WS_MAKE_RULES)/environment.mk which is
8   included by $(WS_MAKE_RULES)/shares-macros.mk.  It reports on some interesting
9   information about the current environment and whether or not it is suitable
10   to build, publish, or test the component.
12 component-environment-prep::
13   This target is an optional target that will be included in most Makefiles
14   automatically.  It is defined in $(WS_MAKE_RULES)/environment.mk which is
15   included by $(WS_MAKE_RULES)/shares-macros.mk.  It uses the REQUIRE_PACKAGES
16   macro contents to attempt to install any required packages in the current
17   environment.  It should never by used by developers to update any public
18   build machines as those are managed by dedicated staff. To use this target
19   user has to be assigned "Software Installation" or "Primary Administrator"
20   profile.
22 download::
23   This target is present in all Makefiles.  It can be used at the top level
24   to act across all components, or on an individual component basis.  It is
25   typically defined by including $(WS_MAKE_RULES)/prep.mk in your component
26   Makefile.  This target depends on your component Makefile, so changes to your
27   component Makefile will automatically trigger a re-download and subsequent
28   build steps that depend on it.  You can use the MAKEFILE_PREREQ macro to
29   override this behaviour and avoid rebuilding with each Makefile change.  This
30   macro should only be used in the calling environment via something like:
31     $ gmake MAKEFILE_PREREQ= install
33 unpack::
34   This target is present in all Makefiles.  It can be used at the top level
35   to act across all components, or on an individual component basis.  It is
36   typically defined by including $(WS_MAKE_RULES)/prep.mk in your component
37   Makefile.  This target depends on the previously described "download" target,
38   This target will unpack any downloaded source archives.  It is an interim
39   step in the source code preparation phase of the build.
41 patch::
42   This target is present in all Makefiles.  It can be used at the top level
43   to act across all components, or on an individual component basis.  It is
44   typically defined by including $(WS_MAKE_RULES)/prep.mk in your component
45   Makefile.  This target depends on the previously described "unpack" target,
46   This target will patch any unpacked source.  It is an interim step in the
47   source code preparation phase of the build.
49 prep::
50   This target is present in all Makefiles.  It can be used at the top level
51   to act across all components, or on an individual component basis.  It is 
52   typically defined by including $(WS_MAKE_RULES)/prep.mk in your component
53   Makefile.  It depends on the previously described "download" target, as well
54   as internal interim targets to unpack source archives and apply patches to
55   the unpacked source.
57 build::
58   This target must be present in all Makefiles.  It can be used at the top level
59   to act across all components, or on an individual component basis.  It is
60   defined in the individual component Makefiles, but most Makefile fragments
61   under $(WS_MAKE_RULES) include targets that allow the definitions to depend
62   on one of several convenience macros $(BUILD_32), $(BUILD_64),
63   $(BUILD_32_and_64), and $(BUILD_NO_ARCH) to build 32-bit support, 64-bit
64   support, both 32 and 64 bit support, or architecture neutral support.  The
65   macro used will depend on the component.
67 install::
68   This target must be present in all Makefiles.  It can be used at the top level
69   to act across all components, or on an individual component basis.  It is
70   defined in the individual component Makefiles, but most Makefile fragments
71   under $(WS_MAKE_RULES) include targets that allow the definitions to depend
72   on one of several convenience macros $(INSTALL_32), $(INSTALL_64),
73   $(INSTALL_32_and_64), and $(INSTALL_NO_ARCH) to install 32-bit support, 64-bit
74   support, both 32 and 64 bit support, or architecture neutral support.  The
75   macro used will depend on the component and corresponds to the build target
76   macro used.
78 pkglint::
79   This target is an optional target is automatically defined in each Makefile
80   by the inclusion of $(WS_MAKE_RULES)/prep.mk.  It will run the build steps
81   necessary to pkglint the manifests for a component.
83 pre-publish::
84   This target is present in all Makefiles.  It can be used at the top level
85   to act across all components, or on an individual component basis.  It is
86   automatically defined by including $(WS_MAKE_RULES)/ips.mk.  It depends
87   on the previously described 'install' target and will perform a series of
88   internal, intermediate steps to use the component package manifests to
89   generate and validate consistency of packages for that component.
91   NOTE: The pre-publish target aims to help a recipe developer to make sure
92   that the recipe can produce a valid package without actually pushing its
93   bits into his or her repository (allows to experiment, saves some time, and
94   avoids polluting the repository with known-bad code during development cycles).
96 publish::
97   This target is present in all Makefiles.  It can be used at the top level
98   to act across all components, or on an individual component basis.  It is
99   automatically defined by including $(WS_MAKE_RULES)/ips.mk.  It depends
100   on the previously described 'pre-publish' target and will actually publish
101   packages for that component to the repository configured in $(WS_REPO).
103 clean::
104   This target is present in all Makefiles.  It can be used at the top level
105   to act across all components, or on an individual component basis.  It is
106   often automatically defined by including one of the $(WS_MAKE_RULES)
107   Makefile fragments.  It cleans up any files created by building the component
108   with the exception of any downloaded files.
110 clobber::
111   This target is present in all Makefiles.  It can be used at the top level
112   to act across all components, or on an individual component basis.  It is
113   often automatically defined by including one of the $(WS_MAKE_RULES)
114   Makefile fragments.  It depends on the previously described 'clean' target
115   and additionally cleans up any downloaded source archives.  In addition,
116   when done from the top level or component sub-directory, it will do a find
117   of 'manifest-*.published' and clean those up; these can be left over from
118   components that were published but then 'hg rm'd before the next clobber.
120 REQUIRED_PACKAGES::
121   This target is present in all component Makefiles.  It is automatically
122   defined by including $(WS_MAKE_RULES)/ips.mk.  It is a convenience that can
123   be used to generate the set of REQUIRED_PACKAGES that is needed by the
124   'pkgdepend resolve' portion of package generation and publication (publish
125   target).  It automatically appends to the component Makefile, but the results
126   should be manually verified.
128 env-check::
129   This target serves as an alias for component-environment-check target. It exists
130   only for user convenience.
132 env-prep::
133   This target serves as an alias for component-environment-prep target. It exists
134   only for user convenience.
136 print-VAR
137   This target will print contents of variable VAR and also provide information
138   about variable origin and variable flavor.