Re: [PATCH v4] scripts/package/builddeb: split generating packaging and build

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2018-03-28 17:58 GMT+09:00 Riku Voipio <riku.voipio@xxxxxxxxxx>:
> On 27 March 2018 at 18:23, Masahiro Yamada
> <yamada.masahiro@xxxxxxxxxxxxx> wrote:
>> Riku,
>>
>> 2018-03-27 22:28 GMT+09:00 Riku Voipio <riku.voipio@xxxxxxxxxx>:
>>
>>>> If I use GNU Make 4.2
>>>>
>>>> $ cat deb_pkg_log.txt
>>>> MAKEFLAGS for deb-pkg: rR -I/home/masahiro/ref/linux -j8
>>>> --jobserver-auth=3,4 --no-print-directory -- obj=scripts/package
>>>> MAKEFLAGS for mkdebian internal: rR -I/home/masahiro/ref/linux -j
>>>> --jobserver-fds=5,6 --no-print-directory -- obj=scripts/package
>>>
>>> I'll make a wild guess, and "outside" make is your 4.2 build while the
>>> intdeb-pkg ends up calling the make 4.0 that comes with your ubuntu?
>>> observe the --jobserver-auth vs ---jobsserver-fds arguments.
>>>
>>
>> Ah, you are right!
>>
>>
>> Probably this
>>
>>>
>>> -if [ "x$1" = "xdeb-pkg" ]
>>> -then
>>> -    cat <<EOF > debian/rules
>>> -#!/usr/bin/make -f
>
> This is actually mandated in Debian policy:
>
> https://www.debian.org/doc/debian-policy/#main-building-script-debian-rules
>
>> So, if I type "make" from the command line, /home/masahiro/bin/make is chosen.
>> Then, the outer Makefile is executed by Make 4.2.
>>
>> But, due to the shebang '#!/usr/bin/make -f'
>> debian/rules is executed by older Make.
>>
>> Due to the incompatibility of MAKEFLAGS, Make went insane.
>>
>> Hmm, do you have an idea for solution?
>
> One option:
>
> +++ b/scripts/package/mkdebian
> cat <<EOF > debian/rules
> -#!/usr/bin/make -f
> #!$(which $MAKE)  -f
>
> This will let people build with whatever make they please, with the
> price that the resulting source package will not build elsewhere.


I prefer this idea.


Just a nit:

Maybe is 'command -v' more portable than 'which'?

Bjørn Forsman stated so in the following:
https://lkml.org/lkml/2018/3/11/196



Now the parallel building works nicely.
So, I think '-j1' for dpkg-buildpackage is unnecessary.



> Option 2 is to error out if "which $MAKE" != /usr/bin/make
>
>> I would be possible to forcibly overwrite MAKEFLAGS
>
> I think one goal is to keep deb-pkg simple, and fudging MAKEFLAGS
> would go against that goal.

I agree.
Please forget my comment.





-- 
Best Regards
Masahiro Yamada
--
To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux&nblp;USB Development]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite Secrets]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux