Setting up XCode, Mac, Skeleton C - wiki missing some key info?

Hello hello again,

I discovered all the lovely info in the wiki today and have been trying to set up XCode on the Mac to build the skeleton C file. But I feel there is some key information missing - so I’m a bit stuck.

I’m following this page: http://www.midibox.org/dokuwiki/how_to_use_xcode2_as_ide_on_a_mac

Setting up the make target

Because things change a lot, we’re making it easy: we set up a “makefileâ€-target, so with a press of button, your new makefile is generated!

Note, that you can skip this step if your makefile will never change. Neverthess, the procedure is the same as setting up your main target, so you should read it anyway :slight_smile:

    *

      go to “Project > New Target†and choose “Shell Script Targetâ€. Name the target “Makefileâ€

    *

      open the Target-Tree, open the target “Makefile†and double-click on “Run Scriptâ€

    *

      you’ll find now:

type this:

for Xcode 3 you need to strip the quotes:

If you get an error like “line x: ./mkmk.pl: Permission deniedâ€, you need to give the perl script execute rights. Easiest way to do this is open your favorite FTP program and set “Executeable†or use the Terminal:

Don’t forget to close the panel or switch forth and back to the next window item (â€Commentsâ€), because sometimes the changes are not recognized.

You’re done!

Once you select “makefile†as your primary target and press “buildâ€, the pearl tool ./mkmk.pl is invoked, generates your Makefile, deletes the unnecessary “makefile.bat†and moves the new makefile in your directory root.

If you want to, you can now add “$(SRCROOT)/MAKEFILE.SPEC†to the “Input Files†and “$(SRCROOT)/Makefile†to the “Output Filesâ€. Then Xcode2 checks if any of the input files is newer than the output files and will start the build only if necessary.

I’m really confused about what follows “you’ll find now: … type this:”

Is there some information missing here?

When I do “go to “Project > New Target†and choose “Shell Script Targetâ€. Name the target “Makefile— then I get a pop-up window in XCode asking the Target Info - what needs to go in here?

If I just close the Target Info window, when I do “open the Target-Tree, open the target “Makefile†and double-click on “Run Script— then I get another pop-up window asking the Run Script Phase Info - what needs to go in the script window?

Thanks for any help here!

System:

XCode: 2.4.1

OSX: 10.4.11 (Intel Mac)

Hi 80,

no worries, bad error: the <code>Plugin in the wiki has been broken / downgraded and I haven’t noticed that!

It is now fixed and the code should be visible again:

http://www.midibox.org/dokuwiki/how_to_use_xcode2_as_ide_on_a_mac

Best,

Michael

Excellent - thanks for the fast fix!

Now I get 2 errors when I build - which I am counting as a success as at least XCode is doing something!

Cheers!  :slight_smile:

no worries, bad error: the <code>Plugin in the wiki has been broken / downgraded and I haven’t noticed that!

I spotted that a while back… The good news is, bash highlighting (and the others) still work - you just need to edit the page and save it again. I hope it’s OK, I restored the old version and you can see it is working fine now :slight_smile:

I finally got XCode compiling the skeleton application without any errors this morning while eating my cornflakes. I had to copy the tools folder into the XCode project root and then it worked fine.

Thanks again for the fast help. Am constantly impressed with this forum.  8) 8)

you’re welcome.

I really do love working with Xcode… so I hope it was worth sharing this knowledge  :smiley: