3

This is another in a long line of Project directory organization questions of mine. I'm trying to build a project directory organization structure which follows best-practices. I'd like the structure to be set up in a way that is easy to deliver to others and have them execute it. Adapting this structure, part of my project structure would look as follows:

common-data/
LocalTexTree/
projects/myproject/
projects/myproject/myproject.exe
projects/myproject/code/r/main.r
projects/myproject/data/myproject-data.dat
projects/myproject/report/main.tex

Q: Suppose I'd like to deliver my full project to someone for execution using myproject.exe. What's the best way to do that?

My concern is that common-data/ and LocalTexTree will be large and have a lot of files irrelevant to "myproject". From reading around, I suspect the solution would be to track the relevant files in a Makefile(?) that zips the entire project. That just seems like too clunky a solution and that it would break easily. There has to be a better way, right?

Again, I'm no programmer. This stuff isn't obvious to me at all. Any and all comments are welcome!

2
  • How many files are we talking about here? Because the simplest directory organization is one directory per project. Mar 1, 2011 at 19:31
  • @Matthew: I have many LARGE data files that are shared among projects. I suppose I could make a local copy for each project, but that solution seems clunky. Plus, my hard drive would fill up fast.
    – lowndrul
    Mar 1, 2011 at 19:45

1 Answer 1

2

Not a solution but some words about Make: Make is notoriously bad for managing files (i.e., dependencies) spread across multiple directories unless you use a single Makefile rather than one Makefile per directory. Google for Recursive Make Considered Harmful for a discussion of the problem. You might argue that you exactly see these multiple Makefiles in many open-source projects. To remedy the problems, these Makefiles are often generated automatically. And problems often still persists, not so much for clean make all builds but for partial builds after files in some directories are changed.

If you need Make just for zip'ing some files, this might not affect you, though. It might be easier to ship your code with a single shell script that does all you need without the dependency checking that Make provides in order to safe compilation time.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .