Remove support for precompiled headers for autotools

This was turned off by default for a long time, and it does not seem
to have any use these days.
This commit is contained in:
Jean-Marc Lasgouttes 2015-09-25 10:58:17 +02:00
parent 7f4101a556
commit b7909e7e6c
17 changed files with 21 additions and 183 deletions

View File

@ -2,11 +2,6 @@ include $(top_srcdir)/config/common.am
noinst_LIBRARIES = liblyxboost.a noinst_LIBRARIES = liblyxboost.a
# Using precompiled headers makes compilation >10% slower
#EXTRA_DIST = pch.h
#BUILT_SOURCES = $(PCH_FILE)
#AM_CPPFLAGS += $(PCH_FLAGS)
EXTRA_DIST = boost \ EXTRA_DIST = boost \
CMakeLists.txt \ CMakeLists.txt \
libs/CMakeLists.txt \ libs/CMakeLists.txt \

View File

@ -1,28 +0,0 @@
#include <boost/config.hpp>
#include <boost/detail/workaround.hpp>
#include <boost/scoped_array.hpp>
#include <boost/signals/connection.hpp>
#include <boost/signals/detail/signal_base.hpp>
#include <boost/signals/slot.hpp>
#include <boost/signals/trackable.hpp>
#include <boost/throw_exception.hpp>
#include <algorithm>
#include <cassert>
#include <cctype>
#include <cerrno>
#include <climits>
#include <clocale>
#include <cwchar>
#include <iostream>
#include <list>
#include <locale>
#include <map>
#include <new>
#include <ostream>
#include <set>
#include <stdexcept>
#include <string>
#include <vector>
#include <sys/stat.h> // last_write_time() uses stat()

View File

@ -1,6 +1,4 @@
CLEANFILES = pch.h.gch DISTCLEANFILES= *.orig *.rej *~ *.bak core
DISTCLEANFILES= pch.h.gch.dep *.orig *.rej *~ *.bak core
MAINTAINERCLEANFILES = $(srcdir)/Makefile.in MAINTAINERCLEANFILES = $(srcdir)/Makefile.in
@ -8,24 +6,4 @@ AM_INSTALL_DATA_FLAGS = $(INSTALL) -m 644 -D
AM_ETAGSFLAGS = --lang=c++ AM_ETAGSFLAGS = --lang=c++
if LYX_BUILD_PCH
PCH_SOURCE = $(srcdir)/pch.h
PCH_FLAGS = -Winvalid-pch --include=$(PCH_SOURCE)
PCH_FILE = ./pch.h.gch
sinclude ./pch.h.gch.dep
*.o *.lo *.obj: $(PCH_FILE)
$(PCH_FILE): $(PCH_SOURCE)
$(MAKE) PCH_FLAGS= pch-file
pch-file:
$(CXXCOMPILE) -x c++-header -fPIC -DPIC $(PCH_SOURCE) -o $(PCH_FILE) \
-MT $(PCH_FILE) -MD -MP -MF "./$(PCH_FILE).Tdep" \
&& mv "./$(PCH_FILE).Tdep" "./$(PCH_FILE).dep" \
|| rm "./$(PCH_FILE).Tdep"
endif
SUFFIXES = .gch
LIBS = LIBS =

View File

