[Top][All Lists]

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

trying to find a good solution to filename clash

From: Russell Kliese
Subject: trying to find a good solution to filename clash
Date: Fri, 16 Feb 2007 22:04:55 +1000
User-agent: Icedove (X11/20061220)

I've been having a hard time trying to find a solution to something I though should be quite strait-forward. Perhaps I've missed something obvious.

I'm trying to create a to build some files in the following files/directory structure


If my makefile contains roughly the following:

lib_LIBRARIES = libfoo.a
libfoo_a_SOURCES = foo1/exception.cpp foo2/exception.cpp

I end up with the following error: object `exception.$(OBJEXT)' created by `foo2/exception.cpp' and `foo1/exception.cpp'

I'm wondering if there is a way to avoid this filename clash (perhaps by mangling the name with the directory it belongs to somehow).

The reason I've got these duplicate files is because they are exception classes in different namespaces. I've found it convenient to have the source files in directories that are the same as the namespace as the object contained in the source file. I know that I could just make sure that the filenames are unique, but I really want to try to avoid it.

Up to this point in time, I've been using hand crafted makefiles, but am keen to make use of the automatic dependency tracking that automake offers to remove the need to "make clean".


Russell Kliese

reply via email to

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