This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch ada]: Last fix for PR ada/47163 on windows native hosts


On 4/5/2011 12:11 PM, Arnaud Charlet wrote:
>> As a side issue, it ALSO seems to me that Ada's Mafile.in is doing it
>> wrong, given Ralf's statements above:
>>
>> 	# Copy target independent sources
>>         $(foreach f,$(ADA_INCLUDE_SRCS) $(LIBGNAT_SRCS), \
>>           $(LN_S) $(fsrcpfx)ada/$(f) $(RTSDIR) ;) true
>>
>> But as this isn't shell code (some sort of Ada buildfile? I'm not
>> familiar with building Ada),
> 
> This is standard GNU make code.

Sorry, I always have to check the manual for the more unusual features
of make...like everything in Functions:: node.

>> I'm not sure exactly how to "fix" it in the
>> event LN_S is ACTUALLY defined as "ln -s" or "ln" (which, recall, is NOT
>> the case on MSYS, which apparently uses cp -p).
> 
> There is nothing broken here as far as I can tell, so nothing to "fix" here.

According to 'info Autoconf --index LN_S' as quoted by Ralf, it is not
*portable* to do
	$(LN_S) a_file a_dir
because it behaves differently depending on whether LN_S is "ln -s",
"ln" (or, as in this case, "cp -p"). This:
	$(LN_S) $(fsrcpfx)ada/$(f) $(RTSDIR)
fits that non-portable pattern -- assuming $(f) is always a file, and
$(RTSDIR) is actually a directory.  Ralf recommends that, for
portability, it should be changed to something like

	(cd $(RTSDIR) && $(LN_S) ??? $(basename $(f)) )

The only problem is how to express $(fsrcpfx)ada/$(f) as a relative path
from RTSDIR, or as an absolute path (maybe that's not a problem; I'm
unsure how fsrcpfx is defined).

--
Chuck


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]