make -n -n

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

make -n -n

Bryan Drewery-6
Does anyone consider 'make -n -n' a thing for top-level builds?

We have this ${_+_} thing in Makefiles that used to expand to '+' if you
gave '-n -n'.  This was so just 1 '-n' would just show what the
top-level Makefile would do:

~/svn/clean2 # make -n includes
cd /root/svn/clean2; PATH=/sbin:/bin:/usr/sbin:/usr/bin make -m
/root/svn/clean2/share/mk -f Makefile.inc1 TARGET=amd64
TARGET_ARCH=amd64 includes

Versus the more expected (at least for bmake) -n behavior of traversing
sub-makes:

~/svn/clean2 # make -n -n includes
===> lib (includes)
===> lib/csu (includes)
===> lib/csu/amd64 (includes)
===> lib/libcompiler_rt (includes)
===> lib/libc (includes)
===> lib/libc/tests (includes)
===> lib/libc/tests/tls_dso (includes)
===> lib/libc/tests/c063 (includes)
etc...

Note the actual output may be off due to local changes, but the point is
that -n with bmake is documented to run sub-makes with -n as well, so it
calls right down the chain showing all build commands without taking any
real actions.

Bmake added a '-N' flag that essentially does the hack that we've put
into our top-level Makefile - it doesn't run sub-makes.


So having said all of that, the ${_+_} never expands anymore since
r251748 (June 2013). The act of it working in top-level has only been
fixed since r288391 (September 2015).

Given it was broken for this long period I assume no one uses '-n -n' or
even knew about it.

I would like to remove it (-n -n and _+_) and just use the (bmake)
documented -n and -N flags and use '+' everywhere appropriate. Note that
we use .MAKE in some targets that achieves largely the same thing, but
many sub-make calls don't have a .MAKE and lack a proper '+' to recurse
in Makefile.inc1.

--
Regards,
Bryan Drewery
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-arch
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: make -n -n

Bryan Drewery-6
On 10/14/15 10:05 PM, Bryan Drewery wrote:
> Does anyone consider 'make -n -n' a thing for top-level builds?
>
...
>
> So having said all of that, the ${_+_} never expands anymore since
> r251748 (June 2013). The act of it working in top-level has only been
> fixed since r288391 (September 2015).

r251750 (June 2013) also makes it so buildworld -n causes a real rm -rf
to be executed, so I'm guessing no one even uses this since it has not
been fixed yet.

>
> Given it was broken for this long period I assume no one uses '-n -n' or
> even knew about it.
>
> I would like to remove it (-n -n and _+_) and just use the (bmake)
> documented -n and -N flags and use '+' everywhere appropriate. Note that
> we use .MAKE in some targets that achieves largely the same thing, but
> many sub-make calls don't have a .MAKE and lack a proper '+' to recurse
> in Makefile.inc1.
>


--
Regards,
Bryan Drewery
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-arch
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: make -n -n

John D. Hendrickson and Sara Darnell
Bryan Drewery wrote:

> On 10/14/15 10:05 PM, Bryan Drewery wrote:
>> Does anyone consider 'make -n -n' a thing for top-level builds?
>>
> ...
>> So having said all of that, the ${_+_} never expands anymore since
>> r251748 (June 2013). The act of it working in top-level has only been
>> fixed since r288391 (September 2015).
>
> r251750 (June 2013) also makes it so buildworld -n causes a real rm -rf
> to be executed, so I'm guessing no one even uses this since it has not
> been fixed yet.
>
>> Given it was broken for this long period I assume no one uses '-n -n' or
>> even knew about it.
>>
>> I would like to remove it (-n -n and _+_) and just use the (bmake)
>> documented -n and -N flags and use '+' everywhere appropriate. Note that
>> we use .MAKE in some targets that achieves largely the same thing, but
>> many sub-make calls don't have a .MAKE and lack a proper '+' to recurse
>> in Makefile.inc1.
>>
>
>
      -n      Display the commands that would have been executed, but do not
              actually execute them.


i dont see the point of the question "is for top of world" because -n
necessarily does "nothing"

however pmake(1) is one of these "wares" that continually becomes
incompatible with itself forward and backward ...

you should say what version of pmake (or freebsd) you are using if you
wish proper usage advice.  on the other hand one nice thing about
freebsd is proper usage for a given "release" is supposedly already
provided - which works only for that given release (maybe)
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-arch
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: make -n -n

John D. Hendrickson and Sara Darnell
In reply to this post by Bryan Drewery-6
Bryan Drewery wrote:

