Closed vendethiel closed 11 years ago
It's an enormous amount of work to make a makefile that runs in both GNU make and windows NMake for more than just simple tasks. I'd recommend using something cross-platform: cmake, waf, etc.
Whatever, cmake or cake or anything doesn't matter to me.
Cygwin is the (obvious) solution and an acceptable requirement IMO.
The third point however might be a bug, caused by these 3 lines. process.title
is not necessarily "node" in node.js (for me it's the current path). In a browser it just does not exist and causes a ReferenceError. (@ghempton: Did i miss something?)
Browser vs node.js detection is notoriously hard / unreliable, but something like this would probably be a better solution.
Cygwin is so bad and so horribly done it's never an ok requirement. I'd not use it even if that was the only way I had to build a project.
I missed something (sorry for the noise): commonjs-everywhere sets process.title
to "browser".
A better detection would then be something like
unless process.title is 'browser'
require './run'
Cygwin is so bad and so horribly done it's never an ok requirement. I'd not use it even if that was the only way I had to build a project.
Sad to hear that shell compatibility between *nix-like operating systems and Windows is still so crappy.
I remember, however, that the MinGW project provided a set of command-line tools that emulated the *nix commands, including bash
, make
, and the very useful things like ls
, rm
, grep
, etc, without requiring a full POSIX system ala Cygwin. I think i had some sort of success building C++ projects on both Windows and Linux with the same Makefile using those tools; but that was long time ago, i don't know what's their current state.
I remember, however, that the MinGW project provided a set of command-line tools that emulated the *nix commands, including bash, make, and the very useful things like ls, rm, grep, etc, without requiring a full POSIX system ala Cygwin. I think i had some sort of success building C++ projects on both Windows and Linux with the same Makefile using those tools; but that was long time ago, i don't know what's their current state.
I use that already. Does not do anything for the problems I mentioned here :(.
@marchaefner: that is a relic from browserify days. With commonjs-everywhere, I can just alias src/run.coffee
to /dev/null
.
@epidemian: believe it or not, windows is a POSIX compliant OS. edit: Apparently, not since NT 4. That shows how long it's been since I've looked at Windows...
the only problems (when building) so far seems to be to be the globbing
SRC = $(shell find src -name "*.coffee" -type f | sort)
LIB = $(SRC:src/%.coffee=lib/%.js) lib/parser.js
in $(LIB)
but I have no idea whatsoever how to fix it. Googling didn't help a single bit.
@Nami-Doc: maybe this would work better? https://github.com/int3/closure-interpreter/blob/48ce8e7284b57fb376150073d4c36585511ec354/Makefile#L3-L4
Seems to work with SRC = $(wildcard src/*.coffee | sort)
!
Fixed by #218.
Hi!
So, I wanted to try and make 1/2 things wherever, but I'm having problems with the Makefile.
mkdir -p lib/boostrap
on windows fails. Should bemkdir "lib/bootstrap"
. No idea how to silence it.*.coffee
are not replaced by cmd. That sucks really hard (windows for me), I replaced it for mocha (-R dot test/
is working great) but that's not working for everything else. Gives me 3 error whenever I run a make command..coffee
extension and it tries to run it as js.So ... I know you insisted on using a Makefile, and I love these too, but I don't see how I can use your one on windows, which is making me sad (╥_╥).