Scott,
The ClearCase 4.0 docs do not cover Sun C++ 5.0.
Here is what I came up with:
1) To compile C++ code that uses templates:
%.o: %.c++
-@rm -f $@
@rm -rf $@_cache; mkdir $@_cache
$(C++C) $(C++FLAGS) -c $(EXTRAFLAGS) $< -o $@_cache/$@
@mv -f $@_cache/$@ $@
@test -f $@_cache/SunWS_cache/CC_state || rm -fr $@_cache
@rm -f $@_cache/SunWS_cache/@_WARNING
This is necessary because the Sun C++ 5.0 -ptr option doesn't work.
The rm's keep the sibling DOs to a minimum.
2) To link C++ code with templates:
$(APP): $(APP_DEPS) $(OBJS)
-@rm -f $@
@rm -rf SunWS_cache
/vobs/tools/bin/mk_CC_state $(wildcard *.o_cache)
$(LINK++) $(LDFLAGS) -o $@ $(OBJS) $(LIB_PATHS)
@rm -rf SunWS_cache
The mk_CC_state program is a Perl script which combines the CC_states
of all the seperate objects into one CC_state file in the standard
SunWS_cache location, plus link (ln) the specified template .o files
from the seperate object directories to the standard one. In the case
of duplicate template .o files, I use the most recent modification date.
After the linking loader completes, the SunWS_cache directory is removed
to clean up the sibling DO of the temporary CC_state file.
3) I use:
.SIBLINGS_AFFECT_REUSE:
This seems to generate a very clean config rec, with no unnecessary
rebuilds and wink-ins work correctly.
Note, the $(wildcard *.o_cache) thingy requires GNU compatibility.
Danny
> Date: Wed, 5 Jan 2000 12:30:28 -0500 (EST)
> From: VOB administrator <vobadm.to@fp.cibc.com>
> Subject: [cciug] SunWSPro C++ 5.0 templates
>
> CCIUGers;
>
> Welcome to the year 19100. :-)
>
> We are trying to move our software from Sun C++ 4.2 to Sun C++ 5.0, which
> is more ANSI standard C++. We make some use of templates, and Sun has
> changed their template model and directories completely with this release.
>
> In the 3.2.1 Clearcase manual it talks a little about the Templates.DB/
> subdirectory that was used by the C++ 4.2 compiler, and discusses whether
> or not to use .SIBLINGS_IGNORED_FOR_REUSE and other issues.
>
> What about 5.0? Does the Clearcase 4.0 docs reference their new
> SunWS_cache/ cache model?
>
> Or has anyone else made this work with build avoidance / winkins etc.
>
> Thanks!
> Scott Gregory as vobadm
>
>
> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
>
---------------------------------------------------------------
Danny J. Zerkel - dzerkel@cas.org | Chemical Abstracts Service
Compuware Professional Services | Columbus, OH
---------------------------------------------------------------
"It is the explicit, legal opinion of my various employers that
nothing I say in this message should be construed as my various
employers' opinions unless explicitly stated as such."
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
This archive was generated by hypermail 2b29 : Sun May 06 2001 - 00:22:18 EDT