Support building on OSX and Linux


Currently, the Makefile in the repository is an NMake file, and can only be running on Windows. We need a GNU-make-makefile or a cross-platform build tool for developers using other platforms.

I've just modified the original Makefile to running on OSX. It's in the attachments. I've also tested it on cygwin. And it seems working fine.

file attachments

Closed Jan 24, 2013 at 4:47 PM by jonturner
We've added support for Jake, which should help support building the compiler and language service on OS X and Linux.


ting_yu_lin wrote Oct 2, 2012 at 2:53 AM

For people who want to try this makefile, notice that you won't be able to run "make runtests" successfully. It's because TypeScript compiler uses backslashes() for paths everywhere. It only switch to forward-slash(/) when you're running from tsc, the command line compiler. This is another issue.

Mahlzeit wrote Oct 2, 2012 at 7:19 AM

Thank you for your effort! It looks though that the build just simply copies a few files *.ts files around. Here is my output:

if [ ! -e built ] ; then mkdir built ; fi
if [ ! -e built/local ] ; then mkdir built/local ; fi
if [ ! -e built/localtest ] ; then mkdir built/localtest ; fi
cp -f typings/lib.d.ts built/local/lib.d.ts
cp -f typings/jquery.d.ts built/local/jquery.d.ts
cp -f typings/winjs.d.ts built/local/winjs.d.ts
cp -f typings/winrt.d.ts built/local/winrt.d.ts

I was hoping that I would get an editor running like I have on the official playground site, I guess I have to dig in myself and see if I can make this work somehow.

ting_yu_lin wrote Oct 2, 2012 at 7:55 AM


Make runs the first target in the Makefile. So in this case it'll run prebuild-local, which is - like you said, just simply copy some files.

You have to run "make local" to compile tsc. Or, run "make install" with this updated Makefile, which have disabled tests on the install target.

And you won't get the editor like the one on the website. This repository only includes TypeScript compiler and some sample codes. The source code of VS plugin is not included, too.

jonturner wrote Oct 4, 2012 at 4:13 AM

It's almost like we're a Windows shop :)

That's for the suggestion. We'll look into it.

dgryski wrote Nov 3, 2012 at 12:29 PM

Now that all the tests use '/' as a path separator, the tests run fine under Linux and OSX. Having a Makefile specifically for devs who want to work on those platforms would greatly help adoption.