Re: ping: Use sed -n … instead of sed s/…/p -e d in s-header-vars
Il 15/05/2012 16:18, Olivier Hainque ha scritto: rm -f tmp-header-vars ! # The first sed gets the list header variables as the list variables ! # assigned in Makefile and having _H at the end of the name. sed -n proved ! # more portable than a trailing -e d to filter out the uninteresting lines, ! # in particular on ia64-hpux where s/.../p only prints if -n was requested ! # as well. ! $(foreach header_var,$(shell sed Makefile -n -e 's/^\([A-Z0-9_]*_H\)[ ]*=.*/\1/p'),echo $(header_var)=$(shell echo $($(header_var):$(srcdir)/%=.../%) | sed -e 's~\.\.\./config/~config/~' -e 's~\.\.\..*/~~') tmp-header-vars;) \ $(SHELL) $(srcdir)/../move-if-change tmp-header-vars b-header-vars $(STAMP) s-header-vars Ok. Paolo
Re: ping: Use sed -n … instead of sed s/…/p -e d in s-header-vars
On May 16, 2012, at 08:29 , Paolo Bonzini wrote: Ok. Applied, Thanks Paolo :) Opinion on http://gcc.gnu.org/ml/gcc-patches/2012-04/msg00274.html ? Thanks in advance, Olivier
Re: ping: Use sed -n … instead of sed s/…/p -e d in s-header-vars
*** /tmp/dL6Ouq_Makefile.tpl 2012-04-05 14:37:34.144103910 +0200 --- Makefile.tpl 2012-04-04 22:03:53.822060326 +0200 *** install.all: install-no-fixedincludes *** 906,916 true ; \ fi ! # install-no-fixedincludes is used because Cygnus can not distribute ! # the fixed header files. .PHONY: install-no-fixedincludes install-no-fixedincludes: installdirs install-host-nogcc \ ! install-target gcc-no-fixedincludes .PHONY: install-strip install-strip: --- 906,917 true ; \ fi ! # install-no-fixedincludes is used to allow the elaboration of binary packages ! # suitable for distribution, where we cannot include the fixed system header ! # files. .PHONY: install-no-fixedincludes install-no-fixedincludes: installdirs install-host-nogcc \ ! install-target gcc-install-no-fixedincludes .PHONY: install-strip install-strip: This is missing in the ChangeLog. *** check-gcc-[+language+]: *** 1443,1467 check-[+language+]: check-gcc-[+language+][+ FOR lib-check-target +] [+ lib-check-target +][+ ENDFOR lib-check-target +] [+ ENDFOR languages +] ! # Install the gcc headers files, but not the fixed include files, ! # which Cygnus is not allowed to distribute. This rule is very ! # dependent on the workings of the gcc Makefile.in. ! .PHONY: gcc-no-fixedincludes ! gcc-no-fixedincludes: @if [ -f ./gcc/Makefile ]; then \ - rm -rf gcc/tmp-include; \ - mv gcc/include gcc/tmp-include 2/dev/null; \ - mkdir gcc/include; \ - cp $(srcdir)/gcc/gsyslimits.h gcc/include/syslimits.h; \ - touch gcc/stmp-fixinc gcc/include/fixed; \ - rm -f gcc/stmp-headers gcc/stmp-int-hdrs; \ r=`${PWD_COMMAND}`; export r; \ ! s=`cd $(srcdir); ${PWD_COMMAND}` ; export s; \ $(HOST_EXPORTS) \ ! (cd ./gcc \ !$(MAKE) $(GCC_FLAGS_TO_PASS) install); \ ! rm -rf gcc/include; \ ! mv gcc/tmp-include gcc/include 2/dev/null; \ else true; fi @endif gcc --- 1444,1459 check-[+language+]: check-gcc-[+language+][+ FOR lib-check-target +] [+ lib-check-target +][+ ENDFOR lib-check-target +] [+ ENDFOR languages +] ! # The gcc part of install-no-fixedincludes, which relies on an intimate ! # knowledge of how a number of gcc internal targets (inter)operate. Delegate. ! .PHONY: gcc-install-no-fixedincludes ! gcc-install-no-fixedincludes: @if [ -f ./gcc/Makefile ]; then \ r=`${PWD_COMMAND}`; export r; \ ! s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ ! (cd ./gcc \ ! $(MAKE) $(GCC_FLAGS_TO_PASS) install-no-fixedincludes); \ else true; fi @endif gcc *** /tmp/jqbGTw_Makefile.in 2012-04-05 14:37:34.157109608 +0200 --- gcc/Makefile.in 2012-04-04 22:03:53.823228924 +0200 *** gcov-dump$(exeext): $(GCOV_DUMP_OBJS) $( *** 4013,4022 --- 4013,4028 # Build the include directories. stmp-int-hdrs: $(STMP_FIXINC) $(USER_H) fixinc_list # Copy in the headers provided with gcc. + # # The sed command gets just the last file name component; # this is necessary because VPATH could add a dirname. # Using basename would be simpler, but some systems don't have it. + # # The touch command is here to workaround an AIX/Linux NFS bug. + # + # The move-if-change + cp -p twists for limits.h are intended to preserve + # the time stamp when we regenerate, to prevent pointless rebuilds during + # e.g. install-no-fixedincludes. -if [ -d include ] ; then true; else mkdir include; chmod a+rx include; fi -if [ -d include-fixed ] ; then true; else mkdir include-fixed; chmod a+rx include-fixed; fi for file in .. $(USER_H); do \ *** stmp-int-hdrs: $(STMP_FIXINC) $(USER_H) *** 4065,4072 fi; \ $(mkinstalldirs) $${fix_dir}; \ chmod a+rx $${fix_dir} || true; \ rm -f $${fix_dir}/limits.h; \ ! mv tmp-xlimits.h $${fix_dir}/limits.h; \ chmod a+r $${fix_dir}/limits.h; \ done # Install the README --- 4071,4080 fi; \ $(mkinstalldirs) $${fix_dir}; \ chmod a+rx $${fix_dir} || true; \ + $(SHELL) $(srcdir)/../move-if-change \ + tmp-xlimits.h tmp-limits.h; \ rm -f $${fix_dir}/limits.h; \ ! cp -p tmp-limits.h $${fix_dir}/limits.h; \ chmod a+r $${fix_dir}/limits.h; \ done # Install the README *** stmp-fixinc: gsyslimits.h macro_list fix *** 4168,4173 --- 4176,4225 fi $(STAMP) stmp-fixinc # + + # Install with the gcc headers files, not the fixed include files, which we + # are typically not allowed to distribute. The general idea is to: + # - Get to install with a bare set of internal headers, not the + #fixed system ones, + # - Prevent rebuilds of
Re: ping: Use sed -n … instead of sed s/…/p -e d in s-header-vars
On May 16, 2012, at 11:47 , Paolo Bonzini wrote: install-no-fixedincludes: installdirs install-host-nogcc \ !install-target gcc-install-no-fixedincludes ... This is missing in the ChangeLog. Indeed. + install-no-fixedincludes: \ +stash-maybefixed-headers \ +stmp-int-hdrs \ +restore-header-stamps \ +install \ +restore-maybefixed-headers This is not safe for parallel build. Ah, right. What about install-no-fixedincludes: ... contents of stash-maybefixed-headers ... $(MAKE) $(FLAGS_TO_PASS) stmp-int-hdrs ... contents of restore-header-stamps ... $(MAKE) $(FLAGS_TO_PASS) install ... contents of restore-maybefixed-headers ... ? Hmm, fine with me. I liked the use of separate targets to help provide a high level view of what the sequence is doing but each step is short enough for the inline inclusion not to damage readability. I'll post a followup patch+ChangeLog on the original thread. Thanks much for your prompt feedback :) Olivier
Re: Use sed -n … instead of sed s/…/p -e d in s-header-vars
On 5/14/2012 11:22 PM, Hans-Peter Nilsson wrote: Random non-maintainer comments: I'd suggest adding a nearby comment to avoid a future edit changing it back. The attachment with the patch had the mime-type Video/X-DV, maybe indicating an issue with your mail-client setup mismatching the .dif filename suffix. As always, comments about what you didn't do and why you didn't do it, are often the most important (and note that code can never be self-documenting in this regard :-)) brgds, H-P
Re: Use sed -n … instead of sed s/…/p -e d in s-header-vars
Hello Hans, On May 15, 2012, at 05:22 , Hans-Peter Nilsson wrote: * Makefile.in (s-header-vars): Resort to -n instead of trailing -e d in sed invocation. Random non-maintainer comments: I'd suggest adding a nearby comment to avoid a future edit changing it back. Sure. The attachment with the patch had the mime-type Video/X-DV, maybe indicating an issue with your mail-client setup mismatching the .dif filename suffix. Ah, right. I have added a comment, regenerated the patch with a .diff extension and will take the opportunity to ping. Thanks for your comments, With Kind Regards, Olivier
ping: Use sed -n … instead of sed s/…/p -e d in s-header-vars
Hello, Ping for http://gcc.gnu.org/ml/gcc-patches/2012-04/msg01896.html New patch attached. Following Hans suggestion, I have added a comment to prevent going back to the original scheme and problem in the future. Thanks in advance for your feedback, With Kind Regards, Olivier On Apr 30, 2012, at 18:55 , Olivier Hainque wrote: sed s/…/p -e d as used in s-header-vars doesn't work on at least ia64-hpux, where s/.../p only prints out if -n was requested as well. ... * Makefile.in (s-header-vars): Resort to -n instead of trailing -e d in sed invocation. sed-n.diff Description: Binary data
Re: Use sed -n … instead of sed s/…/p -e d in s-header-vars
On Mon, 30 Apr 2012, Olivier Hainque wrote: Hello, sed s/?/p -e d as used in s-header-vars doesn't work on at least ia64-hpux, where s/.../p only prints out if -n was requested as well. The attached patch fixes this by using '-n' instead of a trailing '-e d' * Makefile.in (s-header-vars): Resort to -n instead of trailing -e d in sed invocation. Random non-maintainer comments: I'd suggest adding a nearby comment to avoid a future edit changing it back. The attachment with the patch had the mime-type Video/X-DV, maybe indicating an issue with your mail-client setup mismatching the .dif filename suffix. brgds, H-P
Use sed -n … instead of sed s/…/p -e d in s-header-vars
Hello, sed s/…/p -e d as used in s-header-vars doesn't work on at least ia64-hpux, where s/.../p only prints out if -n was requested as well. The attached patch fixes this by using '-n' instead of a trailing '-e d' We have been using this on all our gcc-4.5 based configurations for a couple of years now. Bootstrapped and regtested with mainline on x86_64-linux-gnu. OK to commit ? Thanks in advance, With Kind Regards, Olivier 2012-04-30 Olivier Hainque hain...@adacore.com * Makefile.in (s-header-vars): Resort to -n instead of trailing -e d in sed invocation. sed-n.dif Description: video/dv