bug-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Segmentation fault in make-3.81


From: Philip Guenther
Subject: Re: Segmentation fault in make-3.81
Date: Fri, 31 Jul 2009 12:53:13 -0700

On Fri, Jul 31, 2009 at 8:03 AM, Glenn
Coombs<address@hidden> wrote:
...
> I encountered this issue when I added the eval at line 18 so that I could
> set CHIPNAME to the uppercase of the filename stub.

Is there some reason that you didn't use the solution that works in
every version of make that has ever been written and instead used a
complex solution that only has a chance of working in the most recent
versions of a single make implementation?

%_struct.h: %_struct.def
ifdef VERBOSE
        CHIPNAME=`echo $* | tr a-z A-Z` ; \
        $(REGCONV) -chipname $$CHIPNAME $< -simout $@
else
        @CHIPNAME=`echo $* | tr a-z A-Z` ; \
        echo Creating regconv header file CHIPNAME=$$CHIPNAME: $(notdir $@) ; \
        $(REGCONV) -chipname $$CHIPNAME $< -simout $@
endif


If the duplication bugs you:

set_chipname = CHIPNAME=`echo $* | tr a-z A-Z`
regconv = $(REGCONV) -chipname $$CHIPNAME $< -simout $@
ifdef VERBOSE
  describe = echo "$(regconv)"
else
  describe = echo "Creating regconv header file CHIPNAME=$$CHIPNAME:
$(notdir $@)"
endif

%_struct.h: %_struct.def
        @${set_chipname}; ${describe}; ${regconv}


(Yeah, it's a bug in make that it crashes on your makefile...but that
makefile just seems like the wrong way to solve your problem.)


Philip Guenther




reply via email to

[Prev in Thread] Current Thread [Next in Thread]