Ethereal-dev: Re: [Ethereal-dev] cvsversion.h isn't generated in MSVCMakefile. nmake

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Guy Harris <guy@xxxxxxxxxxxx>
Date: Mon, 19 Jan 2004 12:59:20 -0800

On Jan 19, 2004, at 12:42 PM, Brady Volpe wrote:

I think that you are correct, the Makefile.nmake has the following entry:

---
# Build the version string
#
cvsversion.h:
	$(PERL) make-version.pl
---

I'm not sure why Perl is not running from Cygwin?

By "running from Cygwin" do you mean that you're using Cygwin to do the build (i.e., you ran the configure script and are using GNU make to do the build, rather than MSVC++'s "nmake"), or do you mean that you're using a version of Perl from Cygwin but are using MSVC++'s "nmake"?

If the latter, than the reason is probably that the only place in any of the Makefile.nmake files where anything depends on cvsversion.h is in the rules for the various .exe files, and those rules assume that the .obj files have already been built, so it won't try to build cvsversion.h until after it's compiled all the .c files - which won't work because you need cvsversion.h to compile some of those .c files!

The same applies to config.h - but that doesn't cause a problem because the top-level Makefile.nmake rule for the "gtk" directory says that you have to build "config.h", and that directory is built before any of the top-level .obj's are built.

The fix is probably just to add "cvsversion.h" to the list of dependencies for "gtk". (Add it just after "config.h" in the line

	gtk:: help config.h

near the end of the top-level Makefile.nmake.)