mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCH] templates: file: update comments and improve wording
@ 2018-12-11 23:29 Roland Hieber
  2018-12-12 13:35 ` Michael Olbrich
  0 siblings, 1 reply; 5+ messages in thread
From: Roland Hieber @ 2018-12-11 23:29 UTC (permalink / raw)
  To: ptxdist; +Cc: Roland Hieber

The way of building target packages has changed over the years, and
SYSROOT_TARGET is no longer filled in the install stage. But all of this
is also explained in the Reference Manual, so we don't have to duplicate
that here.

Also add the definition of @PACKAGE@_DIR at the top, which is used in
the targetinstall stage later.

Signed-off-by: Roland Hieber <rohieb@rohieb.name>
---
 rules/templates/template-file-make | 45 ++++++------------------------
 1 file changed, 9 insertions(+), 36 deletions(-)

diff --git a/rules/templates/template-file-make b/rules/templates/template-file-make
index ee2a612ef..4e322a39c 100644
--- a/rules/templates/template-file-make
+++ b/rules/templates/template-file-make
@@ -4,25 +4,27 @@
 #
 # See CREDITS for details about who has contributed to this project.
 #
 # For further information about the PTXdist project and license conditions
 # see the README file.
 #
 
 #
 # We provide this package
 #
 PACKAGES-$(PTXCONF_@PACKAGE@) += @package@
 
+@PACKAGE@		:= @package@
 @PACKAGE@_VERSION	:= @VERSION@
+@PACKAGE@_DIR		:= $(PKGDIR)/$(@PACKAGE@)-$(@PACKAGE@_VERSION)
 
 # ----------------------------------------------------------------------------
 # Get
 # ----------------------------------------------------------------------------
 
 #$(STATEDIR)/@package@.get:
 #	@$(call targetinfo)
 #	@$(call touch)
 
 # ----------------------------------------------------------------------------
 # Extract
 # ----------------------------------------------------------------------------
@@ -44,72 +46,43 @@ PACKAGES-$(PTXCONF_@PACKAGE@) += @package@
 # ----------------------------------------------------------------------------
 
 #$(STATEDIR)/@package@.compile:
 #	@$(call targetinfo)
 #	@$(call touch)
 
 # ----------------------------------------------------------------------------
 # Install
 # ----------------------------------------------------------------------------
 
 $(STATEDIR)/@package@.install:
 	@$(call targetinfo)
-
 #
 # TODO:
-# If some of the files are required in root filesystem's build process, install
-# these files in the install stage. But use proper variables PTXdist supports
-# to install files, instead of fixed paths. The following variables can be
-# used:
-#
-# - $(PTXDIST_SYSROOT_TARGET) points to a directory tree
-#   all target relevant libraries and header files are installed to. All
-#   packages built for the target are searching in this directory tree for
-#   header and library files. These files are for compile time only, not for
-#   runtime!
-#   Paths:
-#    - executables: $(PTXDIST_SYSROOT_TARGET)/bin
-#    - header files: $(PTXDIST_SYSROOT_TARGET)/include
-#    - libraries: $(PTXDIST_SYSROOT_TARGET)/lib
-#
-# - $(PTXDIST_SYSROOT_HOST) points to a directory tree all host relevant
-#   executables, libraries and header files are installed to. All packages
-#   built for the host are searching in this directory tree for executables,
-#   header and library files.
-#   Paths:
-#    - executables: $(PTXDIST_SYSROOT_HOST)/bin
-#    - header files: $(PTXDIST_SYSROOT_HOST)/include
-#    - libraries: $(PTXDIST_SYSROOT_HOST)/lib
+# If files are needed at compile-time, install those files in the install
+# stage, but use proper variables instead of fixed paths. See the section
+# "Variables Reference" in the PTXdist Reference Manual for a list.
 #
-# - $(PTXDIST_SYSROOT_CROSS) points to a directory tree all cross relevant
-#   executables, libraries and header files are installed to. All packages
-#   built for the host to create data for the target are searching in this
-#   directory tree for executables, header and library files.
-#   Paths:
-#    - executables: $(PTXDIST_SYSROOT_CROSS)/bin
-#    - header files: $(PTXDIST_SYSROOT_CROSS)/include
-#    - libraries: $(PTXDIST_SYSROOT_CROSS)/lib
-#
-#
-# If no compile time files are reqired, skip this stage
+# If no compile-time files are required, skip this stage.
 	@$(call touch)
 
 # ----------------------------------------------------------------------------
 # Target-Install
 # ----------------------------------------------------------------------------
 
 $(STATEDIR)/@package@.targetinstall:
 	@$(call targetinfo)
 #
-# TODO: To build your own package, if this step requires one
+# TODO: for target packages, install files in the target root file system.
+# Otherwise, remove this stage.
+#
 #	@$(call install_init, @package@)
 #	@$(call install_fixup,@package@,PRIORITY,optional)
 #	@$(call install_fixup,@package@,SECTION,base)
 #	@$(call install_fixup,@package@,AUTHOR,"@AUTHOR@")
 #	@$(call install_fixup,@package@,DESCRIPTION,missing)
 #
 # TODO: Add here all files that should be copied to the target
 # Note: Add everything before(!) call to macro install_finish
 #
 #	@$(call install_copy, @package@, 0, 0, 0755, $(@PACKAGE@_DIR)/foobar, /dev/null)
 #
 #	@$(call install_finish,@package@)
-- 
2.19.2


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [ptxdist] [PATCH] templates: file: update comments and improve wording
  2018-12-11 23:29 [ptxdist] [PATCH] templates: file: update comments and improve wording Roland Hieber
@ 2018-12-12 13:35 ` Michael Olbrich
  2019-01-16 10:22   ` Roland Hieber
  0 siblings, 1 reply; 5+ messages in thread
From: Michael Olbrich @ 2018-12-12 13:35 UTC (permalink / raw)
  To: ptxdist

On Wed, Dec 12, 2018 at 12:29:26AM +0100, Roland Hieber wrote:
> The way of building target packages has changed over the years, and
> SYSROOT_TARGET is no longer filled in the install stage. But all of this
> is also explained in the Reference Manual, so we don't have to duplicate
> that here.
> 
> Also add the definition of @PACKAGE@_DIR at the top, which is used in
> the targetinstall stage later.
> 
> Signed-off-by: Roland Hieber <rohieb@rohieb.name>
> ---
>  rules/templates/template-file-make | 45 ++++++------------------------
>  1 file changed, 9 insertions(+), 36 deletions(-)
> 
> diff --git a/rules/templates/template-file-make b/rules/templates/template-file-make
> index ee2a612ef..4e322a39c 100644
> --- a/rules/templates/template-file-make
> +++ b/rules/templates/template-file-make
> @@ -4,25 +4,27 @@
>  #
>  # See CREDITS for details about who has contributed to this project.
>  #
>  # For further information about the PTXdist project and license conditions
>  # see the README file.
>  #
>  
>  #
>  # We provide this package
>  #
>  PACKAGES-$(PTXCONF_@PACKAGE@) += @package@
>  
> +@PACKAGE@		:= @package@
>  @PACKAGE@_VERSION	:= @VERSION@
> +@PACKAGE@_DIR		:= $(PKGDIR)/$(@PACKAGE@)-$(@PACKAGE@_VERSION)

No, if <PKG>_DIR is defined then the default compile and install stages are
no longer no-ops. Change the example in targetinstall to
install_alternative.

>  
>  # ----------------------------------------------------------------------------
>  # Get
>  # ----------------------------------------------------------------------------
>  
>  #$(STATEDIR)/@package@.get:
>  #	@$(call targetinfo)
>  #	@$(call touch)
>  
>  # ----------------------------------------------------------------------------
>  # Extract
>  # ----------------------------------------------------------------------------
> @@ -44,72 +46,43 @@ PACKAGES-$(PTXCONF_@PACKAGE@) += @package@
>  # ----------------------------------------------------------------------------
>  
>  #$(STATEDIR)/@package@.compile:
>  #	@$(call targetinfo)
>  #	@$(call touch)
>  
>  # ----------------------------------------------------------------------------
>  # Install
>  # ----------------------------------------------------------------------------
>  
>  $(STATEDIR)/@package@.install:
>  	@$(call targetinfo)
> -
>  #
>  # TODO:
> -# If some of the files are required in root filesystem's build process, install
> -# these files in the install stage. But use proper variables PTXdist supports
> -# to install files, instead of fixed paths. The following variables can be
> -# used:
> -#
> -# - $(PTXDIST_SYSROOT_TARGET) points to a directory tree
> -#   all target relevant libraries and header files are installed to. All
> -#   packages built for the target are searching in this directory tree for
> -#   header and library files. These files are for compile time only, not for
> -#   runtime!
> -#   Paths:
> -#    - executables: $(PTXDIST_SYSROOT_TARGET)/bin
> -#    - header files: $(PTXDIST_SYSROOT_TARGET)/include
> -#    - libraries: $(PTXDIST_SYSROOT_TARGET)/lib
> -#
> -# - $(PTXDIST_SYSROOT_HOST) points to a directory tree all host relevant
> -#   executables, libraries and header files are installed to. All packages
> -#   built for the host are searching in this directory tree for executables,
> -#   header and library files.
> -#   Paths:
> -#    - executables: $(PTXDIST_SYSROOT_HOST)/bin
> -#    - header files: $(PTXDIST_SYSROOT_HOST)/include
> -#    - libraries: $(PTXDIST_SYSROOT_HOST)/lib
> +# If files are needed at compile-time, install those files in the install
> +# stage, but use proper variables instead of fixed paths. See the section
> +# "Variables Reference" in the PTXdist Reference Manual for a list.

I think, this should at least mention <PKG>_PKGDIR as the target directory.

Michael

>  #
> -# - $(PTXDIST_SYSROOT_CROSS) points to a directory tree all cross relevant
> -#   executables, libraries and header files are installed to. All packages
> -#   built for the host to create data for the target are searching in this
> -#   directory tree for executables, header and library files.
> -#   Paths:
> -#    - executables: $(PTXDIST_SYSROOT_CROSS)/bin
> -#    - header files: $(PTXDIST_SYSROOT_CROSS)/include
> -#    - libraries: $(PTXDIST_SYSROOT_CROSS)/lib
> -#
> -#
> -# If no compile time files are reqired, skip this stage
> +# If no compile-time files are required, skip this stage.
>  	@$(call touch)
>  
>  # ----------------------------------------------------------------------------
>  # Target-Install
>  # ----------------------------------------------------------------------------
>  
>  $(STATEDIR)/@package@.targetinstall:
>  	@$(call targetinfo)
>  #
> -# TODO: To build your own package, if this step requires one
> +# TODO: for target packages, install files in the target root file system.
> +# Otherwise, remove this stage.
> +#
>  #	@$(call install_init, @package@)
>  #	@$(call install_fixup,@package@,PRIORITY,optional)
>  #	@$(call install_fixup,@package@,SECTION,base)
>  #	@$(call install_fixup,@package@,AUTHOR,"@AUTHOR@")
>  #	@$(call install_fixup,@package@,DESCRIPTION,missing)
>  #
>  # TODO: Add here all files that should be copied to the target
>  # Note: Add everything before(!) call to macro install_finish
>  #
>  #	@$(call install_copy, @package@, 0, 0, 0755, $(@PACKAGE@_DIR)/foobar, /dev/null)
>  #
>  #	@$(call install_finish,@package@)
> -- 
> 2.19.2
> 
> 
> _______________________________________________
> ptxdist mailing list
> ptxdist@pengutronix.de

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [ptxdist] [PATCH] templates: file: update comments and improve wording
  2018-12-12 13:35 ` Michael Olbrich
