diff --git a/ChangeLog b/ChangeLog index 94969c2bde..4ef00d28c0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2004-08-18 Lars Gullik Bjonnes + + * More pch work. + 2004-08-03 Jean-Marc Lasgouttes * configure.ac: instead of the previous code (which does not @@ -6,7 +10,7 @@ 2004-07-26 Lars Gullik Bjonnes * configure.ac: add code that some xforms tests are run only once - even if both xforms and gtk are configured. + even if both xforms and gtk are configured. 2004-06-09 Jean-Marc Lasgouttes diff --git a/boost/libs/filesystem/src/.cvsignore b/boost/libs/filesystem/src/.cvsignore index 79974082a7..a136b96fad 100644 --- a/boost/libs/filesystem/src/.cvsignore +++ b/boost/libs/filesystem/src/.cvsignore @@ -4,3 +4,5 @@ libboostfilesystem.la *.lo .libs .deps +pch.h.gch +pch.h.gch.dep diff --git a/boost/libs/filesystem/src/Makefile.am b/boost/libs/filesystem/src/Makefile.am index 816dbf3f26..9dec9cd315 100644 --- a/boost/libs/filesystem/src/Makefile.am +++ b/boost/libs/filesystem/src/Makefile.am @@ -4,7 +4,8 @@ noinst_LTLIBRARIES = libboostfilesystem.la INCLUDES = $(BOOST_INCLUDES) -AM_CXXFLAGS = -DBOOST_USER_CONFIG="" +AM_CPPFLAGS = -DBOOST_USER_CONFIG="" +AM_CXXFLAGS = $(PCH_FLAGS) libboostfilesystem_la_SOURCES = \ convenience.cpp \ diff --git a/boost/libs/filesystem/src/pch.h b/boost/libs/filesystem/src/pch.h new file mode 100644 index 0000000000..cea42f8876 --- /dev/null +++ b/boost/libs/filesystem/src/pch.h @@ -0,0 +1,19 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include // for remove, rename +#include +#include // SGI MIPSpro compilers need this +#include // SGI MIPSpro compilers need this +#include +#include // last_write_time() uses stat() +#include diff --git a/boost/libs/regex/src/.cvsignore b/boost/libs/regex/src/.cvsignore index eefa291c0d..dfe394aaab 100644 --- a/boost/libs/regex/src/.cvsignore +++ b/boost/libs/regex/src/.cvsignore @@ -4,3 +4,5 @@ libboostregex.la *.lo .deps .libs +pch.h.gch +pch.h.gch.dep diff --git a/boost/libs/regex/src/Makefile.am b/boost/libs/regex/src/Makefile.am index 6cf9cfe723..f3c874bd10 100644 --- a/boost/libs/regex/src/Makefile.am +++ b/boost/libs/regex/src/Makefile.am @@ -4,7 +4,8 @@ noinst_LTLIBRARIES = libboostregex.la INCLUDES = $(BOOST_INCLUDES) -AM_CXXFLAGS = -DBOOST_USER_CONFIG="" +AM_CPPFLAGS = -DBOOST_USER_CONFIG="" +AM_CXXFLAGS = $(PCH_FLAGS) libboostregex_la_SOURCES = \ cpp_regex_traits.cpp \ diff --git a/boost/libs/regex/src/pch.h b/boost/libs/regex/src/pch.h new file mode 100644 index 0000000000..eee63a3976 --- /dev/null +++ b/boost/libs/regex/src/pch.h @@ -0,0 +1,14 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include diff --git a/boost/libs/signals/src/.cvsignore b/boost/libs/signals/src/.cvsignore index df67e8ff7b..9056e6188b 100644 --- a/boost/libs/signals/src/.cvsignore +++ b/boost/libs/signals/src/.cvsignore @@ -4,3 +4,5 @@ libboostsignals.la *.lo .deps .libs +pch.h.gch +pch.h.gch.dep diff --git a/boost/libs/signals/src/Makefile.am b/boost/libs/signals/src/Makefile.am index 0bbec6fd50..3f49813ccd 100644 --- a/boost/libs/signals/src/Makefile.am +++ b/boost/libs/signals/src/Makefile.am @@ -4,7 +4,8 @@ noinst_LTLIBRARIES = libboostsignals.la INCLUDES = $(BOOST_INCLUDES) -AM_CXXFLAGS = -DBOOST_USER_CONFIG="" +AM_CPPFLAGS = -DBOOST_USER_CONFIG="" +AM_CXXFLAGS = $(PCH_FLAGS) libboostsignals_la_SOURCES = \ connection.cpp \ diff --git a/boost/libs/signals/src/pch.h b/boost/libs/signals/src/pch.h new file mode 100644 index 0000000000..1e94537f05 --- /dev/null +++ b/boost/libs/signals/src/pch.h @@ -0,0 +1,7 @@ +#include +#include +#include +#include + +#include +#include diff --git a/config/common.am b/config/common.am index 510b4dd05e..69ebe4bef1 100644 --- a/config/common.am +++ b/config/common.am @@ -1,5 +1,7 @@ AUTOMAKE_OPTIONS = foreign +CLEANFILES = pch.h.gch + DISTCLEANFILES= *.orig *.rej *~ *.bak core MAINTAINERCLEANFILES = $(srcdir)/Makefile.in @@ -10,12 +12,21 @@ AM_ETAGSFLAGS = --lang=c++ if LYX_BUILD_PCH PCH_FLAGS = -Winvalid-pch --include=pch.h -PCH_FILE = pch.h.gch +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) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(CXXFLAGS) \ + -x c++-header $(PCH_SOURCE) -MT $@ -MD -MP -MF "./$@.Tdep" \ + && mv "./$@.Tdep" "./$@.dep" || rm "./$@.Tdep" + endif -pch.h.gch: - $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -x c++-header pch.h +SUFFIXES = .gch if USE_INCLUDED_BOOST BOOST_INCLUDES = -I$(top_srcdir)/boost diff --git a/src/.cvsignore b/src/.cvsignore index 07d3a9b97b..65688af95e 100644 --- a/src/.cvsignore +++ b/src/.cvsignore @@ -14,3 +14,4 @@ stamp-version *.deps .libs pch.h.gch +pch.h.gch.dep diff --git a/src/Makefile.am b/src/Makefile.am index 49da38346e..3222ac92cf 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -58,8 +58,6 @@ BUILT_SOURCES = version.C AM_CXXFLAGS = $(PCH_FLAGS) -lyx_DEPENDENCIES = $(PCH_FILE) - lyx_SOURCES = \ Bidi.C \ Bidi.h \ diff --git a/src/frontends/.cvsignore b/src/frontends/.cvsignore index 2fbb6cda31..0a2a26697b 100644 --- a/src/frontends/.cvsignore +++ b/src/frontends/.cvsignore @@ -5,3 +5,4 @@ Makefile.in .libs libfrontends.la pch.h.gch +pch.h.gch.dep diff --git a/src/frontends/Makefile.am b/src/frontends/Makefile.am index 3e9b14ac00..c62d53e27d 100644 --- a/src/frontends/Makefile.am +++ b/src/frontends/Makefile.am @@ -10,8 +10,6 @@ INCLUDES = -I$(srcdir)/.. $(BOOST_INCLUDES) AM_CXXFLAGS = $(PCH_FLAGS) -libfrontends_la_DEPENDENCIES = $(PCH_FILE) - libfrontends_la_SOURCES = \ Alert.C \ Alert.h \ diff --git a/src/frontends/controllers/.cvsignore b/src/frontends/controllers/.cvsignore index 56ab29baa6..34270ad118 100644 --- a/src/frontends/controllers/.cvsignore +++ b/src/frontends/controllers/.cvsignore @@ -5,3 +5,4 @@ Makefile .libs libcontrollers.la pch.h.gch +pch.h.gch.dep diff --git a/src/frontends/controllers/Makefile.am b/src/frontends/controllers/Makefile.am index 0862776867..7aa31a9b68 100644 --- a/src/frontends/controllers/Makefile.am +++ b/src/frontends/controllers/Makefile.am @@ -9,7 +9,7 @@ noinst_LTLIBRARIES = libcontrollers.la AM_CXXFLAGS = $(PCH_FLAGS) libcontrollers_la_SOURCES= \ - $(PCH_FILE) Dialog.C \ + Dialog.C \ Dialog.h \ Kernel.C \ Kernel.h \ diff --git a/src/frontends/qt2/Makefile.am b/src/frontends/qt2/Makefile.am index 5e07e70634..dcfac58b8f 100644 --- a/src/frontends/qt2/Makefile.am +++ b/src/frontends/qt2/Makefile.am @@ -15,9 +15,8 @@ noinst_LTLIBRARIES = libqt2.la libqt2_la_LDFLAGS = $(QT_LDFLAGS) libqt2_la_LIBADD = $(QT_LIB) ui/*.lo moc/*.lo ui/moc/*.lo -AM_CXXFLAGS = $(PCH_FLAGS) -DQT_CLEAN_NAMESPACE -DQT_GENUINE_STR - -libqt2_la_DEPENDENCIES = $(PCH_FILE) +AM_CPPFLAGS = -DQT_CLEAN_NAMESPACE -DQT_GENUINE_STR +AM_CXXFLAGS = $(PCH_FLAGS) libqt2_la_SOURCES = \ QDialogView.C \ diff --git a/src/frontends/xforms/.cvsignore b/src/frontends/xforms/.cvsignore index f71c63c9a0..8aa0b4927d 100644 --- a/src/frontends/xforms/.cvsignore +++ b/src/frontends/xforms/.cvsignore @@ -11,3 +11,4 @@ lyx_xpm.h lyx_xpm.h-tmp stamp-xpm pch.h.gch +pch.h.gch.dep diff --git a/src/frontends/xforms/Makefile.am b/src/frontends/xforms/Makefile.am index cd337a0cfc..2c926809ce 100644 --- a/src/frontends/xforms/Makefile.am +++ b/src/frontends/xforms/Makefile.am @@ -1,7 +1,7 @@ include $(top_srcdir)/config/common.am SUBDIRS = forms -CLEANFILES = stamp-xpm stamp-forms +CLEANFILES += stamp-xpm stamp-forms DISTCLEANFILES += lyx_forms.h lyx_forms.h-tmp lyx_xpm.h lyx_xpm.h-tmp BUILT_SOURCES = lyx_forms.h lyx_xpm.h @@ -18,8 +18,6 @@ noinst_LTLIBRARIES = libxforms.la libxforms_la_LIBADD = @XFORMS_LIBS@ forms/*.lo -libxforms_la_DEPENDENCIES = $(PCH_FILE) - # Alphabetical order please. It makes it easier to figure out what's missing. libxforms_la_SOURCES = \ forms_fwd.h \ diff --git a/src/frontends/xforms/forms/.cvsignore b/src/frontends/xforms/forms/.cvsignore index 9de34ffd9e..3e53c25a34 100644 --- a/src/frontends/xforms/forms/.cvsignore +++ b/src/frontends/xforms/forms/.cvsignore @@ -7,3 +7,5 @@ Makefile *.lo .deps libfdesign.la +pch.h.gch +pch.h.gch.dep diff --git a/src/frontends/xforms/forms/Makefile.am b/src/frontends/xforms/forms/Makefile.am index 45a0151d59..f9ce121761 100644 --- a/src/frontends/xforms/forms/Makefile.am +++ b/src/frontends/xforms/forms/Makefile.am @@ -7,6 +7,8 @@ EXTRA_DIST = fdfixc.sed fdfixh.sed fdfix.sh tmp_str.sed README $(SRCS) # For (forms_fwd.h, forms_gettext.h) and support/std_string.h, respectively. INCLUDES = -I$(srcdir)/.. -I$(top_srcdir)/src -I.. +AM_CXXFLAGS = $(PCH_FLAGS) + noinst_LTLIBRARIES = libfdesign.la SRCS = form_aboutlyx.fd \ diff --git a/src/frontends/xforms/forms/pch.h b/src/frontends/xforms/forms/pch.h new file mode 100644 index 0000000000..38b64a24b0 --- /dev/null +++ b/src/frontends/xforms/forms/pch.h @@ -0,0 +1,10 @@ +#include + +#include "bmtable.h" +#include "combox.h" +#include "fdesign_base.h" +#include "gettext.h" + +#include "../lyx_forms.h" + +#include diff --git a/src/graphics/.cvsignore b/src/graphics/.cvsignore index 6788a223ab..fcc1f79a3a 100644 --- a/src/graphics/.cvsignore +++ b/src/graphics/.cvsignore @@ -5,3 +5,4 @@ Makefile .libs libgraphics.la pch.h.gch +pch.h.gch.dep diff --git a/src/graphics/Makefile.am b/src/graphics/Makefile.am index b63cb89b1f..0b3bc1d2e2 100644 --- a/src/graphics/Makefile.am +++ b/src/graphics/Makefile.am @@ -7,7 +7,7 @@ INCLUDES = -I$(srcdir)/.. $(BOOST_INCLUDES) AM_CXXFLAGS = $(PCH_FLAGS) libgraphics_la_SOURCES = \ - $(PCH_FILE) GraphicsCache.h \ + GraphicsCache.h \ GraphicsCache.C \ GraphicsCacheItem.h \ GraphicsCacheItem.C \ diff --git a/src/insets/.cvsignore b/src/insets/.cvsignore index 0a41dd9d58..aa9511a867 100644 --- a/src/insets/.cvsignore +++ b/src/insets/.cvsignore @@ -5,3 +5,4 @@ Makefile .libs libinsets.la pch.h.gch +pch.h.gch.dep diff --git a/src/insets/Makefile.am b/src/insets/Makefile.am index 3e3ada65db..fb5583c853 100644 --- a/src/insets/Makefile.am +++ b/src/insets/Makefile.am @@ -10,10 +10,8 @@ EXTRA_DIST = \ AM_CXXFLAGS = $(PCH_FLAGS) -libinsets_la_DEPENDENCIES = $(PCH_FILE) - libinsets_la_SOURCES = \ - $(PCH_FILE) mailinset.C \ + mailinset.C \ mailinset.h \ ExternalSupport.C \ ExternalSupport.h \ diff --git a/src/insets/pch.h b/src/insets/pch.h index 8615476a03..f572633358 100644 --- a/src/insets/pch.h +++ b/src/insets/pch.h @@ -1,5 +1,7 @@ #include +#include "insetbase.h" + #include #include #include diff --git a/src/mathed/.cvsignore b/src/mathed/.cvsignore index f7300548f5..dd758bbc3c 100644 --- a/src/mathed/.cvsignore +++ b/src/mathed/.cvsignore @@ -5,3 +5,4 @@ Makefile .libs libmathed.la pch.h.gch +pch.h.gch.dep diff --git a/src/mathed/Makefile.am b/src/mathed/Makefile.am index bf6e03eb0e..425b47b976 100644 --- a/src/mathed/Makefile.am +++ b/src/mathed/Makefile.am @@ -8,10 +8,8 @@ INCLUDES = -I$(srcdir)/../ $(BOOST_INCLUDES) AM_CXXFLAGS = $(PCH_FLAGS) -libmathed_la_DEPENDENCIES = $(PCH_FILE) - libmathed_la_SOURCES = \ - $(PCH_FILE) textpainter.C \ + textpainter.C \ textpainter.h \ math_amsarrayinset.C \ math_amsarrayinset.h \ diff --git a/src/support/.cvsignore b/src/support/.cvsignore index 0ab8753521..0134992e7b 100644 --- a/src/support/.cvsignore +++ b/src/support/.cvsignore @@ -6,3 +6,4 @@ libsupport.la .libs path_defines.C pch.h.gch +pch.h.gch.dep diff --git a/src/support/Makefile.am b/src/support/Makefile.am index cb6c5b9ec2..3cec025d68 100644 --- a/src/support/Makefile.am +++ b/src/support/Makefile.am @@ -2,7 +2,7 @@ include $(top_srcdir)/config/common.am noinst_LTLIBRARIES = libsupport.la -CLEANFILES = path_defines.C +CLEANFILES += path_defines.C INCLUDES = -I$(srcdir)/../ $(BOOST_INCLUDES) @@ -17,7 +17,7 @@ BUILT_SOURCES = path_defines.C AM_CXXFLAGS = $(PCH_FLAGS) libsupport_la_SOURCES = \ - $(PCH_FILE) FileInfo.C \ + FileInfo.C \ FileInfo.h \ FileMonitor.h \ FileMonitor.C \ diff --git a/src/tex2lyx/.cvsignore b/src/tex2lyx/.cvsignore index 2a658c1dbb..fbaa967c39 100644 --- a/src/tex2lyx/.cvsignore +++ b/src/tex2lyx/.cvsignore @@ -13,3 +13,5 @@ lyxlayout.[Ch] lyxtextclass.[Ch] lyxlex.C lyxlex_pimpl.C +pch.h.gch +pch.h.gch.dep diff --git a/src/tex2lyx/Makefile.am b/src/tex2lyx/Makefile.am index e3bdabfcf3..517413c2d9 100644 --- a/src/tex2lyx/Makefile.am +++ b/src/tex2lyx/Makefile.am @@ -14,6 +14,8 @@ DISTCLEANFILES += $(BUILT_SOURCES) bin_PROGRAMS = tex2lyx +AM_CXXFLAGS = $(PCH_FLAGS) + BUILT_SOURCES = \ FloatList.C \ Floating.C \ diff --git a/src/tex2lyx/pch.h b/src/tex2lyx/pch.h new file mode 100644 index 0000000000..063498067e --- /dev/null +++ b/src/tex2lyx/pch.h @@ -0,0 +1,18 @@ +#include + +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include