Remy Bohmer wrote:
> When files in the projectroot directory are being used and installed via
> install_alternative() then there are no dependencies to these files.
> This is annoying when a file in projectroot is being edited but not
> installed in the target image when ptxdist go is executed.
> 
> This change adds a file to store the dependencies per package and include
> them in the top-level makefile
> 
> Signed-off-by: Remy Bohmer <li...@bohmer.net>

simply brillant...

> ---
> This patch is not finished yet and I am curious if this is the right
> way to solve it. At least it still has the problem that the deps file
> keeps on growing and is never cleared. Everytime when, for example,
> the bbinit-method.targetinstall stage is executed the deps file is
> appended with the same dependencies. But: at least it works better
> then without it...

we have this install_init, but.... it would break if there's more than
one ipkg per .make file. (as is in the kernel). But we also create a
mapping from package to it's ipks....

I will think about it...but now today.

> 
>  rules/other/Toplevel.make |    6 ++++++
>  rules/post/install.make   |    4 ++++
>  2 files changed, 10 insertions(+), 0 deletions(-)
> 
> diff --git a/rules/other/Toplevel.make b/rules/other/Toplevel.make
> index d270e71..5565efd 100644
> --- a/rules/other/Toplevel.make
> +++ b/rules/other/Toplevel.make
> @@ -94,6 +94,12 @@ ifneq ($(wildcard $(PROJECTPOSTRULESDIR)/*.make),)
>  include $(wildcard $(PROJECTPOSTRULESDIR)/*.make)
>  endif
>  
> +# install_alternative has some configuration defined dependencies. include 
> them
> +# if these exist.
> +ifneq ($(wildcard $(STATEDIR)/*.alt_deps),)
> +include $(wildcard $(STATEDIR)/*.alt_deps)
> +endif

just a simple "-include $(....)" might save some CPU cycles

> +
>  # 
> ----------------------------------------------------------------------------
>  # just the "print" target
>  # 
> ----------------------------------------------------------------------------
> diff --git a/rules/post/install.make b/rules/post/install.make
> index 3a86afe..48bd882 100644
> --- a/rules/post/install.make
> +++ b/rules/post/install.make
> @@ -136,6 +136,9 @@ install_copy =                                            
>                                         \
>  # This macro first looks in $(PTXDIST_WORKSPACE)/projectroot for the file to 
> copy and then
>  # in $(PTXDIST_TOPDIR)/generic and installs the file under $(ROOTDIR)
>  #
> +# 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.
> +#
>  # $1: packet label
>  # $2: UID
>  # $3: GID
> @@ -176,6 +179,7 @@ install_alternative =                                     
>                                 \
>               echo "Error: install_alternative failed!";                      
>         \
>               exit 1;                                                         
>         \
>       fi;                                                                     
>         \
> +     echo "$@: $$SRC" >> $(STATEDIR)/$$PACKET.alt_deps;                      
>         \
>       mkdir -p $(PKGDIR)/$$PACKET.tmp;                                        
>         \
>       echo "f:$$FILE:$$OWN:$$GRP:$$PER" >> $(STATEDIR)/$$PACKET.perms;
>  

mv /proc/self /dev/bed
(as a colleague of mine says)

Marc
-- 
Pengutronix e.K.                         | Marc Kleine-Budde           |
Linux Solutions for Science and Industry | Phone: +49-231-2826-924     |
Vertretung West/Dortmund                 | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686         | http://www.pengutronix.de   |

Attachment: signature.asc
Description: OpenPGP digital signature

--
ptxdist mailing list
ptxdist@pengutronix.de

Reply via email to