Hacker News new | past | comments | ask | show | jobs | submit login

One thing I've found useful about gulp and webpack is the fact that it's multiplatform.

What is the best approach to make sure your Makefile will work as expected on every platform, meaning, windows included?

For example: Can we write file paths using forward-slashes, or is it still an issue? I imagine running it via git bash (bash provided by the git installer on windows).




Good point - cross platform issues are a concern. I've noticed in the past that OS X machines tend to run older versions of Make (unless the owner has installed a newer version with Homebrew). It is a good idea to pay attention to the Make features that you use, understand which features were added in recent versions, and be aware of which features are specific to GNU Make. In my projects I recommend that users make sure that they are in fact using GNU Make.

Some systems might not support the `-p` flag in `mkdir -p`, or the `-rf` flags in `rm -rf`. There are scripts distributed on NPM called `mkdirp` and `rimraf` to work around such issues.


You can use forward slashes for paths on Windows in your Makefile. They are actually required if you want to use wildcards.


Make works on Windows. You can get it standalone, or as part of MinGW (and then even other Unix tools will work).


Ah yes, the horror of autoconf and automake...


Btw Windows has supported slashes forever. Just don't mix the two.


CMake! No, I'm kidding, don't really use CMake...


Downvote?! Looks like we have a CMake fan...




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: