mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] Docu for "fixup" rules
@ 2020-06-13 11:01 Ariel Garcia
  2020-06-15  8:57 ` Roland Hieber
  0 siblings, 1 reply; 3+ messages in thread
From: Ariel Garcia @ 2020-06-13 11:01 UTC (permalink / raw)
  To: ptxdist

Hello,

using the hint from this discussion
	https://www.mail-archive.com/ptxdist@pengutronix.de/msg16103.html

i would like to add a "rules/post/kernel-fixup.make"
kind of rule file to "extend" the rule run when i execute
	ptxdist clean kernel

But i don't find any info regarding pre/post rule files in the official docu/
reference manual.

Any hint is really appreciated, thanks, Ariel




_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de

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

* Re: [ptxdist] Docu for "fixup" rules
  2020-06-13 11:01 [ptxdist] Docu for "fixup" rules Ariel Garcia
@ 2020-06-15  8:57 ` Roland Hieber
  2020-06-19  5:49   ` Michael Olbrich
  0 siblings, 1 reply; 3+ messages in thread
From: Roland Hieber @ 2020-06-15  8:57 UTC (permalink / raw)
  To: Ariel Garcia; +Cc: ptxdist

On Sat, Jun 13, 2020 at 01:01:39PM +0200, Ariel Garcia wrote:
> Hello,
> 
> using the hint from this discussion
> 	https://www.mail-archive.com/ptxdist@pengutronix.de/msg16103.html
> 
> i would like to add a "rules/post/kernel-fixup.make"
> kind of rule file to "extend" the rule run when i execute
> 	ptxdist clean kernel
> 
> But i don't find any info regarding pre/post rule files in the official docu/
> reference manual.
> 
> Any hint is really appreciated, thanks, Ariel

The makefiles in rules/pre are evaluated before any other in rules/, and
contain all macro and variable definitions that should be available for
rule files.

The files in rules/post are evaluated last, so you can e.g.  override
makefiles and menu entries from upstream PTXdist in your BSP without
needing to forking the whole rule file.

All files are evaluated in lexical order, but other than that, the file
name is not important for functionality.

I don't think there's any more magic to it :)

 - Roland

-- 
Roland Hieber, Pengutronix e.K.          | r.hieber@pengutronix.de     |
Steuerwalder Str. 21                     | https://www.pengutronix.de/ |
31137 Hildesheim, Germany                | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686         | Fax:   +49-5121-206917-5555 |

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de

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

* Re: [ptxdist] Docu for "fixup" rules
  2020-06-15  8:57 ` Roland Hieber
@ 2020-06-19  5:49   ` Michael Olbrich
  0 siblings, 0 replies; 3+ messages in thread
From: Michael Olbrich @ 2020-06-19  5:49 UTC (permalink / raw)
  To: ptxdist

On Mon, Jun 15, 2020 at 10:57:40AM +0200, Roland Hieber wrote:
> On Sat, Jun 13, 2020 at 01:01:39PM +0200, Ariel Garcia wrote:
> > using the hint from this discussion
> > 	https://www.mail-archive.com/ptxdist@pengutronix.de/msg16103.html
> > 
> > i would like to add a "rules/post/kernel-fixup.make"
> > kind of rule file to "extend" the rule run when i execute
> > 	ptxdist clean kernel
> > 
> > But i don't find any info regarding pre/post rule files in the official docu/
> > reference manual.
> > 
> > Any hint is really appreciated, thanks, Ariel
> 
> The makefiles in rules/pre are evaluated before any other in rules/, and
> contain all macro and variable definitions that should be available for
> rule files.
> 
> The files in rules/post are evaluated last, so you can e.g.  override
> makefiles and menu entries from upstream PTXdist in your BSP without
> needing to forking the whole rule file.
> 
> All files are evaluated in lexical order, but other than that, the file
> name is not important for functionality.
> 
> I don't think there's any more magic to it :)

Also, this is pure make, so the you can only do, what is supported by the
make syntax.

'ptxdist clean kernel' is defined by a make target and those cannot be
extended and overwriting produces a warning.
So in this case you need to copy rules/kernel.make into your BSP and modify
it. This will replace the on in PTXdist and avoid this warning.

Michael

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de

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

end of thread, other threads:[~2020-06-19  5:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-13 11:01 [ptxdist] Docu for "fixup" rules Ariel Garcia
2020-06-15  8:57 ` Roland Hieber
2020-06-19  5:49   ` Michael Olbrich

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