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

cflags and stderr

Thread Next
From:
Dave Mitchell
Date:
November 24, 2013 16:10
Subject:
cflags and stderr
Message ID:
20131124161035.GR10295@iabyn.com
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)'" $@`

.c$(OBJ_EXT): 
	$(CCCMD) $(PLDLFLAGS) $*.c

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
to
    echo $args
    exec $args

(loosely speaking) and remove the backticks from Makefile?


-- 
Never work with children, animals, or actors.

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