Re: Creating a custom "clean" target?
Re: Creating a custom "clean" target?
- Subject: Re: Creating a custom "clean" target?
- From: Anders Bertelrud <email@hidden>
- Date: Mon, 7 Apr 2008 21:52:40 -0700
On Apr 7, 2008, at 20.54, Chris Espinosa wrote:
On Apr 7, 2008, at 7:27 PM, Jack Repenning wrote:
How can I create a custom clean target?
I have a target whose sole step is a "Run Script". The script in
question does
cd some-sub-directory
make with a few arguments
I would like to arrange that "clean" on this target does
cd some-sub-directory
make with a few arguments ending in clean
But I can't figure out how to make a target or step that runs
during "clean". It is, unfortunately, unreasonable for me to try
to guess what-all needs to be cleaned up; the Makefile downloads
some stuff from the net, and the "stuff" is pretty much in charge
of what gets made. But the Makefile knows.
Surely, this must be a FAQ! I apologize for asking it again. I
did search the archives, but ended up drowning in near-matches; if
there was an actual match, I missed it.
Xcode native targets don't execute Run Script build phases during
clean. Xcode only cleans the things it knows it made, not arbitrary
items.
You could create a dependent target of type External Target and add
the appropriate steps to its custom makefile for the "clean" action,
but that's about the only thing you can do.
Consider writing a script to do what you want and putting it in
Xcode's Script menu.
Chris
Jack, Chris is right, but please do also file an enhancement request
on Xcode for this (using bugreporter.apple.com or whatever other means
you normally use). Running custom scripts while cleaning seems very
reasonable, and Xcode should support this functionality. I'm
suggesting that you be the one who files the enhancement request
because that way it comes back to you for verification once we've
implemented it. It also gives you a chance to describe any nuances in
the behaviour you'd like to see.
Anders
_______________________________________________
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