@ 2019-01-16 10:22   ` Roland Hieber
  2019-01-18  8:13     ` Michael Olbrich
  0 siblings, 1 reply; 5+ messages in thread
From: Roland Hieber @ 2019-01-16 10:22 UTC (permalink / raw)
  To: Michael Olbrich; +Cc: ptxdist

On Wed, Dec 12, 2018 at 02:35:16PM +0100, Michael Olbrich wrote:
> On Wed, Dec 12, 2018 at 12:29:26AM +0100, Roland Hieber wrote:
> > The way of building target packages has changed over the years, and
> > SYSROOT_TARGET is no longer filled in the install stage. But all of this
> > is also explained in the Reference Manual, so we don't have to duplicate
> > that here.
> > 
> > Also add the definition of @PACKAGE@_DIR at the top, which is used in
> > the targetinstall stage later.
> > 
> > Signed-off-by: Roland Hieber <rohieb@rohieb.name>
> > ---
> >  rules/templates/template-file-make | 45 ++++++------------------------
> >  1 file changed, 9 insertions(+), 36 deletions(-)
> > 
> > diff --git a/rules/templates/template-file-make b/rules/templates/template-file-make
> > index ee2a612ef..4e322a39c 100644
> > --- a/rules/templates/template-file-make
> > +++ b/rules/templates/template-file-make
> > @@ -4,25 +4,27 @@
> >  #
> >  # See CREDITS for details about who has contributed to this project.
> >  #
> >  # For further information about the PTXdist project and license conditions
> >  # see the README file.
> >  #
> >  
> >  #
> >  # We provide this package
> >  #
> >  PACKAGES-$(PTXCONF_@PACKAGE@) += @package@
> >  
> > +@PACKAGE@		:= @package@
> >  @PACKAGE@_VERSION	:= @VERSION@
> > +@PACKAGE@_DIR		:= $(PKGDIR)/$(@PACKAGE@)-$(@PACKAGE@_VERSION)
> 
> No, if <PKG>_DIR is defined then the default compile and install stages are
> no longer no-ops. Change the example in targetinstall to
> install_alternative.

