URL:
  <https://savannah.gnu.org/bugs/?56778>

                 Summary: 'define' ... 'endef' serializes sub-make invocations
                 Project: make
            Submitted by: masahiroy
            Submitted on: Tue 20 Aug 2019 04:31:17 AM UTC
                Severity: 3 - Normal
              Item Group: None
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
       Component Version: None
        Operating System: None
           Fixed Release: None
           Triage Status: None

    _______________________________________________________

Details:

I think 'define' ... 'endef' is useful
to macrofy a long recipe and to re-use it
in other places.

I attached 4 simple Makefile examples.

"make -f Makefile1" and "make -f Makefile2"
work equivalently for me.

However, Makefile3 and Makefile4 gave me
different results if a parallel build option
is given.

"make -j8 -f Makefile3" is fine, but
"make -j8 -f Makefile4" shows
warning: jobserver unavailable: using -j1.  Add '+' to parent make rule.

So, if a macro contains invocations of sub-make,
it turns off parallel building for sub-make.

Is this a specification?
I just wondered why Makefile3 and Makefile4
work differently.




    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Tue 20 Aug 2019 04:31:17 AM UTC  Name: Makefile1  Size: 43B   By:
masahiroy

<http://savannah.gnu.org/bugs/download.php?file_id=47366>
-------------------------------------------------------
Date: Tue 20 Aug 2019 04:31:17 AM UTC  Name: Makefile2  Size: 77B   By:
masahiroy

<http://savannah.gnu.org/bugs/download.php?file_id=47367>
-------------------------------------------------------
Date: Tue 20 Aug 2019 04:31:17 AM UTC  Name: Makefile3  Size: 141B   By:
masahiroy

<http://savannah.gnu.org/bugs/download.php?file_id=47368>
-------------------------------------------------------
Date: Tue 20 Aug 2019 04:31:17 AM UTC  Name: Makefile4  Size: 175B   By:
masahiroy

<http://savannah.gnu.org/bugs/download.php?file_id=47369>

    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?56778>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/


_______________________________________________
Bug-make mailing list
Bug-make@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-make

Reply via email to