[Debian-iot-maintainers] Bug#906201: duktape: Please consider using a 'real' make target & clarify no debugging comment

Carsten Schoenert c.schoenert at t-online.de
Mon Aug 20 05:57:01 BST 2018


Hello Thorsten,

On Sun, Aug 19, 2018 at 11:23:16PM +0200, Thorsten Alteholz wrote:
> Hi Chris,
> 
> On Wed, 15 Aug 2018, Chris Lamb wrote:
> > I just ACCEPTed duktape from NEW but was wondering if:
> 
> thanks a lot for accepting the package ...
> 
> >  cat debian/duktape.pc.in|sed "s/#TRIPLE#/$(DEB_HOST_MULTIARCH)/g" > debian/duktape.pc
> > 
> > … might be better written as a 'real' Make target?
> 
> ... but I am not really sure what you mean by 'real make target'?

I guess Chris wanted to say that you could turn the substition into a
Make traget so other targets can depend on it. I use very often
basically the following snippet for creating the "real" debhelper
sequencer files at build time.

> ...
> PREPROCESS_FILES := $(wildcard debian/*.in)
>
> $(PREPROCESS_FILES:.in=): %: %.in
>     sed 's,/@DEB_HOST_MULTIARCH@,$(DEB_HOST_MULTIARCH:%=/%),g' $< > $@
>
> ...
> override_dh_auto_install: $(PREPROCESS_FILES:.in=)
>     foo
>     bar

The basic make target here can be even more complex and can be more
depending on PREPROCESS_FILES.

> $(PREPROCESS_FILES:.in=): %: %.in
>     sed -e 's,/@DEB_HOST_MULTIARCH@,$(DEB_HOST_MULTIARCH:%=/%),g' \
>     -e 's,/@PHP_VERSION@,$(PHP_VERSION:%=/%),g' \
>     -e 's,/@PHP_API_DATE@,$(PHP_API_DATE:%=/%),g' $< > $@

Regards
Carsten



More information about the Debian-iot-maintainers mailing list