Joseph Ayers wrote:
Adrian:
I'm attempting to revitalize some old pascal projects. I've unfortunately installed XCode 2.2 and all of the GPC stuff, and indeed the example projects work like a charm.
This is surprising, because with Xcode 2.2 and 2.2.1 you need a workaround for a bug in Xcode. The workaround can be found in the MacPascal mailing list archives http://lists.sonic.net/mailman/private/mac-pascal/ in the thread "[MacPascal] FPC -> GPC -- what are the consequences?". I am duplicating some of it below, but generally questions about Xcode are best asked on the MacPascal mailing list rather than here.
When I import one of my old CodeWarrior Pascal projects, XCode doesn't know about the CPG compiler (in the edit active target window, which is entirely different than the example CPG projects.. I notice from creating a new project that there is a Make file, etc. What do I need to do to the imported projects to make them behave?
The answer is that it doesn't work (sorry) because GPC doesn't use Xcode's native build system, but a Makefile instead (as you noticed) and this is for the following reasons:
1. Apple's native Xcode build system is closed and very unfriendly towards compilers other than for the C family 2. Apple is too arrogant to fix the bugs in Xcode's build system(s)
So, I can only refer you to the examples, templates and Readme file of the GPC Xcode Kit (and the MacPascal mailing list for additional questions).
Regards,
Adriaan van Os
_______________________________________________ MacPascal mailing list MacPascal@listman.sonic.net http://lists.sonic.net/mailman/listinfo/mac-pascal
steven.borley wrote:
Hi Adriaan,
Some time ago...
On 17 Dec 2005, at 17:54, Adriaan van Os wrote:
If you prefer Xcode 2.2, I can explain how to work around the stupid Xcode 2.2 bug (it's not difficult)
Please could you explain the work around for me :-)
With the current GPC Xcode Kit, create a new project, using one of the GNU Pascal templates. Double-click on the Deploy or Debug Target and look at the Arguments line. It reads something like:
$(ACTION)_application_pack
The actual text of the Arguments line will vary with the template choosen, so "_application_pack" is just an example. The bug in Xcode 2.2 is that "_application_pack" (or a similar value) is not passed to the build system if $(ACTION) is empty. Of course, the dumbos at Apple that maintain Xcode will never fix it.
To work around it, open the Makefile that was created for the project and edit it as follows:
Change
# Make-targets for build
.PHONY : _tool _tool: compile_tool create_tool
to
# Make-targets for build
.PHONY : default default: _application_pack # Xcode 2.2 bug
.PHONY : _tool _tool: compile_tool create_tool
Again, "_application_pack" is just an example and it has to be replaced by the actual value you found in the Arguments line of the Target.
That's all. Let me know if it works.