[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[no subject]
From: |
cs |
Subject: |
|
Date: |
Tue, 20 May 2003 10:00:49 -0700 (MST) |
Eric
I'm so thankful for your help. I'm glad you think this is an interesting
question. Integrating libpcap into source tree is quickly becoming
more than just a fun curiosity. I must ship this code to real customers
very soon and must figure something out quickly. :(
I did some research on this and tried to add a blank dist target
to libpcap's Makefile.in like you suggested.
(This will copy it into Makefile when
it is built by configure script.)
The problem with a blank dist target is that we also need a blank
distdir target.... but we also need some other variables to be defined, etc.
I thought it may be a good idea to just copy dist stuff from another
Makefile.in into *this* Makefile.in, but, dist stuff is pretty complicated
with lots of variables used. (I don't know why since all "make dist"
does is copy source to a phantom directory that is erased after
tarball is made.)
Another seemingly useful idea was to just add libpcap stuff via an
EXTRA_DIST line in parent directory. The problem with this idea
is that then I have to hack other files to somehow *still*
get "configure ; make" to happen in libpcap directory.
Any other ideas would be greatly appreciated.
Sincerely,
Chris
On Tue, May 13, 2003 at 01:05:12PM -0700, address@hidden wrote:
> [trying to integrate a third-party non-Automake package
> (libpcap) into his Automake-based source tree]
>
> I can create a tarball doing "make tar" with their Makefile.
> I cannot do "make dist" because their home grown set up does NOT
> have the "dist" target.
> How add this package to my source tree!?!?
Good question. The easiest way would probably be to add a rule
to the libpcap Makefile:
dist:
dist-cmds
where "dist-cmds" stands for whatever you want "make dist" to do
within the libpcap subdirectory. If the top-level "make dist"
does all the work, "dist-cmds" might be empty, leaving you with:
dist:
whose only purpose is to keep "make" happy.
The only other thing I can think of would be to put a wrapper
around the libpcap subdirectory:
your-package-root/
libpcap-wrapper/
libpcap/
(libpcap distribution)
Makefile
libpcap-wrapper can be almost empty. The main thing (and
probably the *only* thing) it needs is a Makefile something like
this:
all install clean distclean [many other targets]:
cd libpcap; ${MAKE} $@
dist:
cd libpcap; dist-cmds
(You might have to break a few other targets out into individual
rules. E.g. "make all" might have to copy libraries and headers
out of libpcap-wrapper/libpcap to wherever your own package's
build will look for them.)
I don't know whether it'd make more sense to write that little
Makefile by hand or use Automake to generate it.
[Prev in Thread] |
Current Thread |
[Next in Thread] |