Append extra files into the single header
This commit is contained in:
parent
7259cbf296
commit
70f0689694
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -153,10 +153,24 @@ int main(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DN_Str8 extra_files[] = {
|
||||||
|
DN_STR8("Extra/dn_math"),
|
||||||
|
DN_STR8("Extra/dn_async"),
|
||||||
|
DN_STR8("Extra/dn_bin_pack"),
|
||||||
|
DN_STR8("Extra/dn_cgen"),
|
||||||
|
DN_STR8("Extra/dn_csv"),
|
||||||
|
DN_STR8("Extra/dn_hash"),
|
||||||
|
DN_STR8("Extra/dn_helpers"),
|
||||||
|
};
|
||||||
|
DN_Str8 suffix = type == FileType_Header ? DN_STR8("h") : DN_STR8("cpp");
|
||||||
|
for (DN_ForItCArray(extra_it, DN_Str8, extra_files)) {
|
||||||
|
DN_Str8 extra_path = DN_OS_PathFFromTLS("%S/%S.%S", dn_root_dir, extra_files, suffix);
|
||||||
|
AppendCppFileLineByLine(&builder, extra_path);
|
||||||
|
}
|
||||||
|
|
||||||
DN_OSDateTime date = DN_OS_DateLocalTimeNow();
|
DN_OSDateTime date = DN_OS_DateLocalTimeNow();
|
||||||
DN_Str8Builder_PrependF(&builder, "// Generated by the DN single header generator %04u-%02u-%02u %02u:%02u:%02u\n\n", date.year, date.month, date.day, date.hour, date.minutes, date.seconds);
|
DN_Str8Builder_PrependF(&builder, "// Generated by the DN single header generator %04u-%02u-%02u %02u:%02u:%02u\n\n", date.year, date.month, date.day, date.hour, date.minutes, date.seconds);
|
||||||
|
|
||||||
DN_Str8 suffix = type == FileType_Header ? DN_STR8("h") : DN_STR8("cpp");
|
|
||||||
DN_Str8 buffer = DN_Str8_TrimWhitespaceAround(DN_Str8Builder_BuildFromTLS(&builder));
|
DN_Str8 buffer = DN_Str8_TrimWhitespaceAround(DN_Str8Builder_BuildFromTLS(&builder));
|
||||||
DN_Str8 single_header_path = DN_OS_PathFFromTLS("%S/dn_single_header.%S", output_dir, suffix);
|
DN_Str8 single_header_path = DN_OS_PathFFromTLS("%S/dn_single_header.%S", output_dir, suffix);
|
||||||
DN_OSErrSink *err = DN_OS_ErrSinkBeginDefault();
|
DN_OSErrSink *err = DN_OS_ErrSinkBeginDefault();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user