[PATCH] Add GETCONF_DIR to UNSECURE_ENVVARS, allow cross-installs

Andreas Schwab schwab@suse.de
Fri Nov 26 11:02:00 GMT 2004


Jakub Jelinek <jakub@redhat.com> writes:

> @@ -263,12 +264,16 @@ bug-glob2-ENV = MALLOC_TRACE=$(objpfx)bu
>  $(objpfx)bug-glob2-mem: $(objpfx)bug-glob2.out
>  	$(common-objpfx)malloc/mtrace $(objpfx)bug-glob2.mtrace > $@
>  
> -$(inst_libexecdir)/getconf: $(objpfx)getconf FORCE
> +$(inst_libexecdir)/getconf: $(objpfx)getconf $(objpfx)getconf.speclist FORCE
>  	$(addprefix $(..)./scripts/mkinstalldirs ,\
>  		    $(filter-out $(wildcard $@),$@))
> -	for spec in `LC_ALL=C GETCONF_DIR=/dev/null \
> -		     $(run-program-prefix) $< \
> -		     _POSIX_V6_WIDTH_RESTRICTED_ENVS`; do \
> -		$(INSTALL_PROGRAM) $< $@/$$spec.new; \
> -		mv -f $@/$$spec.new $@/$$spec; \
> +	for spec in `cat $(objpfx)getconf.speclist`; do \
> +	  $(INSTALL_PROGRAM) $< $@/$$spec.new; \
> +	  mv -f $@/$$spec.new $@/$$spec; \

The exit code of $(INSTALL_PROGRAM) should not be ignored.

>  	done
> +
> +$(objpfx)getconf.speclist: getconf.speclist.h
> +	$(CC) -E $(CFLAGS) $(CPPFLAGS) $< \
> +	  | sed -n -e '/START_OF_STRINGS/,$${/_POSIX_V6_/{s/^[^"]*"//;s/".*$$//;p}}' \
> +	  > $@.new
> +	mv -f $@.new $@

I think FORCE should be changed to $(+force), and maybe the second rule
should use a stamp file or even proper dependencies.

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."



More information about the Libc-hacker mailing list