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

cflags and stderr

Thread Next
Dave Mitchell
November 24, 2013 16:10
cflags and stderr
Message ID:
The perl build process on UNIX currently uses a helper script called
cflags to build the command-line args needed for the C compiler. i.e.
Makefile looks like

CCCMD    = `sh $(shellflags) cflags "optimize='$(OPTIMIZE)'" $@`


and cflags writes its args to both stdout (to be picked up by the
backticks) and stderr (substituting for the normal output that make would
produce showing what command its running).

The problem with this is that stuff which is neither a warning nor an error
goes to stderr, cluttering up the output of make 2>/tmp/err.

Is there any reason that I can't change this to just force cflags to
*execute* the command rather than describing it?

i.e. change it from

    echo $args
    echo >2 $args
    echo $args
    exec $args

(loosely speaking) and remove the backticks from Makefile?

Never work with children, animals, or actors.

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About