What do you want to do, "javascriptish" sounds to me :-). But if you insist, there is always "cat" (or the equivalent on Windows):
$ cat file1.h file2.h file3.h > my_big_file.h
Or, if you are using gcc, create the file my_decent_lib_header.h with the following contents:
#include "file1.h" #include "file2.h" #include "file3.h"
and then use
$ gcc -C -E my_decent_lib_header.h -o my_big_file.h
and in this way you even get file / line directives that will reference the source files (although this can be disabled if you want).
As for how automated this is for your file order, well, that’s not at all true; You must decide the order yourself. In fact, I would be surprised to see that a tool that organizes the header dependencies correctly in all cases for C / C ++ can be built.
source share