• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Compiling multiple output files from custom build rule, without undue maintenance?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Compiling multiple output files from custom build rule, without undue maintenance?


  • Subject: Compiling multiple output files from custom build rule, without undue maintenance?
  • From: Allen Cronce <email@hidden>
  • Date: Tue, 3 Nov 2009 17:46:37 -0800

Hi all,

We have a custom build process that generates multiple c or cpp files from a single input. I've been experimenting with integrating this source generation with Xcode using the custom build rule mechanism.

I can get things to work by setting up a custom build rule for the target, then manually adding the expected derived files in the "with output files" section. Any source files generated that are also listed as output files are in turn compiled and built, complete with dependency analysis, which is very neat.

What's not so neat is that we could have lots of source files generated by this process. Further, I expect a fair amount of turnover regarding the number and names of the generated files, at least for some period of time. This translates to a lot of potential maintenance associated with the "with output files" list.

Is there any way to provide a list of files to the "with output files" section? I've tried wildcarding the path and other hacks, but nothing seems to work. Unfortunately this mechanism seems best suited for a one-to-one relationship between the input and output files.

The only way that I can think of currently would be to not try to directly compile the generated files, but instead meta generate, or edit an existing, xcodeproj project, specifying the generated file list directly in the project.pbxproj XML, then call xcodebuild on that project.

While this would work, it would have its own ongoing maintenance issues, especially if Apple changes their project format. Although it might be preferable to generating a makefile, where we'd have to translate our xcconfig settings to the right gcc options, which has its own potential for maintenance problems other mayhem.

I have to admit that this level of hackery gives even me pause ;-)

Hopefully someone has a better idea. Thanks in advance for any suggestions that might help.

Best,
--
Allen Cronce
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Prev by Date: Re: something wrong with architecture and compiling
  • Next by Date: finding dependency header paths
  • Previous by thread: Re: Insert literal brace?
  • Next by thread: finding dependency header paths
  • Index(es):
    • Date
    • Thread