> Does anyone consider 'make -n -n' a thing for top-level builds?
>
> We have this ${_+_} thing in Makefiles that used to expand to '+' if you
> gave '-n -n'.  This was so just 1 '-n' would just show what the
> top-level Makefile would do:
>
> ~/svn/clean2 # make -n includes
> cd /root/svn/clean2; PATH=/sbin:/bin:/usr/sbin:/usr/bin make -m
> /root/svn/clean2/share/mk -f Makefile.inc1 TARGET=amd64
> TARGET_ARCH=amd64 includes
>
> Versus the more expected (at least for bmake) -n behavior of traversing
> sub-makes:
>
> ~/svn/clean2 # make -n -n includes
> ===> lib (includes)
> ===> lib/csu (includes)
> ===> lib/csu/amd64 (includes)
> ===> lib/libcompiler_rt (includes)
> ===> lib/libc (includes)
> ===> lib/libc/tests (includes)
> ===> lib/libc/tests/tls_dso (includes)
> ===> lib/libc/tests/c063 (includes)
> etc...
>
> Note the actual output may be off due to local changes, but the point is
> that -n with bmake is documented to run sub-makes with -n as well, so it
> calls right down the chain showing all build commands without taking any
> real actions.
>
> Bmake added a '-N' flag that essentially does the hack that we've put
> into our top-level Makefile - it doesn't run sub-makes.
>
>
> So having said all of that, the ${_+_} never expands anymore since
> r251748 (June 2013). The act of it working in top-level has only been
> fixed since r288391 (September 2015).
>
> Given it was broken for this long period I assume no one uses '-n -n' or
> even knew about it.
>
> I would like to remove it (-n -n and _+_) and just use the (bmake)
> documented -n and -N flags and use '+' everywhere appropriate. Note that
> we use .MAKE in some targets that achieves largely the same thing, but
> many sub-make calls don't have a .MAKE and lack a proper '+' to recurse
> in Makefile.inc1.
>

if you take a Makefile for older pmake and run it with newer - there is
no telling what might happen (unless of course it's already been tried)

no telling

_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-arch
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: make -n -n

Bryan Drewery-6
On 10/17/2015 8:29 AM, John D. Hendrickson wrote:

> Bryan Drewery wrote:
>> Does anyone consider 'make -n -n' a thing for top-level builds?
>>
>> We have this ${_+_} thing in Makefiles that used to expand to '+' if you
>> gave '-n -n'.  This was so just 1 '-n' would just show what the
>> top-level Makefile would do:
>>
>> ~/svn/clean2 # make -n includes
>> cd /root/svn/clean2; PATH=/sbin:/bin:/usr/sbin:/usr/bin make -m
>> /root/svn/clean2/share/mk -f Makefile.inc1 TARGET=amd64
>> TARGET_ARCH=amd64 includes
>>
>> Versus the more expected (at least for bmake) -n behavior of traversing
>> sub-makes:
>>
>> ~/svn/clean2 # make -n -n includes
>> ===> lib (includes)
>> ===> lib/csu (includes)
>> ===> lib/csu/amd64 (includes)
>> ===> lib/libcompiler_rt (includes)
>> ===> lib/libc (includes)
>> ===> lib/libc/tests (includes)
>> ===> lib/libc/tests/tls_dso (includes)
>> ===> lib/libc/tests/c063 (includes)
>> etc...
>>
>> Note the actual output may be off due to local changes, but the point is
>> that -n with bmake is documented to run sub-makes with -n as well, so it
>> calls right down the chain showing all build commands without taking any
>> real actions.
>>
>> Bmake added a '-N' flag that essentially does the hack that we've put
>> into our top-level Makefile - it doesn't run sub-makes.
>>
>>
>> So having said all of that, the ${_+_} never expands anymore since
>> r251748 (June 2013). The act of it working in top-level has only been
>> fixed since r288391 (September 2015).
>>
>> Given it was broken for this long period I assume no one uses '-n -n' or
>> even knew about it.
>>
>> I would like to remove it (-n -n and _+_) and just use the (bmake)
>> documented -n and -N flags and use '+' everywhere appropriate. Note that
>> we use .MAKE in some targets that achieves largely the same thing, but
>> many sub-make calls don't have a .MAKE and lack a proper '+' to recurse
>> in Makefile.inc1.
>>
>
> if you take a Makefile for older pmake and run it with newer - there is
> no telling what might happen (unless of course it's already been tried)
>
> no telling
>
I'm talking about head, where only bmake is supported.

Either way, the '-n -n' feature was not documented anywhere that I can
find. I am making the change here to desupport '-n -n' and make '-n' and
'-N' behave as documented in the bmake manpage.

--
Regards,
Bryan Drewery


signature.asc (484 bytes) Download Attachment