This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: configure --with-as broken


Alexandre Oliva <oliva@dcc.unicamp.br> writes:

|> Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> writes:
|> 
|> > Alexandre Oliva <oliva@dcc.unicamp.br> writes:
|> > |> Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> writes:
|> > |> 
|> > |> > The test in configure that checks the value of $AS should be skipped when
|> > |> > it is not an absolute file name, because $AS is always set due to
|> > |> > $GCC_FLAGS_TO_PASS in the toplevel Makefile.
|> > |> 
|> > |> But AS is only set as a make variable, not as an environment variable, 
|> 
|> > Surely it is passed in the environment by make.  *Note
|> > (make)Environment::.
|> 
|> But gcc/configure is not run by a sub-make, is it?

Yes, it is.  See the config.status target in gcc/Makefile.  The nice thing
about GNU make is that it automatically rebuilds makefiles.

|> TEST = foo
|> all: test test2 test3 test4
|> test:
|> 	echo $$TEST
|> test2:
|> 	$(MAKE) test
|> script:
|> 	echo "#! /bin/sh" > $@
|> 	echo 'echo $$TEST' >> $@
|> 	chmod +x script
|> 	cat script
|> test3: script
|> 	./script
|> test4:
|> 	$(MAKE) test3
|> 
|> Running this makefile with GNU make 3.76.1 and 3.77 would only print
|> blank lines whenever `foo' should be printed according to your
|> suggestion.  But then, other make programs, or older versions of GNU
|> make, may be broken with this respect.  Does anyone know of any make
|> program for which `make | grep foo' succeeds, i.e., prints at least
|> one line?

$ make TEST=bar | grep -c bar
4

-- 
Andreas Schwab                                      "And now for something
schwab@issan.cs.uni-dortmund.de                      completely different"
schwab@gnu.org


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]