[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



The and 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:

-->source files


This works well with the following 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 and 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. and, so I will
also need to regenerate the configure,, etc. elements.  I
have an script that does that, but if I insert:

        cp $(srcdir)/ $(distdir)/.
        rm $(distdir)/

It doesn't do what I expect it to.  It runs, but instead it seems to run
the 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,

reply via email to

[Prev in Thread] Current Thread [Next in Thread]