Yes indeed. I'll try to rework it with your comments in mind. Can you
drop this patch for now, and apply the other two if there are no
problems with them?

 - Roland

> 
> >  
> >  # ----------------------------------------------------------------------------
> >  # Get
> >  # ----------------------------------------------------------------------------
> >  
> >  #$(STATEDIR)/@package@.get:
> >  #	@$(call targetinfo)
> >  #	@$(call touch)
> >  
> >  # ----------------------------------------------------------------------------
> >  # Extract
> >  # ----------------------------------------------------------------------------
> > @@ -44,72 +46,43 @@ PACKAGES-$(PTXCONF_@PACKAGE@) += @package@
> >  # ----------------------------------------------------------------------------
> >  
> >  #$(STATEDIR)/@package@.compile:
> >  #	@$(call targetinfo)
> >  #	@$(call touch)
> >  
> >  # ----------------------------------------------------------------------------
> >  # Install
> >  # ----------------------------------------------------------------------------
> >  
> >  $(STATEDIR)/@package@.install:
> >  	@$(call targetinfo)
> > -
> >  #
> >  # TODO:
> > -# If some of the files are required in root filesystem's build process, install
> > -# these files in the install stage. But use proper variables PTXdist supports
> > -# to install files, instead of fixed paths. The following variables can be
> > -# used:
> > -#
> > -# - $(PTXDIST_SYSROOT_TARGET) points to a directory tree
> > -#   all target relevant libraries and header files are installed to. All
> > -#   packages built for the target are searching in this directory tree for
> > -#   header and library files. These files are for compile time only, not for
> > -#   runtime!
> > -#   Paths:
> > -#    - executables: $(PTXDIST_SYSROOT_TARGET)/bin
> > -#    - header files: $(PTXDIST_SYSROOT_TARGET)/include
> > -#    - libraries: $(PTXDIST_SYSROOT_TARGET)/lib
> > -#
> > -# - $(PTXDIST_SYSROOT_HOST) points to a directory tree all host relevant
> > -#   executables, libraries and header files are installed to. All packages
> > -#   built for the host are searching in this directory tree for executables,
> > -#   header and library files.
> > -#   Paths:
> > -#    - executables: $(PTXDIST_SYSROOT_HOST)/bin
> > -#    - header files: $(PTXDIST_SYSROOT_HOST)/include
> > -#    - libraries: $(PTXDIST_SYSROOT_HOST)/lib
> > +# If files are needed at compile-time, install those files in the install
> > +# stage, but use proper variables instead of fixed paths. See the section
> > +# "Variables Reference" in the PTXdist Reference Manual for a list.
> 
> I think, this should at least mention <PKG>_PKGDIR as the target directory.
> 
> Michael
> 
> >  #
> > -# - $(PTXDIST_SYSROOT_CROSS) points to a directory tree all cross relevant
> > -#   executables, libraries and header files are installed to. All packages
> > -#   built for the host to create data for the target are searching in this
> > -#   directory tree for executables, header and library files.
> > -#   Paths:
> > -#    - executables: $(PTXDIST_SYSROOT_CROSS)/bin
> > -#    - header files: $(PTXDIST_SYSROOT_CROSS)/include
> > -#    - libraries: $(PTXDIST_SYSROOT_CROSS)/lib
> > -#
> > -#
> > -# If no compile time files are reqired, skip this stage
> > +# If no compile-time files are required, skip this stage.
> >  	@$(call touch)
> >  
> >  # ----------------------------------------------------------------------------
> >  # Target-Install
> >  # ----------------------------------------------------------------------------
> >  
> >  $(STATEDIR)/@package@.targetinstall:
> >  	@$(call targetinfo)
> >  #
> > -# TODO: To build your own package, if this step requires one
> > +# TODO: for target packages, install files in the target root file system.
> > +# Otherwise, remove this stage.
> > +#
> >  #	@$(call install_init, @package@)
> >  #	@$(call install_fixup,@package@,PRIORITY,optional)
> >  #	@$(call install_fixup,@package@,SECTION,base)
> >  #	@$(call install_fixup,@package@,AUTHOR,"@AUTHOR@")
> >  #	@$(call install_fixup,@package@,DESCRIPTION,missing)
> >  #
> >  # TODO: Add here all files that should be copied to the target
> >  # Note: Add everything before(!) call to macro install_finish
> >  #
> >  #	@$(call install_copy, @package@, 0, 0, 0755, $(@PACKAGE@_DIR)/foobar, /dev/null)
> >  #
> >  #	@$(call install_finish,@package@)
> > -- 
> > 2.19.2
> > 
> > 
> > _______________________________________________
> > ptxdist mailing list
> > ptxdist@pengutronix.de
> 
> -- 
> Pengutronix e.K.                           |                             |
> Industrial Linux Solutions                 | http://www.pengutronix.de/  |
> Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
> Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |
> 
> _______________________________________________
> ptxdist mailing list
> ptxdist@pengutronix.de

