diff options
author | Remy Bohmer <linux@bohmer.net> | 2010-06-30 21:28:13 +0200 |
---|---|---|
committer | Michael Olbrich <m.olbrich@pengutronix.de> | 2010-07-01 10:57:19 +0200 |
commit | 360f73777af1661d85ae0aa2434b6acde22da9fa (patch) | |
tree | e70730d7496b50174d80df3b784b66497ba7e04f /scripts | |
parent | bfb6f10270ead20767a1bb0257bbf854828163f9 (diff) | |
download | ptxdist-360f73777af1661d85ae0aa2434b6acde22da9fa.tar.gz ptxdist-360f73777af1661d85ae0aa2434b6acde22da9fa.tar.xz |
Fix dependencies to files in projectroot
When files in the projectroot directory are being used in install_copy() and
install_alternative() then there are no dependencies to these files.
This is being solved by storing all dependencies of the targetinstall
stage in a seperate state/<package>.deps file.
These state/<package>.deps files are included in the top-level ptxdist makefile
and this makes ptxdist properly handle the dependencies.
Signed-off-by: Remy Bohmer <linux@bohmer.net>
Signed-off-by: Bart vdr. Meulen <bartvdrmeulen@gmail.com>
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/lib/ptxd_make_install.sh | 3 | ||||
-rw-r--r-- | scripts/lib/ptxd_make_xpkg_common.sh | 1 | ||||
-rw-r--r-- | scripts/lib/ptxd_make_xpkg_pkg.sh | 10 |
3 files changed, 13 insertions, 1 deletions
diff --git a/scripts/lib/ptxd_make_install.sh b/scripts/lib/ptxd_make_install.sh index 539a67a21..93209e985 100644 --- a/scripts/lib/ptxd_make_install.sh +++ b/scripts/lib/ptxd_make_install.sh @@ -45,7 +45,8 @@ ptxd_make_install_init() { rm -fr -- \ "${pkg_xpkg_tmp}" \ "${pkg_xpkg_cmds}" \ - "${pkg_xpkg_perms}" && + "${pkg_xpkg_perms}" \ + "${pkg_xpkg_install_deps}" && mkdir -p -- "${pkg_ipkg_control_dir}" && touch "${pkg_xpkg_cmds}" || return diff --git a/scripts/lib/ptxd_make_xpkg_common.sh b/scripts/lib/ptxd_make_xpkg_common.sh index 89cde2c81..a756f20c8 100644 --- a/scripts/lib/ptxd_make_xpkg_common.sh +++ b/scripts/lib/ptxd_make_xpkg_common.sh @@ -40,6 +40,7 @@ ptxd_make_xpkg_init() { pkg_xpkg_license_file="${ptx_state_dir}/${pkg_xpkg}.license" # packaging stuff + pkg_xpkg_install_deps="${ptx_state_dir}/${pkg_xpkg}.deps" pkg_xpkg_perms="${ptx_state_dir}/${pkg_xpkg}.perms" pkg_xpkg_cmds="${ptx_state_dir}/${pkg_xpkg}.cmds" pkg_xpkg_tmp="${ptx_pkg_dir}/${pkg_xpkg}.tmp" diff --git a/scripts/lib/ptxd_make_xpkg_pkg.sh b/scripts/lib/ptxd_make_xpkg_pkg.sh index bdc100a2c..5d405246a 100644 --- a/scripts/lib/ptxd_make_xpkg_pkg.sh +++ b/scripts/lib/ptxd_make_xpkg_pkg.sh @@ -72,6 +72,16 @@ ptxd_install_setup_src() { for src in "${list[@]}"; do if [ -e "${src}" ]; then + # Since the dependency to the source files is dynamic we store + # the dependency information in a dependency file that can be + # included in the make files itself. + deprule="${ptx_state_dir}/${pkg_stamp}: \$(wildcard ${src})" + + # Make the deps rule robust for varying installation paths, and + # make the deps rules file more readable. + deprule=${deprule//${PTXDIST_TOPDIR}/\$(PTXDIST_TOPDIR)} + deprule=${deprule//${PTXDIST_WORKSPACE}/\$(PTXDIST_WORKSPACE)} + echo "${deprule}" >> ${pkg_xpkg_install_deps} return fi done |