Re: Groups, shell scripts, yacc
Re: Groups, shell scripts, yacc
- Subject: Re: Groups, shell scripts, yacc
- From: Olger Warnier <email@hidden>
- Date: Sat, 22 Nov 2003 19:10:18 +0100
Hi Glen,
I have had the same issues and browsed the xcode mailing list.
The following works for me:
Open the info panel for your target and (rules tab):
Under rules add a new rule (the + button down in the screen)
As file type you choose Yacc source files
using: Custom Script
The custom script is as follows:
cd "$(DERIVED_FILE_DIR)/Yacc" && /usr/bin/bison -y -p eval -l -d -v
"$(INPUT_FILE_PATH)" -o yourCfileName.c
The output files should contain:
$(DERIVED_FILE_DIR)/Yacc/yourCfileName.h
$(DERIVED_FILE_DIR)/Yacc/yourCfileName.c
Now the build tab:
HEADER_SEARCH_PATHS = " $(DERIVED_FILES_DIR)/Yacc" (this is the Header
search paths item)
The generated C file (in the derived_file_dir) is automatically taken
along for compilation, you just need to add the path in order to find
the generated headder.
This sample uses bison instead of yacc, so probably you have to fiddle
a little with options of yacc.
Hopefully this will help you out.
Kind Regards,
Olger
On Nov 22, 2003, at 3:42 AM, Glen Low wrote:
Scott:
2. On a native target, how do you get the shell script build phase to
work? Must you enter in an input and output file, and these would be
relative to what?
In 1.0 you need to indicate input and output dependencies and the
paths
need to be project relative (absolute may also work).
I am totally lost here. Could you give me a simple example, e.g. copy
from x to y?
3. It seems yacc support is broken, the generated parser_yacc.sh
script has the wrong paths for the derived sources. Any clues to a
workaround? In particular, can you (and how do you) do a selective
override of particular target rules?
I suppose with a native target, Xcode doesn't look anymore at
/Developer/Makefiles/pbxjamfiles/ProjectBuilderJambase because any
changes I make there aren't reflected in the actual build -- is there
anywhere else Xcode looks or are the commands hard-coded into the
program?
Also, I did a get-info on the target, chose the rules tab, and put in
my own rule for Yacc using a custom (shell) script, however, it
doesn't seem to work or execute anything? Should I use Jam syntax and
what do I put for output file? Any clues?
4. It doesn't seem sufficient to add a internal, dependent framework
on to the target's Frameworks and Libraries, you need to add it to
the
Direct Dependencies if you want a rebuild triggered when the
dependent
framework changes?
Yes. All adding the framework to the Frameworks and Libraries build
phase does is tell the target to link against that framework. You need
to add the target that produces that framework to the target
dependencies to indicate that the framework target needs to be up to
date when building the other target.
OK.
Cheers, Glen Low
---
pixelglow software | simply brilliant stuff
www.pixelglow.com
_______________________________________________
xcode-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/xcode-users
Do not post admin requests to the list. They will be ignored.
_______________________________________________
xcode-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/xcode-users
Do not post admin requests to the list. They will be ignored.