-- 
Roland Hieber                     | r.hieber@pengutronix.de     |
Pengutronix e.K.                  | https://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim | Phone: +49-5121-206917-5086 |
Amtsgericht Hildesheim, HRA 2686  | Fax:   +49-5121-206917-5555 |

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [ptxdist] [PATCH] templates: file: update comments and improve wording
  2019-01-16 10:22   ` Roland Hieber
@ 2019-01-18  8:13     ` Michael Olbrich
  2019-01-18  9:01       ` Roland Hieber
  0 siblings, 1 reply; 5+ messages in thread
From: Michael Olbrich @ 2019-01-18  8:13 UTC (permalink / raw)
  To: ptxdist

On Wed, Jan 16, 2019 at 11:22:14AM +0100, Roland Hieber wrote:
> On Wed, Dec 12, 2018 at 02:35:16PM +0100, Michael Olbrich wrote:
> > On Wed, Dec 12, 2018 at 12:29:26AM +0100, Roland Hieber wrote:
> > > The way of building target packages has changed over the years, and
> > > SYSROOT_TARGET is no longer filled in the install stage. But all of this
> > > is also explained in the Reference Manual, so we don't have to duplicate
> > > that here.
> > > 
> > > Also add the definition of @PACKAGE@_DIR at the top, which is used in
> > > the targetinstall stage later.
> > > 
> > > Signed-off-by: Roland Hieber <rohieb@rohieb.name>
> > > ---
> > >  rules/templates/template-file-make | 45 ++++++------------------------
> > >  1 file changed, 9 insertions(+), 36 deletions(-)
> > > 
> > > diff --git a/rules/templates/template-file-make b/rules/templates/template-file-make
> > > index ee2a612ef..4e322a39c 100644
> > > --- a/rules/templates/template-file-make
> > > +++ b/rules/templates/template-file-make
> > > @@ -4,25 +4,27 @@
> > >  #
> > >  # See CREDITS for details about who has contributed to this project.
> > >  #
> > >  # For further information about the PTXdist project and license conditions
> > >  # see the README file.
> > >  #
> > >  
> > >  #
> > >  # We provide this package
> > >  #
> > >  PACKAGES-$(PTXCONF_@PACKAGE@) += @package@
> > >  
> > > +@PACKAGE@		:= @package@
> > >  @PACKAGE@_VERSION	:= @VERSION@
> > > +@PACKAGE@_DIR		:= $(PKGDIR)/$(@PACKAGE@)-$(@PACKAGE@_VERSION)
> > 
> > No, if <PKG>_DIR is defined then the default compile and install stages are
> > no longer no-ops. Change the example in targetinstall to
> > install_alternative.
> 
> Yes indeed. I'll try to rework it with your comments in mind. Can you
> drop this patch for now, and apply the other two if there are no
> problems with them?

You mean the two documentation patches, right? I've applied those.

Michael

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [ptxdist] [PATCH] templates: file: update comments and improve wording
  2019-01-18  8:13     ` Michael Olbrich
