Question: let me describe the situation first and then I will aks my question. 

I have a very generic module A. It consist of one c and one h file. The only dependency it has is to stdint.h file. 

There is also module B using module A (#include "module\_A.h"). 
There is another module C also using module A. 
Both B and C modules has dependency to module A "managed" via svn:externals property to make sure anyone using module B or C has also module A checked out. 

Modules B and C are pretty unrelated to each other. 
During the development of some project it happened that both modules B and C were needed. 
Svn:externals properties have been set in the project to get those modules into project directories. 
And now we have in project directory structure something like that: 

```
src/module_B/module_B.c
src/module_B/module_B.h
src/module_B/module_A/module_A.c
src/module_B/module_A/module_A.h

src/module_C/module_C.c
src/module_C/module_C.h
src/module_C/module_A/module_A.c
src/module_C/module_A/module_A.h

```

The compiler detects duplicated definitions of functions and stops compilation with errors. 

We use Eclipse to develop. 

Question 1. How to solve such problem? 

Question 2. If we dig deeper into this topic we might imagine a situation that module A has several revision and module B and C are pointing to different revisions of module A. How to solve such problem?

Answer: 
Have you considered generating the shell scripts from Ant? The [`<pathconvert>` task](http://ant.apache.org/manual/Tasks/pathconvert.html) can create a classpath from a `<fileset>`.

You can create an Ant target for each kind of shell script you want. `make` can then call these Ant targets to generate the shell scripts.
With Google's [Bazel](http://bazel.io/) build system, you can easily define as many runnable Java programs as you want, with the [`java_binary`](http://bazel.io/docs/build-encyclopedia.html#java_binary) target. You can define as many `java_binary` targets as you'd like, and they can all depend on the same set (or overlapping sets) of `java_library` targets so you don't need to manually curate the classpath of each binary.

Additionally, with a `java_binary` target you can also generate a `*_deploy.jar` file, which is a standalone executable Jar you can run anywhere.