summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--doc/ref_rule_file_layout.inc12
-rw-r--r--scripts/lib/ptxd_lib_dgen.awk14
2 files changed, 26 insertions, 0 deletions
diff --git a/doc/ref_rule_file_layout.inc b/doc/ref_rule_file_layout.inc
index ea7eb8c49..58f37b73d 100644
--- a/doc/ref_rule_file_layout.inc
+++ b/doc/ref_rule_file_layout.inc
@@ -23,6 +23,18 @@ Each rule file provides PTXdist with the required steps (in PTXdist called
- targetinstall.post
+.. note::
+
+ Host, image and cross packages don't need to install anything in the target file system.
+ Therefore, PTXdist only respects the *targetinstall* and *targetinstall.post*
+ stages for packages whose name doesn't start with ``host-``, ``image-``, or ``cross-``.
+
+ When you want to depend on the output of a certain image package, you can
+ usually use its image name as an `additional prerequisite <make-prereq-types_>`_
+ in your make rule for the dependent stage.
+
+.. _make-prereq-types: https://www.gnu.org/software/make/manual/make.html#Prerequisite-Types
+
Default stage rules
~~~~~~~~~~~~~~~~~~~
diff --git a/scripts/lib/ptxd_lib_dgen.awk b/scripts/lib/ptxd_lib_dgen.awk
index 46387af10..82adcdf06 100644
--- a/scripts/lib/ptxd_lib_dgen.awk
+++ b/scripts/lib/ptxd_lib_dgen.awk
@@ -98,6 +98,20 @@ function dump_file(src, dst, tmp) {
#
+# warn user if an image, host, or cross package contains a targetinstall rule
+# which will not be executed
+#
+$1 ~ /^\$\(STATEDIR\)\/(image-.*|host-.*|cross-.*)\.targetinstall(.post)?:/ {
+ match($0, /\$\(STATEDIR\)\/((image-.*|host-.*|cross-.*)\.targetinstall(.post)?):/, m);
+ print "\nError in " old_filename " line " lineno ":\n" \
+ " '" m[1] "' stage will be ignored.\n" \
+ " See section 'Rule File Layout' in the PTXdist reference for more info:\n" \
+ " https://www.ptxdist.org/doc/ref_manual.html#rule-file-layout"
+ exit 1;
+}
+
+
+#
# parse "PACKAGES-$(PTXCONF_PKG) += pkg" lines, i.e. rules-files from
# rules/*.make. Setup mapping between upper and lower case pkg names
#