@ 2019-01-18  9:01       ` Roland Hieber
  0 siblings, 0 replies; 5+ messages in thread
From: Roland Hieber @ 2019-01-18  9:01 UTC (permalink / raw)
  To: ptxdist

On Fri, Jan 18, 2019 at 09:13:01AM +0100, Michael Olbrich wrote:
> On Wed, Jan 16, 2019 at 11:22:14AM +0100, Roland Hieber wrote:
> > Yes indeed. I'll try to rework it with your comments in mind. Can you
> > drop this patch for now, and apply the other two if there are no
> > problems with them?
> 
> You mean the two documentation patches, right? I've applied those.

Yes, thank you! The mail I replied to was just above the two
documentation patches, so I interpreted them as being the same thread.

 - Roland

-- 
Roland Hieber                     | r.hieber@pengutronix.de     |
Pengutronix e.K.                  | https://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim | Phone: +49-5121-206917-5086 |
Amtsgericht Hildesheim, HRA 2686  | Fax:   +49-5121-206917-5555 |

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-01-18  9:01 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-11 23:29 [ptxdist] [PATCH] templates: file: update comments and improve wording Roland Hieber
2018-12-12 13:35 ` Michael Olbrich
2019-01-16 10:22   ` Roland Hieber
2019-01-18  8:13     ` Michael Olbrich
2019-01-18  9:01       ` Roland Hieber

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox