incubator-stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Sebor <se...@roguewave.com>
Subject Re: [PING] Re: missing build line for 22.locale.codecvt.out
Date Mon, 10 Dec 2007 01:40:39 GMT

In the absence of further feedback I'll be checking in the following patch
as the fix for https://issues.apache.org/jira/browse/STDCXX-650.

Index: etc/config/makefile.rules
===================================================================
--- etc/config/makefile.rules   (revision 602767)
+++ etc/config/makefile.rules   (working copy)
@@ -87,9 +87,17 @@
     endif   # ifneq ($(AS_EXT),".")
   endif   # ifneq ($(AS_EXT),)
 
+# make the rule match for sources matching *.out.cpp
+%.out.o: %.out.cpp
+       $(CXX) -c $(CPPFLAGS) $(CXXFLAGS) $(call CXX.repo,$<) $<
+
 %.o: %.cpp
        $(CXX) -c $(CPPFLAGS) $(CXXFLAGS) $(call CXX.repo,$<) $<
 
+# make the rule match for objects matching *.out.o
+%.out: %.out.o
+       $(LD) $< -o $@ $(LDFLAGS) $(LDLIBS) $(call CXX.repo,$<)
+
 %: %.o
        $(LD) $< -o $@ $(LDFLAGS) $(LDLIBS) $(call CXX.repo,$<)


Martin Sebor wrote:
> 
> Well, what do you think?
> 
> Martin
> 
> 
> Martin Sebor wrote:
>> 
>> Travis Vitek wrote:
>> [...]
>>> So now we are pretty sure we know what is happening. All target names
>>> that
>>> end in .out will match to the pattern rule for generating .out files
>>> first.
>>> The question is how to fix it. Here are the options I see.
>> 
>> Thanks for the analysis!
>> 
>>> 
>>>     1. rename the source file so the generated executable will not end
>>> in
>>> .out
>>>     2. change the .out rule to generate output files with some other
>>> extension
>>>     3. create an rule that is a better match than %.out so that rule is
>>> selected for 22.locale.codecvt.out
>>>     4. create a new makefile that includes the original GNUmakefile.tst,
>>> but
>>> defines the more explicit rule mentioned in 3
>>> 
>>> I dislike option 3 the most,
>> 
>> Between 2 and 3 I think I actually like 3 better. It seems general
>> enough to eliminate all ill-effects of the overly generic %.out: %
>> rule. And it's very simple (at least in my tests it was):
>> 
>> %.foo: %.foo.c
>> 	touch $@
>> 
>>> and from the sound of it you won't want to use
>>> option 1. So how does option 2 sound?
>> 
>> Another possibility might be to enable the %.out: % rule only for
>> examples and disable it for tests and everything else work? We don't
>> need to create .out files anywhere else, do we?
>> 
>> Martin
>> 
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/missing-build-line-for-22.locale.codecvt.out-tp12503279p14245955.html
Sent from the stdcxx-dev mailing list archive at Nabble.com.


Mime
View raw message