views:

51

answers:

1

I am in the process of trying to build putty tray, a variant of putty, from source on a Windows 7 system. I need to build it, not just download it, because I need to implement some additional functionality. I'm using nmake and (shouldn't be relevant) the Microsoft C++ compiler. To be precise, I'm working in a cmd window, I'm in the WINDOWS folder of the putty sources, and I'm running the command nmake -f MAKEFILE.VC.

C sources are compiling correctly, but then I'm running into an error that I don't understand:

no rule to make target `*.rc' needed by `pageant.res'

I understand perfectly well what it would mean if it said it couldn't make a particular file: it would mean the file was missing. But I don't get how this makes sense with a wild card.

The presumably relevant part of MAKEFILE.VC is

pageant.res: *.c *.h *.rc ..\windows\pageant.rc ..\windows\rcstuff.h \
                ..\windows\pageant.ico ..\windows\pageants.ico \
                ..\windows\version.rc2 ..\windows\pageant.mft
        rc $(RCFL) -r $(RCFLAGS) ..\windows\pageant.rc

And, yes, there are *.rc files in the folder: PAGEANT.RC, PLINK.RC, PSCP.RC, PSFTP.RC, PUTTY.RC, PUTTYTEL.RC

Any ideas?

A: 

Have you considered trying gmake instead of nmake?

Much of the makefile-driven open source project world finds nmake too limiting and has standardized on the Gnu's gmake as a much better tool. I haven't checked to be sure, but this has the feel of an nmake limitation and PuTTY is certainly the sort of project that would use gmake.

A good place to find a native Windows build of gmake is at the GnuWin32 project. Check out the other packages available there. They are a good source of native Windows builds of a lot of the familiar and useful Gnu tools. They have an advantage over projects like Cygwin that their tools work at the normal CMD prompt, and don't require installation beyond having their bin folder in your PATH, which their nice Windows installer will take care of for you.

RBerteig
Joe Mabel
FWIW, I have Cygwin, but I haven't ever really looked at GnuWin32.
Joe Mabel
I've never tried to build PuTTY from sources, but I have used it. I'd forgotten that bit of history of PuTTY... so if they say to use nmake, then I'd agree that isn't likely the problem.
RBerteig
I have both Cygwin and lots of stuff from GnuWin32 installed. I tend to treat Cygwin as a last resort because using it generally commits you to use it for the whole build, and often at runtime as well. Normally I use GCC from MinGW and fill in the gaps with GnuWin32.
RBerteig