@ -263,11 +263,6 @@ case $enable_optimization in
*) lyx_optim=${enable_optimization};; *) lyx_optim=${enable_optimization};;
esac esac
AC_ARG_ENABLE(pch,
AC_HELP_STRING([--enable-pch],[enable precompiled headers]),,
enable_pch=no;)
lyx_pch_comp=no
AC_ARG_ENABLE(cxx11, AC_ARG_ENABLE(cxx11,
AC_HELP_STRING([--disable-cxx11],[disable C++11 mode (default: enabled for known good compilers)]),, AC_HELP_STRING([--disable-cxx11],[disable C++11 mode (default: enabled for known good compilers)]),,
enable_cxx11=auto;) enable_cxx11=auto;)
@ -316,7 +311,6 @@ if test x$GXX = xyes; then
fi fi
case $gxx_version in case $gxx_version in
2.*|3.*) AC_ERROR([gcc 4.x is required]);; 2.*|3.*) AC_ERROR([gcc 4.x is required]);;
*) test $enable_pch = yes && lyx_pch_comp=yes ;;
esac esac
if test x$enable_stdlib_debug = xyes ; then if test x$enable_stdlib_debug = xyes ; then
dnl FIXME: for clang/libc++, one should define _LIBCPP_DEBUG2=0 dnl FIXME: for clang/libc++, one should define _LIBCPP_DEBUG2=0
@ -381,8 +375,6 @@ if test x$GXX = xyes; then
fi fi
fi fi
AM_CONDITIONAL([LYX_USE_STD_REGEX], test $lyx_std_regex = yes) AM_CONDITIONAL([LYX_USE_STD_REGEX], test $lyx_std_regex = yes)
test "$lyx_pch_comp" = yes && lyx_flags="$lyx_flags pch"
AM_CONDITIONAL(LYX_BUILD_PCH, test "$lyx_pch_comp" = yes)
])dnl ])dnl
dnl Usage: LYX_USE_INCLUDED_BOOST : select if the included boost should dnl Usage: LYX_USE_INCLUDED_BOOST : select if the included boost should

View File

@ -19,7 +19,7 @@ lyxwin_SOURCES = lyxwin.c lyxwinres.rc
lyxeditor_LDFLAGS=-mwindows -e _mainCRTStartup lyxeditor_LDFLAGS=-mwindows -e _mainCRTStartup
lyxwin_LDFLAGS=-mwindows -e _mainCRTStartup lyxwin_LDFLAGS=-mwindows -e _mainCRTStartup
CLEANFILES += lyxeditor.sh lyx_32x32.ico lyx_doc_32x32.ico CLEANFILES = lyxeditor.sh lyx_32x32.ico lyx_doc_32x32.ico
lyxeditor.sh: lyxeditor.sh:
cp $(top_srcdir)/development/tools/lyxeditor $@ cp $(top_srcdir)/development/tools/lyxeditor $@

View File

@ -2309,7 +2309,7 @@ lyx@program_suffix@.desktop: lyx.desktop-temp
desktopdir = $(datadir)/applications desktopdir = $(datadir)/applications
desktop_DATA = lyx@program_suffix@.desktop desktop_DATA = lyx@program_suffix@.desktop
CLEANFILES += lyx@program_suffix@.desktop lyx.desktop-temp \ CLEANFILES = lyx@program_suffix@.desktop lyx.desktop-temp \
lyx@program_suffix@.svg lyx@program_suffix@.png lyx@program_suffix@.svg lyx@program_suffix@.png
endif endif
dist_noinst_DATA += lyx.desktop.in images/lyx.svg images/lyx.png dist_noinst_DATA += lyx.desktop.in images/lyx.svg images/lyx.png

View File

@ -1,6 +1,6 @@
include $(top_srcdir)/config/common.am include $(top_srcdir)/config/common.am
CLEANFILES += *.pyc *.pyo CLEANFILES = *.pyc *.pyo
EXTRA_DIST = lyx2lyx_version.py.in test_parser_tools.py CMakeLists.txt EXTRA_DIST = lyx2lyx_version.py.in test_parser_tools.py CMakeLists.txt

View File

