GNU social JP
  • FAQ
  • Login
GNU social JPは日本のGNU socialサーバーです。
Usage/ToS/admin/test/Pleroma FE
  • Public

    • Public
    • Network
    • Groups
    • Featured
    • Popular
    • People

Conversation

Notices

  1. Embed this notice
    Vegard Nossum 🥑 (vegard@mastodon.social)'s status on Monday, 12-Aug-2024 07:35:01 JST Vegard Nossum 🥑 Vegard Nossum 🥑

    Ugh, any time you use $(MAKE) inside a Makefile recipe, that line _will_ get executed regardless of whether you used make -n/--dry-run 😬

    Even if it's just an argument to something else. For example:

    all:
    echo $(MAKE)

    with make -n, this prints:

    echo make
    make

    I understand why they did it, kind of. It's a way to make recursive make -n work. But still, though... Ugh.

    In conversation Monday, 12-Aug-2024 07:35:01 JST from mastodon.social permalink
    • Haelwenn /элвэн/ :triskell: likes this.
    • Embed this notice
      Haelwenn /элвэн/ :triskell: (lanodan@queer.hacktivis.me)'s status on Monday, 12-Aug-2024 07:39:35 JST Haelwenn /элвэн/ :triskell: Haelwenn /элвэн/ :triskell:
      in reply to

      @vegard I guess MAKEFLAGS=-n make should work but uuh:

      $ MAKEFLAGS=-n bmake echo bmake $ MAKEFLAGS=-n gmake echo gmake gmake $ MAKEFLAGS=-n pdpmake echo pdpmake pdpmake
      In conversation Monday, 12-Aug-2024 07:39:35 JST permalink
    • Embed this notice
      Haelwenn /элвэн/ :triskell: (lanodan@queer.hacktivis.me)'s status on Monday, 12-Aug-2024 07:53:10 JST Haelwenn /элвэн/ :triskell: Haelwenn /элвэн/ :triskell:
      in reply to
      • Haelwenn /элвэн/ :triskell:

      @vegard And to make the recursive case always works you can use the leading + like:

      $ cat Makefile all: echo maybe_exec +echo always_exec +$(MAKE) -C subdir $ cat subdir/Makefile all: echo subdir echo $(MAKEFLAGS) $ MAKEFLAGS=-n bmake echo maybe_exec echo always_exec always_exec bmake -C subdir echo subdir echo -n
      In conversation Monday, 12-Aug-2024 07:53:10 JST permalink
    • Embed this notice
      Vegard Nossum 🥑 (vegard@mastodon.social)'s status on Monday, 12-Aug-2024 08:06:03 JST Vegard Nossum 🥑 Vegard Nossum 🥑
      in reply to
      • Haelwenn /элвэн/ :triskell:

      @lanodan Yeah. You can also do _MAKE := $(MAKE) and then use $(_MAKE) in your recipes (or +$(_MAKE) if you really want). I'm mostly just shaking my head at that obscure footgun. Why not just require people to use + in the first place?

      In conversation Monday, 12-Aug-2024 08:06:03 JST permalink
      Haelwenn /элвэн/ :triskell: likes this.

Feeds

  • Activity Streams
  • RSS 2.0
  • Atom
  • Help
  • About
  • FAQ
  • TOS
  • Privacy
  • Source
  • Version
  • Contact

GNU social JP is a social network, courtesy of GNU social JP管理人. It runs on GNU social, version 2.0.2-dev, available under the GNU Affero General Public License.

Creative Commons Attribution 3.0 All GNU social JP content and data are available under the Creative Commons Attribution 3.0 license.