From ae81a9ff42e471ad61ceac3cbb773ba96dd2e7df Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Tue, 20 Mar 2007 19:54:56 +0000 Subject: [PATCH] Again a major speed-up of parse_support_options(): use only one awk to do the whole job. Tested on Linux and Solaris. --- .gitattributes | 1 + Installation/config/support/parse_files.awk | 17 +++++++++ Installation/install_cgal | 42 ++++++--------------- 3 files changed, 30 insertions(+), 30 deletions(-) create mode 100644 Installation/config/support/parse_files.awk diff --git a/.gitattributes b/.gitattributes index 5149cf71427..e513cc9a6c6 100644 --- a/.gitattributes +++ b/.gitattributes @@ -678,6 +678,7 @@ Installation/config/support/S93-TAUCSFREEBSD -text Installation/config/support/S96-TAUCSDARWIN -text Installation/config/support/S98-TAUCSIRIXCC32 -text Installation/config/support/S99-TAUCSIRIXCC64 -text +Installation/config/support/parse_files.awk -text Interpolation/doc_tex/Interpolation/nn_coords.eps -text svneol=unset#application/postscript Interpolation/doc_tex/Interpolation/nn_coords.gif -text svneol=unset#image/gif Interpolation/doc_tex/Interpolation/nn_coords.ipe -text svneol=unset#application/postscript diff --git a/Installation/config/support/parse_files.awk b/Installation/config/support/parse_files.awk new file mode 100644 index 00000000000..1a44753239c --- /dev/null +++ b/Installation/config/support/parse_files.awk @@ -0,0 +1,17 @@ +BEGIN { + RPKGS=""; PKGS=""; + for (i = 1; i < ARGC; i++) { + pkg=ARGV[i]; sub(".*-","",pkg); + RPKGS=pkg " " RPKGS; PKGS=PKGS " " pkg; + }; + printf "SUPPORT_PKGS='%s'\n",PKGS; + printf "R_SUPPORT_PKGS='%s'\n",RPKGS; + FS=" *= *" +} +/(PROVIDES|DESCRIPTION|CXXFLAGS|LDFLAGS|LIBS|REQUIRES|INCOMPATIBLE|STDINCLDIRS|INCLTHING|STDLIBDIRS|LIBTHING|COMPILETESTFLAGS) *=/ { + sub(".*-","",FILENAME); + printf "%s_%s='",FILENAME,$1; + for (i=2; i