From: Steve Reinhardt (spr_at_SGI_dot_com)
Date: Mon Nov 28 2005 - 11:44:49 PST
Hi Dan (and Jason), Yes, Dan's interpretation of my question was the one I intended. Thanks for the info. Steve P.S. Doesn't seem like much traffic on this alias. Am I the only one without the secret decoder ring? At 08:41 PM 11/26/2005, Dan Bonachea wrote: >At 08:05 AM 11/26/2005, Steve Reinhardt wrote: >>Hi all, >> I'm modifying a frequent subgraph code to use UPC. It >> uses GNU make to build it. I'm not finding any examples of how to >> automatically create dependencies for .upc files. Does somebody >> have an example of that? Thanks. >> Steve > >Interesting question... > >We've never considered this specific need before in Berkeley UPC, >but I believe you can accomplish the required behavior using the >upcc -Wp, option, which passes arbitrary arguments to the preprocessor. > >So for example, you could do something like this to generate >dependencies on a BUPC install with gcc as the backend compiler: > >upcc -Wp,-M -E hello.upc > >Note that Berkeley UPC renames *.upc to *.c before preprocessing, so >you may need to replace "hello.c" with "hello.upc" in the output to >get the proper behavior. We also tack on an initial #line directive >to every -E compilation. You can take care of both problems with >something like: > >upcc -Wp,-M -E hello.upc | perl -pe 's/^#\s*line.*$//;s/: (\S+).c/: $1.upc/' > > >Hope this helps... >Dan > >