rnkn / fountain-mode

Emacs major mode for screenwriting in Fountain plain-text markup
https://fountain-mode.org
GNU General Public License v3.0
399 stars 15 forks source link

Makefile clean target doesn't work with GNU make #137

Open sten0 opened 1 year ago

sten0 commented 1 year ago

Hi Paul,

While importing the latest release into Debian, I noted the clean target was broken, but I'm assuming that you don't see it because you're on macOS and are using BSD make.

This is the problem: https://github.com/rnkn/fountain-mode/blame/f3685ac7235de79cfa9a9c84acbbe8541bcf5e25/Makefile#L60

Please let me know if you'd like to support developers who use GNU (rather than BSD) systems, as well as if you'd prefer the one-line solution that calls find, or something else.

rnkn commented 1 year ago

Thanks for the heads up. I've only considered the Makefile as a convenience thing for me, so portability hasn't been a huge concern, but if you have a fix, by all means!

rnkn commented 5 months ago

I just tested with GNU Make versions 3.81 (macOS) and 4.4.1 (gmake, MacPorts) and didn't get any errors, but if you could let me know what needs to change that would be great!

sten0 commented 5 months ago

I just tested with GNU Make versions 3.81 (macOS) and 4.4.1 (gmake, MacPorts) and didn't get any errors, but if you could let me know what needs to change that would be great!

Hm, well, it didn't look like shell expansion last I looked...oh! I bet macOS comes with a library of convenient macro expansions that are enabled by default (I'm assuming this isn't a user config thing).

I've been waiting for your reply to learn if you'd like a PR that uses native makefile (uglier, bigger, but works everywhere) or the conventional method of calling 'find' (might not work on Windows). Alternatively, if you can ant to do it yourself, there are lots of resources online about these two methods.

rnkn commented 5 months ago

Yes please send a patch if it's not working for you! I think the first way, the native Makefile would be best.