[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
disthook question and non-top level makefiles
From: |
J. Scott Amort |
Subject: |
disthook question and non-top level makefiles |
Date: |
Mon, 21 Jun 2004 19:22:10 -0400 |
Hi All,
I am maintaining a project that has a non-top level makefile structure.
Essentially, it separates the source files and their OS-dependent
elements.
src
-->projectA
-->projectB
linux
-->projectA
-->projectB
windows
-->projectA
-->projectB
...etc.
The Makefile.am and configure.ac and other necessary files are located
in the project's subdirectory under linux, while the actual source files
are in the project's subdirectory under src. Through use of relative
paths (i.e. ../../src/projectA), everything compiles fine. However,
make dist doesn't work at all - it populates into incorrect directories
and generally makes a mess of things. So, I am writing a dist-hook to
properly populate the $(distdir) before it gets tarred up. And, to make
matters worse, I am also attempting to correct the non-standard
directory structure within the distributable i.e. so the projectA-0.1.
tar.gz will actually have the following (normal) structure:
src
-->source files
Makefile.am
configure.ac
...etc.
This works well with the following dist-hook:
dist-hook:
rm $(srcdir)/main.cpp
mkdir $(distdir)/src
cp ../../src/projectA/main.cpp $(distdir)/src/.
patch -d $(distdir) -p1 <fix_projectA_dist.patch
The patch is to correct the configure.ac and Makefile.am files so that
they point to the expected src directory, not the ../../src directory.
The problem is, that I would like to keep the patch small and only
correct those two files (i.e. configure.ac and Makefile.am), so I will
also need to regenerate the configure, Makefile.in, etc. elements. I
have an autogen.sh script that does that, but if I insert:
cp $(srcdir)/autogen.sh $(distdir)/.
$(distdir)/autogen.sh
rm $(distdir)/autogen.sh
It doesn't do what I expect it to. It runs, but instead it seems to run
the autogen.sh in the $(srcdir), not the $(distdir) as I would like.
I've tried a couple of alternatives, but can't get the script to operate
on the files in $(distdir).
Could anyone offer some advice? Why isn't it working? It this the best
method to approach this situation? Perhaps there is a better
alternative? Thanks very much for any responses.
Best Regards,
Scott
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- disthook question and non-top level makefiles,
J. Scott Amort <=