From eb513ccceef20ce193207cbd0bb650ca02742bd3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lars=20Gullik=20Bj=C3=B8nnes?= Date: Sat, 4 Dec 2004 12:45:48 +0000 Subject: [PATCH] subst and sed dance git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9340 a592a061-630c-0410-9148-cb99ea01b6c8 --- config/ChangeLog | 11 ++++++++++- config/common.am | 11 ++++++----- config/lyxinclude.m4 | 14 +++++++------- 3 files changed, 23 insertions(+), 13 deletions(-) diff --git a/config/ChangeLog b/config/ChangeLog index 2981d4a044..4ae2b9184f 100644 --- a/config/ChangeLog +++ b/config/ChangeLog @@ -1,3 +1,12 @@ +2004-12-04 Lars Gullik Bjonnes + + * common.am ($(PCH_FILE)): do a subst and sed dance to get rid of + the PCH_FLAGS from the command line when generating the + precompiled header. + + * lyxinclude.m4 (lyx_pch_comp): use CPPFLAGS instead of CXXFLAGS + for warning flags. 3.5 -> 4.0 for next gcc version + 2004-11-16 Lars Gullik Bjonnes * lyxinclude.m4: next version of gcc will be 4.0 not 3.5 @@ -5,7 +14,7 @@ 2004-11-16 Lars Gullik Bjonnes * lyxinclude.m4 (enable_debug): Add support for stdlibc++ concept - checks on gcc >3.4. + checks on gcc >3.4. 2004-10-23 Georg Baum diff --git a/config/common.am b/config/common.am index f2b0617747..b155c096c8 100644 --- a/config/common.am +++ b/config/common.am @@ -11,16 +11,17 @@ AM_INSTALL_DATA_FLAGS = $(INSTALL) -m 644 -D AM_ETAGSFLAGS = --lang=c++ if LYX_BUILD_PCH -PCH_FLAGS = -Winvalid-pch --include=./pch.h +PCH_SOURCE = $(srcdir)/pch.h +PCH_FLAGS = -Winvalid-pch --include=$(PCH_SOURCE) PCH_FILE = ./pch.h.gch -PCH_SOURCE = ./pch.h sinclude ./pch.h.gch.dep *.C *.cpp: $(PCH_FILE) -pch.h.gch: $(PCH_SOURCE) - $(CXX) $(DEFS) $(DEFAULT_INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(CXXFLAGS) \ +$(PCH_FILE): $(PCH_SOURCE) + TMPCMD=` echo $(CXXCOMPILE) | sed -e s,\",\',` ; \ + PATTERN=`echo $(PCH_FLAGS) | sed -e 's,\/,\\\/,'` ; \ + $${TMPCMD/$$PATTERN} \ -x c++-header $(PCH_SOURCE) -MT $@ -MD -MP -MF "./$@.Tdep" \ && mv "./$@.Tdep" "./$@.dep" || rm "./$@.Tdep" diff --git a/config/lyxinclude.m4 b/config/lyxinclude.m4 index b0b1b6c07e..0b90f4e912 100644 --- a/config/lyxinclude.m4 +++ b/config/lyxinclude.m4 @@ -213,7 +213,7 @@ if test x$GXX = xyes; then 3.1*) CXXFLAGS="$lyx_opt -finline-limit=500 -fno-exceptions";; 3.2*) CXXFLAGS="$lyx_opt -fno-exceptions";; 3.3*) CXXFLAGS="$lyx_opt -fno-exceptions";; - 3.4*|3.5*) + 3.4*|4.0*) CXXFLAGS="$lyx_opt -fno-exceptions" lyx_pch_comp=yes;; *) CXXFLAGS="$lyx_opt";; @@ -234,12 +234,12 @@ if test x$GXX = xyes; then fi if test x$enable_warnings = xyes ; then case $gxx_version in - 2.95.*) CXXFLAGS="$CXXFLAGS -W -Wall";; - 2.96*) CXXFLAGS="$CXXFLAGS -W -Wall";; - 3.1*) CXXFLAGS="$CXXFLAGS -W -Wall";; - 3.2*) CXXFLAGS="$CXXFLAGS -W -Wall";; - 3.3*) CXXFLAGS="$CXXFLAGS -W -Wall";; - *) CXXFLAGS="$CXXFLAGS -Wextra -Wall";; + 2.95.*) CPPFLAGS="$CPPFLAGS -W -Wall";; + 2.96*) CPPFLAGS="$CPPFLAGS -W -Wall";; + 3.1*) CPPFLAGS="$CPPFLAGS -W -Wall";; + 3.2*) CPPFLAGS="$CPPFLAGS -W -Wall";; + 3.3*) CPPFLAGS="$CPPFLAGS -W -Wall";; + *) CPPFLAGS="$CPPFLAGS -Wextra -Wall";; esac fi fi