matthewcpp / cpp-amalgamate

python script which will amalgamate c++ code into a single header and source file
3 stars 1 forks source link

subdirectories #1

Open iltommi opened 7 years ago

iltommi commented 7 years ago

Hi, I'm trying to fin a tool to amalgamate a set of cpp/h files in a single one.

The project is here: https://gitlab.com/iltommi/QCustomPlot The original project contains a linux binary (amalgamate) which does the job and creates a single file from the src tree.

Since I'm on a mac, I cannot run ELF binaries and I'm looking for an alternative.

When I run your script on QCustomPlot, I still get some local #include "".

Is it possible for your script to dig more deeply in the src tree and find recursively the files?

Thanks a lot

iltommi commented 7 years ago

I've probably found the line https://github.com/matthewcpp/cpp-amalgamate/blob/master/cpp-amalgamate/amalgamate.py#L129

 #todo: handle "../" in include string -- result = UP_DIRECTORY_MATCHER.findall(include)