'realclean' cleans up all files specified in 'OBJECT'

[email protected] ("Sisyphus")
Newsgroups perl.makemaker
Message-ID <2C1E2E3CEBB748FBAF5720710C8A92E3@desktop2>
Hi,
Using EU::MM-6.36.
On Win32, I've been doing stuff in a Makefile.PL like:

===========================
.
.
# If we're using an MS compiler we need to additionally link
# to MinGW's libgcc.a (for this particular module).
if($Config{cc} eq 'cl') {
  $hash{OBJECT} = '/full/path/to/libgcc.a';
}
WriteMakefile(%hash);
===========================

Unfortunately running 'nmake realclean' will now clean up libgcc.a ... which 
is not what I really wanted to happen.
I want 'realclean' to simply clean up all of the "derived files" - as per 
the documentation. I deduce that 'OBJECT' is therefore reserved for "derived 
files" and that there must be a better way to conditionally link to 
pre-existing libraries that have an extension that differs from 
$Config{lib_ext}.

How *should* I be doing it ?

Doing it with 'LIBS' is probably not all that straightforward as 
'-L/full/path/to -lgcc' will look for '/full/path/to/libgcc.lib' and fail to 
find '/full/path/to/libgcc.a'. (Note that $Config{lib_ext} is usually '.lib' 
when Sconfig{cc} is 'cl'.)

Cheers,
Rob
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.