Trying to produce a multi-file amalgamation (MacOS)


I have successfully built and installed amalgamator in my /usr/bin using latest tip. I can run amalgamator on the juce directory, and it says nothing changed. So I have the one big .cpp and .h.

The problem is that XCode 4 doesn’t handle the huge file so I want to make an amalgamation that has the 4 individual .cpp.

I see in juce/amalgamation there is those 4 files but when I try to run amalgamator on that I get an error “The template file doesn’t exist!”

How do I produce an amalgamation broken up into 4 .cpp ?


I’m having a really hard time with this I used /usr/bin/cpp on juce_amalgamated1.cpp, etc… for the first pass but its having problems I need help!


I only designed it to handle the one big file - you might need to hack it around a bit to make it do the 4 files separately.


Thats what I"m doing. First I preprocess each of juce_amalgamated#.cpp using

/usr/bin/cpp -P juce_amalgamated1.cpp j1.cpp

Now I run amalgamator on that file but its not doing any substitutions, I believe it is related to this comment in the amalgamator help “It’ll only do this for files that are within the same parent directory as the target file.”

I"m doing this all from the juce/Juce Amalgamation directory


Jules how do you produce juce_amalgamated.cpp and juce_amalgamated.h in the root of your trunk? Where is your template file?


It’s just the normal juce_amalgamated_template.cpp


OH…I am starting to understand. If you don’t define JUCE_BUILD_CORE then you set it to 1. I tried reproducing your amalgamation and it worked.

juce_amalgamated_template can be used both to build a single-file amalgamation, or to create a reduced amalgamation based on macro settings.