subst and sed dance

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9340 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Lars Gullik Bjønnes 2004-12-04 12:45:48 +00:00
parent 4048edc864
commit eb513cccee
3 changed files with 23 additions and 13 deletions

View File

@ -1,3 +1,12 @@
2004-12-04 Lars Gullik Bjonnes <larsbj@gullik.net>
* 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 <larsbj@gullik.net>
* lyxinclude.m4: next version of gcc will be 4.0 not 3.5

View File

@ -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"

View File

@ -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