Guy Harris <guy@xxxxxxxxxx> writes:
> On Thu, Feb 28, 2002 at 10:14:35AM -0500, Andrew C. Feren wrote:
> > Makefile.nmake:
> > There is currently a comment on the register.c target stating that it
> > would be nice to provide an ifdef to use python or sh. I added one.
> > I also ifdefed out the ncp dissector since if python isn't defined
> > this couldn't be built either.
>
> I think that's not the case if you've downloaded a distribution source
> tarball, as "packet-ncp2222.c" is part of the tarball.
That didn't occur to me. Attached is my attempt at a work around. In
anycase the ifdef for building register.c can be added.
This should build from either the tarball or cvs.
1) PYTHON is defined
register.c and packet-ncp2222.c will be built as needed
2) PYTHON is not defined and packet-ncp2222.c exists
register.c will be built using the sh script
packet-ncp2222.c compiled as usual (python not required)
2) PYTHON is not defined and packet-ncp2222.c is missing
register.c will be built using the sh script
Warning message that python or packet-ncp2222.c is needed
Hide packet-ncp.c
create empty packet-ncp.c packet-ncp2222.c
I had to hide packet-ncp.c because the link will fail without
packet-ncp2222.obj. I created empty .c files since I couldn't see a
way to remove the files from DISSECTOR_SRC once I got far enough to
know if I needed to.
> As such, I'm loath to use an ifdef there - I don't want to prevent
> people from downloading source tarballs and building, from the tarball,
> a complete version of Ethereal, including the NCP dissector.
That seems reasonable. This updated patch should allow this.
Users with or without python should be able to build from the tarball.
Users without python can build from cvs, but they will get a warning
message printed to the screen. They also won't get ncp dissectors.
--
-Andrew Feren
Cetacean Networks, Inc.
Portsmouth, NH