FAQ
Hi,

For a couple years I've wanted for there to be a 'make diff' command
that I could run before doing 'make install'. The idea is that it would
compare the versions of files it's about to install to already installed
files, and show a diff for each changed file, or indicate new files.

What's the best place to add such functionality? I'd prefer to add it
to one of the Perl modules and call that code in the 'make' target,
rather than trying to write the whole thing in the makefile.

If it looks reasonable, I'll try to take a stab at this before TPC.

p.s. - I'm not on this list, but I can join if there's going to be any
significant discussion about this.

p.p.s. - I initially sent this message to [email protected] ,
but the message bounced with the error "no route to host".


------------------- -------------------
Ken Williams Last Bastion of Euclidity
ke[email protected] The Math Forum

Search Discussions

  • Schwern at Jul 18, 2001 at 10:29 pm

    On Wed, Jul 18, 2001 at 05:00:19PM -0500, Ken Williams wrote:
    What's the best place to add such functionality? I'd prefer to add it
    to one of the Perl modules and call that code in the 'make' target,
    rather than trying to write the whole thing in the makefile.
    Work from the version of MakeMaker on CPAN. It's an alpha, so the
    CPAN shell won't find it.
    http://www.cpan.org/modules/by-authors/id/M/MS/MSCHWERN/ExtUtils-MakeMaker-5.47_01.tar.gz

    You'd be working on ExtUtils::MakeMaker and ExtUtils::MM_Unix
    primarily. The particularly tricky bit is finding the 'diff' program
    and dealing with the multitude of different versions and switches on
    different platforms. For example, many versions of diff don't support
    the prefered -u option.

    p.p.s. - I initially sent this message to [email protected] ,
    but the message bounced with the error "no route to host".
    [email protected] is the new mailing list.


    --
    Michael G Schwern <[email protected]> http://www.pobox.com/~schwern/
    Perl6 Quality Assurance <[email protected]> Kwalitee Is Job One
  • Ken Williams at Jul 18, 2001 at 10:52 pm

    [email protected] wrote:
    On Wed, Jul 18, 2001 at 05:00:19PM -0500, Ken Williams wrote:
    What's the best place to add such functionality? I'd prefer to add it
    to one of the Perl modules and call that code in the 'make' target,
    rather than trying to write the whole thing in the makefile.
    Work from the version of MakeMaker on CPAN. It's an alpha, so the
    CPAN shell won't find it.
    http://www.cpan.org/modules/by-authors/id/M/MS/MSCHWERN/ExtUtils-MakeMaker-5.47_01.tar.gz
    Good, thanks.
    You'd be working on ExtUtils::MakeMaker and ExtUtils::MM_Unix
    primarily. The particularly tricky bit is finding the 'diff' program
    and dealing with the multitude of different versions and switches on
    different platforms. For example, many versions of diff don't support
    the prefered -u option.
    The idea I had was to just use 'diff' without a full pathname (i.e. let
    the shell search $PATH), and to let the user add switches by doing
    'make diff -u' or whatever. If I can't get the switches to work that
    way (not sure whether 'make' allows it), I'll either skip switches or use
    an environment variable.
    p.p.s. - I initially sent this message to [email protected] ,
    but the message bounced with the error "no route to host".
    [email protected] is the new mailing list.
    Okay, after this message I'll stop Cc-ing p5p (unless someone thinks I
    should keep p5p in the loop) and move over to the MM list.


    ------------------- -------------------
    Ken Williams Last Bastion of Euclidity
    ke[email protected] The Math Forum
  • Russ Allbery at Jul 18, 2001 at 11:07 pm

    Ken Williams writes:

    The idea I had was to just use 'diff' without a full pathname (i.e. let
    the shell search $PATH), and to let the user add switches by doing 'make
    diff -u' or whatever. If I can't get the switches to work that way (not
    sure whether 'make' allows it),
    I'm pretty sure it doesn't.
    I'll either skip switches or use an environment variable.
    There definitely needs to be some way of adding switches. I recommend
    using a make variable so that you can type:

    make diff FLAGS=-u

    or the like.
  • Rich Lafferty at Jul 19, 2001 at 1:22 am

    On Wed, Jul 18, 2001 at 05:52:53PM -0500, Ken Williams ([email protected]) wrote:

    The idea I had was to just use 'diff' without a full pathname (i.e. let
    the shell search $PATH), and to let the user add switches by doing
    'make diff -u' or whatever. If I can't get the switches to work that
    way (not sure whether 'make' allows it), I'll either skip switches or use
    an environment variable.
    There's a pure-Perl diff by Mark-Jason Dominus at
    <http://language.perl.com/ppt/src/diff/>; it might be useful to use
    (part of?) that as either a default or fallback to get Usual Behavior
    on platforms that don't have diff(1) lying around.

    -Rich

    --
    Rich Lafferty --------------+-----------------------------------------------
    Montreal, Quebec, Canada | "Do not dangle the mouse by the cord or
    http://www.lafferty.ca/ | throw it at coworkers." -- SGI Indy manual
    [email protected] -----------+-----------------------------------------------
  • Barries at Jul 19, 2001 at 2:09 am

    On Wed, Jul 18, 2001 at 09:22:56PM -0400, Rich Lafferty wrote:
    On Wed, Jul 18, 2001 at 05:52:53PM -0500, Ken Williams ([email protected]) wrote:

    The idea I had was to just use 'diff' without a full pathname (i.e. let
    the shell search $PATH), and to let the user add switches by doing
    'make diff -u' or whatever. If I can't get the switches to work that
    way (not sure whether 'make' allows it), I'll either skip switches or use
    an environment variable.
    There's a pure-Perl diff by Mark-Jason Dominus
    I'm in need of that repackaged as a module for VCP, since VCP now
    depends on diff for some operations. If anyone repackages it to have
    the preferred -u output format in a module, please let me know. I'll get
    to it eventually and let you know, otherwise (not sure when, sometime
    this summer, I think).

    Thanks,

    Barrie

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupperl5-porters @
categoriesperl
postedJul 18, '01 at 9:59p
activeJul 19, '01 at 2:09a
posts6
users5
websiteperl.org

People

Translate

site design / logo © 2023 Grokbase