[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Linking a directory into several projects

From: Ian Crowther
Subject: Linking a directory into several projects
Date: Mon, 12 Sep 2005 21:46:40 +0100

In a typical c project I find myself duplicating certain things.

I've solved this problem for some files by creating
symbolic links to ~/c-lib/*, where common files are saved.
This works great; "make dist" puts the files linked to
into an archive.

I can't, however, find a good solution to linking to a group of
files which are likely to change in number. A good example is
autoconf's @address@hidden I build a library in myproject/libcompat/.
If I create ~/c-lib/libcompat instead and
"ln myproject/libcompat ~/c-lib/libcompat -s" then at build time
I get:

make[2]: *** No rule to make target `../', needed by `'. Stop.

presumably because "ls .." points to "~/c-lib/" when I'm in

I could individually link to all the files in c-lib, but then
I need to update the links in every c project each time
I change the list of files that makes up libcompat/libcompat.a

I could link to libcompat/libcompat.a, but then if I "make dist"
then the source to build the library is not included.

Has anybody got a good solution for this problem?

I'm using autoconf and automake.

reply via email to

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