@ -2,7 +2,7 @@ include $(top_srcdir)/config/common.am
############################### Core ############################## ############################### Core ##############################
AM_CPPFLAGS += $(PCH_FLAGS) -I$(top_srcdir)/src $(BOOST_INCLUDES) $(ENCHANT_CFLAGS) $(HUNSPELL_CFLAGS) AM_CPPFLAGS += -I$(top_srcdir)/src $(BOOST_INCLUDES) $(ENCHANT_CFLAGS) $(HUNSPELL_CFLAGS)
AM_CPPFLAGS += $(QT_CPPFLAGS) $(QT_CORE_INCLUDES) AM_CPPFLAGS += $(QT_CPPFLAGS) $(QT_CORE_INCLUDES)
if BUILD_CLIENT_SUBDIR if BUILD_CLIENT_SUBDIR
@ -12,7 +12,6 @@ endif
SUBDIRS = support frontends . $(CLIENT) tex2lyx SUBDIRS = support frontends . $(CLIENT) tex2lyx
EXTRA_DIST = lyx_commit_hash.h.in \ EXTRA_DIST = lyx_commit_hash.h.in \
pch.h \
CMakeLists.txt \ CMakeLists.txt \
graphics/CMakeLists.txt \ graphics/CMakeLists.txt \
insets/CMakeLists.txt \ insets/CMakeLists.txt \
@ -51,8 +50,6 @@ endif
#lyx_LDFLAGS=-Wl,-O1 #lyx_LDFLAGS=-Wl,-O1
BUILT_SOURCES = $(PCH_FILE)
if INSTALL_MACOSX if INSTALL_MACOSX
APPLESPELL = AppleSpellChecker.cpp AppleSpellChecker.h APPLESPELL = AppleSpellChecker.cpp AppleSpellChecker.h
endif endif
@ -324,8 +321,8 @@ update_commit_hash:
lyx_commit_hash.h: update_commit_hash lyx_commit_hash.h: update_commit_hash
BUILT_SOURCES += lyx_commit_hash.h BUILT_SOURCES = lyx_commit_hash.h
CLEANFILES += lyx_commit_hash.h CLEANFILES = lyx_commit_hash.h
lyxcore.cpp: lyxcore.cpp:
@echo -e '$(SOURCEFILESCORE:%=\n#include "%")\n' > $@ @echo -e '$(SOURCEFILESCORE:%=\n#include "%")\n' > $@

View File

@ -1,6 +1,6 @@
include $(top_srcdir)/config/common.am include $(top_srcdir)/config/common.am
CLEANFILES += $(man_MANS) CLEANFILES = $(man_MANS)
man_MANS = lyxclient.1 man_MANS = lyxclient.1
@ -47,10 +47,6 @@ lyxclient_SOURCES = lyxclient.cpp $(HEADERFILES)
else else
EXTRA_DIST += pch.h
AM_CPPFLAGS += $(PCH_FLAGS)
BUILT_SOURCES = $(PCH_FILE)
lyxclient_SOURCES = $(SOURCEFILES) $(HEADERFILES) lyxclient_SOURCES = $(SOURCEFILES) $(HEADERFILES)
endif endif

View File

@ -1,10 +0,0 @@
#include <config.h>
#include <cerrno>
#include <cstdlib>
#include <exception>
#include <iomanip>
#include <iostream>
#include <map>
#include <string>
#include <vector>

View File

@ -4,7 +4,7 @@ BUILT_SOURCES = $(UIFILES:%.ui=ui_%.h)
BUILT_SOURCES += $(MOCEDFILES) BUILT_SOURCES += $(MOCEDFILES)
BUILT_SOURCES += Resources.cpp Resources.qrc BUILT_SOURCES += Resources.cpp Resources.qrc
CLEANFILES += $(BUILT_SOURCES) CLEANFILES = $(BUILT_SOURCES)
######################### Qt stuff ############################# ######################### Qt stuff #############################
# Use _() for localization instead of tr() or trUtf8() # Use _() for localization instead of tr() or trUtf8()
@ -374,9 +374,6 @@ liblyxqt4_a_SOURCES = \
$(MOCHEADER) \ $(MOCHEADER) \
$(NOMOCHEADER) $(NOMOCHEADER)
EXTRA_DIST = pch.h CMakeLists.txt $(UIFILES:%=ui/%) EXTRA_DIST = CMakeLists.txt $(UIFILES:%=ui/%)
BUILT_SOURCES += $(PCH_FILE)
AM_CPPFLAGS += $(PCH_FLAGS)
endif endif

View File

@ -1,16 +0,0 @@
// -*- C++ -*-
#include <config.h>
#include <algorithm>
#include <cmath>
#include <iomanip>
#include <map>
#include <sstream>
#include <stack>
#include <string>
#include <utility>
#include <vector>
#include <QtCore>
#include <QtGui>

View File

@ -1,22 +0,0 @@
#include <config.h>
#include <algorithm>
#include <deque>
#include <exception>
#include <fstream>
#include <functional>
#include <iomanip>
#include <ios>
#include <iosfwd>
#include <iostream>
#include <iterator>
#include <list>
#include <map>
#include <memory>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <utility>
#include <vector>

View File

