Re: Building command-line apps system-wide
Re: Building command-line apps system-wide
- Subject: Re: Building command-line apps system-wide
- From: Jens Alfke <email@hidden>
- Date: Fri, 09 May 2014 08:44:06 -0700
On May 9, 2014, at 8:18 AM, William Squires < email@hidden> wrote: Question: how do I get Xcode to build to this location directly? Is it even possible to tell Xcode to use sudo to copy into the restricted /bin system directory, and to do the chown every time I re-build (in case I want to add features to it) this project?
You shouldn’t put anything into /bin — that’s only for tools that ship with the OS. The usual place for user-installed command-line tools is /usr/local/bin, or else /opt/bin. (Homebrew uses the former; I think MacPorts uses the latter.) Of course you may need to update your shell startup file to add that directory to your $PATH.
You can add a custom script build phase to copy your binary wherever you want. Also, having done so, how can I make a man page for it? Is there a tool for making man pages? Is that what the .1 file in the project is for?
Yup. But beware, man pages are formatted using troff, a really hideous and primitive markup language that dates from the early 1970s. Unless you’re really dead-set on producing a man page, I would avoid the “fun” of learning this arcane syntax.
—Jens |
_______________________________________________
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