develooper Front page | perl.perl5.porters | Postings from November 2004

Re: getting Config.pm on a diet

Thread Previous | Thread Next
From:
Craig A. Berry
Date:
November 26, 2004 14:26
Subject:
Re: getting Config.pm on a diet
Message ID:
p0611041cbdcd51cc90a1@[172.16.52.1]
At 8:58 PM +0000 11/26/04, Nicholas Clark wrote:
>I have this patch (the sort that won't fit into the margin of this e-mail)
>that cuts Config.pm down from about 32K to 3K by putting all the little used
>stuff in another file. With my patch I have configpm generating the two files.
>
>However, I have a problem, in that I don't know how to make the right rule
>for VMS to describe the dependencies and the necessary copying. In a Unix
>makefile a dependency such as
>
>foo bar: ...
>	...
>
>is the right way to specify that this rule builds both. What's the VMS
>equivalent to:
>
>lib/Config.pm lib/Config_heavy.pl: config.sh miniperl$(EXE_EXT) configpm Porting/Glossary
>	$(LDLIBPTH) ./miniperl -Ilib configpm --heavy=lib/Config_heavy.pl configpm.tmp
>	sh mv-if-diff configpm.tmp $@

Multiple targets are allowed -- it just expands it into two separate
dependencies that are identical except for the target.  So something
like the following oughta work:

[.lib]Config.pm [.lib]Config_heavy.pl : config.sh $(MINIPERL_EXE) configpm [.Porting]Glossary
	$(MINIPERL) configpm --heavy=[.lib]Config_heavy.pl configpm.tmp
	BACKUP/REPLACE/DELETE configpm.tmp $(MMS$TARGET)

We could get fancier with the mv, but I don't know exactly what
mv-if-diff does.  Will it update the timestamp on the target even if
it doesn't need to do the move?  Is it important that the timestamp
on lib/Config.pm *not* be updated unless the move actually took place?
-- 
________________________________________
Craig A. Berry
mailto:craigberry@mac.com

"... getting out of a sonnet is much more
 difficult than getting in."
                 Brad Leithauser

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About