Is there any way to use a script to add files to an Xcode target?
I'm not talking about build rules or phases here; I know about those. I have a project that requires about 3500 files to be imported into over 100 targets. I'd rather not do this by hand as said files are spread across a few directories and selecting them all by hand would take days to do.
The source code was originally from a makefile-based project that I'm converting to Xcode. I can hack up the makefiles easily enough to create lists of files in their relevant directories relative to $(SRCROOT) easily enough using some perl magic. What I don't know is what to do with those lists.
It would be ideal if I could somehow run a script that read in the list, found the file inside Xcode (since the files will have already been added to the project as file references and folder groups), then added it to a single target that I could define. Just being able to do this would mean that the entire job of importing and configuring the sources for all the targets would take hours rather than days.
Is this possible to achieve somehow?
Many thanks in advance! -KT