Comments (15)
@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.
Seems to apply to GNU make, PR needs some more polishing.
from ttyplot.
For the time being I'll just add a patch to Void Linux until we find the best way to proceed.
from ttyplot.
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.
@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.
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.
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.
@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.
But it doesn't work with GNU make because the backtick is not a legal command substitution.
from ttyplot.
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.
@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.
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.
@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.
@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.
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)
- arguments broken HOT 22
- Please add a Fish shell completion file HOT 1
- [1.5.2] `ttyplot.c:129:9: runtime error: signed integer overflow: 0 - -2147483648 cannot be represented in type 'int'` HOT 5
- [1.5.2] `ttyplot -c X -2` fails to use ASCII character "X" for drawing? HOT 2
- (Plans and remaing todos for) Release 1.6.0 HOT 6
- Use of `M_PI` in `stresstest.c` is not C99 and unfortunately breaks compilation with musl libc HOT 5
- [1.6.1] Chart output corrupts after a few minutes on macOS? HOT 20
- Shortcut for live plot of memory usage? HOT 7
- [master] Fails to compile with error: cannot find -lcurses: No such file or directory
- [master] "make deb" is broken
- use hline() vline() instead of drawing by hand HOT 1
- better SIGWINCH handler HOT 2
- stdin closes on SIGWINCH on some systems HOT 3
- [1.5.1] Minimum window size assumptions can be violated? HOT 4
- error: format not a string literal and no format arguments HOT 6
- handle window resize on older systems HOT 2
- Multi-byte characters not supported? HOT 17
- Average should be calculated from the available samples instead of the total number of potentially availalbe values HOT 4
- Release a new version and support -v option? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ttyplot.