Giter VIP home page Giter VIP logo

Comments (15)

edgar-bonet avatar edgar-bonet commented on June 5, 2024 1

@MIvanchev: It does at least work with GNU Make 4.3, as shipped with Ubuntu 22.04.

because the backtick is not a legal command substitution

The backticks are not interpreted by make. They are interpreted by the shell that runs the recipes.

from ttyplot.

MIvanchev avatar MIvanchev commented on June 5, 2024

Seems to apply to GNU make, PR needs some more polishing.

from ttyplot.

MIvanchev avatar MIvanchev commented on June 5, 2024

For the time being I'll just add a patch to Void Linux until we find the best way to proceed.

from ttyplot.

hartwork avatar hartwork commented on June 5, 2024

Hi @MIvanchev please note that we cover non-GNU make flavors bsdmake and bmake in CI and all three of these were made to work fine. What flavor of make does Void have and/or use by default?

from ttyplot.

hartwork avatar hartwork commented on June 5, 2024

@MIvanchev I only now saw the make CFLAGS=.... up there — must be CFLAGS=.... make instead and should then work just fine. That is known and works as expected.

from ttyplot.

hartwork avatar hartwork commented on June 5, 2024

Update: I found line…

build_style=gnu-makefile

at https://github.com/void-linux/void-packages/blob/03dea5d36774312ad42c3f4b02bbdbfd4f9fb9c5/srcpkgs/ttyplot/template#L5C1-L5C12 now, so it's GNU make and the issue is in the way it's used and not in the makefile. Closing as not a bug, works as expected, see #159 (comment) above for details.

from ttyplot.

MIvanchev avatar MIvanchev commented on June 5, 2024

Yeah, it uses GNU make. OK, so no GNU make support. Anyhow I got it to build but the behavior is very weird. Let me open some issues.

from ttyplot.

edgar-bonet avatar edgar-bonet commented on June 5, 2024

@MIvanchev wrote:

no GNU make support

The intent is that ttyplot’s Makefile works with GNU make (for Linux) as well as with the standard make implementations of *BSD and macOS.

On Linux, you can install bmake in order to have a BSD-flavored make to test against.

from ttyplot.

MIvanchev avatar MIvanchev commented on June 5, 2024

But it doesn't work with GNU make because the backtick is not a legal command substitution.

from ttyplot.

MIvanchev avatar MIvanchev commented on June 5, 2024

They are interpreted by the shell that runs the recipes.

OK, so the build also requires a shell with backtick substitution. Maybe the commands could be modified to invoke sh directly instead of assuming it's the parent process.

from ttyplot.

edgar-bonet avatar edgar-bonet commented on June 5, 2024

@MIvanchev: Backtick substitution is a very standard shell feature. Do you have a use case for running make with a $SHELL that does not support it?

from ttyplot.

MIvanchev avatar MIvanchev commented on June 5, 2024

I mean I've been compiling stuff on the fish shell for years and so far ttyplot's Makefile is the only one that makes an assumption regarding a shell feature. IMO it's a valid one, it just should be more obvious than a lengthy discussion or just straight out automatic or baked by some kind of a test 😅.

from ttyplot.

edgar-bonet avatar edgar-bonet commented on June 5, 2024

@MIvanchev: It should be possible to tell make what shell to use, albeit the way to do so depends on the implementation. You may want to try adding this to the top of the Makefile, then calling make and bmake from fish:

# Make sure we use a standard shell that supports backtick expansion.
SHELL =      /bin/sh  # for GNU make
.SHELL: path=/bin/sh  # for BSD make

from ttyplot.

hartwork avatar hartwork commented on June 5, 2024

@MIvanchev backticks are POSIX shell, which we require. It could hardly be a more standard shell feature than than.
The current makefile works just as fine when invoked with CFLAGS=... LDFLAGS=... make with 3+ different flavors of make and POSIX shell. Supporting make CFLAGS=... LDFLAGS=... could be a bonus but is not a bug. I doubt it's worth making that work for all three flavors of make together.

from ttyplot.

MIvanchev avatar MIvanchev commented on June 5, 2024

I'm not convinced by embedding shell stuff into a Makefile without an explicit call to the shell but as long as I know how to build it without N surprises I'm happy.

from ttyplot.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.