@ -1,14 +1,10 @@
include $(top_srcdir)/config/common.am include $(top_srcdir)/config/common.am
CLEANFILES += $(BUILT_SOURCES) EXTRA_DIST = os_cygwin.cpp os_unix.cpp os_win32.cpp os_win32.h \
EXTRA_DIST = pch.h \
os_cygwin.cpp os_unix.cpp os_win32.cpp os_win32.h \
CMakeLists.txt tests/CMakeLists.txt tests/supporttest.cmake CMakeLists.txt tests/CMakeLists.txt tests/supporttest.cmake
noinst_LIBRARIES = liblyxsupport.a noinst_LIBRARIES = liblyxsupport.a
BUILT_SOURCES = $(PCH_FILE)
######################### Qt stuff ############################# ######################### Qt stuff #############################
# #
@ -19,8 +15,8 @@ MOCHEADER = \
MOCEDFILES = $(MOCHEADER:%.h=moc_%.cpp) MOCEDFILES = $(MOCHEADER:%.h=moc_%.cpp)
CLEANFILES += $(MOCEDFILES) CLEANFILES = $(MOCEDFILES)
BUILT_SOURCES += $(MOCEDFILES) BUILT_SOURCES = $(MOCEDFILES)
moc_%.cpp: %.h moc_%.cpp: %.h
$(QT_MOC) -o $@ $< $(QT_MOC) -o $@ $<
@ -30,8 +26,7 @@ liblyxsupport_a_DEPENDENCIES = $(MOCEDFILES)
# #
################################################################## ##################################################################
AM_CPPFLAGS += $(PCH_FLAGS) -I$(srcdir)/.. $(BOOST_INCLUDES) AM_CPPFLAGS += -I$(srcdir)/.. $(BOOST_INCLUDES) $(QT_CPPFLAGS) $(QT_INCLUDES)
AM_CPPFLAGS += $(QT_CPPFLAGS) $(QT_INCLUDES)
liblyxsupport_a_SOURCES = \ liblyxsupport_a_SOURCES = \
FileMonitor.h \ FileMonitor.h \

View File

@ -1,22 +0,0 @@
#include <config.h>
#include <algorithm>
#include <cctype>
#include <cerrno>
#include <csignal>
#include <cstddef>
#include <cstdio>
#include <cstdlib>
#include <ctime>
#include <fstream>
#include <functional>
#include <iostream>
#include <istream>
#include <iterator>
#include <list>
#include <map>
#include <ostream>
#include <sstream>
#include <string>
#include <utility>
#include <vector>

View File

@ -1,6 +1,6 @@
include $(top_srcdir)/config/common.am include $(top_srcdir)/config/common.am
EXTRA_DIST = TODO.txt tex2lyx.1in $(TEST_FILES) $(TEST_RESULTS) pch.h \ EXTRA_DIST = TODO.txt tex2lyx.1in $(TEST_FILES) $(TEST_RESULTS) \
CMakeLists.txt test/CMakeLists.txt CMakeLists.txt test/CMakeLists.txt
#noinst_LIBRARIES = libtexparser.a #noinst_LIBRARIES = libtexparser.a
@ -17,7 +17,7 @@ bin_PROGRAMS = tex2lyx
DEFAULT_INCLUDES = DEFAULT_INCLUDES =
AM_CPPFLAGS += $(PCH_FLAGS) -I$(top_srcdir)/src/tex2lyx \ AM_CPPFLAGS += -I$(top_srcdir)/src/tex2lyx \
-I$(top_srcdir)/src -I$(top_builddir) -I$(top_builddir)/src \ -I$(top_srcdir)/src -I$(top_builddir) -I$(top_builddir)/src \
$(BOOST_INCLUDES) $(BOOST_INCLUDES)
@ -105,8 +105,6 @@ LINKED_FILES = \
../TextClass.cpp \ ../TextClass.cpp \
../version.cpp ../version.cpp
BUILT_SOURCES = $(PCH_FILE)
tex2lyx_SOURCES = \ tex2lyx_SOURCES = \
$(LINKED_FILES) \ $(LINKED_FILES) \
boost.cpp \ boost.cpp \

View File

@ -1,12 +0,0 @@
#include <config.h>
#include <algorithm>
#include <cstdlib>
#include <exception>
#include <fstream>
#include <iosfwd>
#include <iostream>
#include <map>
#include <sstream>
#include <string>
#include <vector>