By switching to cmake I noticed that swig did not build succesfully one of a multiple module if the input file command line argument was absolute.
I tried to see what happens in the argument parsing in main.cxx, and I found that an internal command file is written which looks like this:
Then I saw the diff and changed the include command to be:
And the build was successful.
See the attached patch.