views:

642

answers:

10

I develop on Windows, and I'd like to use beanstalkd. It's only available as a tarball, and I was just wondering if there is some way to easily build it like you can in Linux? I found some ports of gnu make for Windows, but they don't seem to be working. Are the source distributions somehow specific to Linux?

Edit: When I try to use mingw32-make it says "Nothing to be done for file". TBH I wasn't sure what to run it on, so I tried the tarball, the directory, and Makefile.in and Makefile.am. They all say the same thing.

+3  A: 

Have you tried cygwin?

I have cygwin. It doesn't have the make command. Is it something else?
ryeguy
I believe make is available for cygwin. You may have to dig around in the package downloader for cygwin.
Andy White
The make command might be called "gmake" in cygwin (for GNU Make).
Greg Hewgill
Cygwin has many optional packages, you have to make sure you select make and autoconf etc. when installing.
Jay
A: 

Concerning the alternatives, check out this link. As far as your problem with make, you'll have to be a little more specific about the non-working part. What doesn't work, how does it manifest, what error it gives and such.

ldigas
+1  A: 

Cygwin is nice, as the previous answer indicated, but it includes a lot more than just make.

I used to use NMake on Windows to build Perl modules. Check it out:

http://johnbokma.com/perl/make-for-windows.html

That's useful for Perl. Looks like there's a general GNU port, too:

http://gnuwin32.sourceforge.net/packages/make.htm

Jeff
+7  A: 

Make is available in cygwin, which you can install make via the installer.

The package is called "make", which is under "Devel" category.

Seh Hui 'Felix' Leong
A: 

Decompress the tarball, cd into its topmost directory and type 'make'. Make will pick up the Makefile automatically.

anon
I get "make: *** No targets specified and no makefile found. Stop."
ryeguy
+2  A: 

I would also look into using msys with mingw (it also can be found at http://mingw.org) I could try to explain it but I think the description from their page works better

MSYS: A Minimal SYStem providing a POSIX compatible Bourne shell environment, with a small collection of UNIX command line tools. Primarily developed as a means to execute the configure scripts and Makefiles used to build Open Source software, but also useful as a general purpose command line interface to replace Windows cmd.exe.

One bonus of using msys over cygwin is it builds native windows applications rather than having to rely on the cygwin compatibility layer

Mike Lowen
+2  A: 

Most unix source packages require you to run "configure", which reads some info about your system and builds the Makefile - although in the early days of X11, some packages used "xmkmf" to build Makefiles out of IMakefiles. Only after thats done can you run "make" and possibly "make install". From the sound of it, you don't have a Makefile, only the Makefile.in (which is input to configure).

Paul Tomblin
+4  A: 

I found some ports of gnu make for Windows, but they don't seem to be working.

Here are a few ports of GNU tools to Windows:

I am pretty sure I have used some of the utilities from the unxutils port without problems.

jussij
A: 

Cygwin and mingw come to mind.

MSVC includes nmake which kind of works on regular makefiles with some tweaking.

Adam Hawes
A: 

The make utility expects to use a file named Makefile. If you just type make, it will find that file automatically. If the makefile has some other name, use the -f option. If you just give the file name without -f, then make will interpret it as the target that it should figure out how to make.

A lot of tools that only come as source assume that you'll use Visual C++ to build on Windows, even if they assume you'll use G++ everywhere else. Look for a Visual C++ makefile; it's usually named Makefile.mak. Then run nmake.

But if you only have files named Makefile.in and Makefile.am, then you don't yet have a makable environment. Makefile.in is one of the inputs to the configure script, which will construct the real makefile and maybe a header or two that are specific to your environment, based on tests that configure runs.

In the end, the package you've downloaded might not really be compilable on Windows. Even under Cygwin, you can expect to have to make a few changes to the source code if it hasn't been written with Windows in mind.

Makefile.in will contain the basics of the final makefile. Back before I knew what I was supposed to do, I simply renamed Makefile.in to Makefile and got pretty far. You can try using that file as a starting point for constructing a real Windows makefile, for whichever compiler target you choose. It will take patience; just keep following the compiler messages until you don't see any more. (And then comes the linker. Hope you don't need too many other libraries!)

Rob Kennedy