mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 13:18:28 +00:00
remove special handling of Package.cpp[.in]
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19840 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
def5620e58
commit
d65a564adf
23
configure.ac
23
configure.ac
@ -312,19 +312,12 @@ ${FRONTEND_INFO}\
|
||||
LyX binary dir: ${real_bindir}\n\
|
||||
LyX files dir: ${real_pkgdatadir}\n"
|
||||
|
||||
MSYS_AC_CANONICAL_PATH(LYX_ABS_TOP_SRCDIR, ${srcdir})
|
||||
MSYS_AC_CANONICAL_PATH(LYX_ABS_INSTALLED_LOCALEDIR, ${real_localedir})
|
||||
MSYS_AC_CANONICAL_PATH(LYX_ABS_INSTALLED_DATADIR, ${real_pkgdatadir})
|
||||
|
||||
AC_SUBST(VERSION_INFO)
|
||||
AC_SUBST(RPM_FRONTEND)
|
||||
AC_SUBST(AM_CPPFLAGS)
|
||||
AC_SUBST(AM_CXXFLAGS)
|
||||
AC_SUBST(AM_CFLAGS)
|
||||
AC_SUBST(AM_LDFLAGS)
|
||||
AC_SUBST(LYX_ABS_TOP_SRCDIR)
|
||||
AC_SUBST(LYX_ABS_INSTALLED_LOCALEDIR)
|
||||
AC_SUBST(LYX_ABS_INSTALLED_DATADIR)
|
||||
|
||||
## Some config.h stuff
|
||||
|
||||
@ -454,6 +447,19 @@ AC_ARG_ENABLE(monolithic-frontend-qt4,
|
||||
[enable_monolithic_frontend_qt4=no])
|
||||
AM_CONDITIONAL(MONOLITHIC_FRONTEND_QT4, test "$enable_monolithic_frontend_qt4" = "yes")
|
||||
|
||||
MSYS_AC_CANONICAL_PATH(lyx_abs_top_srcdir, ${srcdir})
|
||||
MSYS_AC_CANONICAL_PATH(lyx_abs_installed_localedir, ${real_localedir})
|
||||
MSYS_AC_CANONICAL_PATH(lyx_abs_installed_datadir, ${real_pkgdatadir})
|
||||
|
||||
AC_DEFINE_UNQUOTED([LYX_ABS_TOP_SRCDIR],
|
||||
"${lyx_abs_top_srcdir}", [Top source directory])
|
||||
AC_DEFINE_UNQUOTED([LYX_ABS_INSTALLED_LOCALEDIR],
|
||||
"${lyx_abs_installed_localedir}",[Hard coded locale directory])
|
||||
AC_DEFINE_UNQUOTED([LYX_ABS_INSTALLED_DATADIR],
|
||||
"${lyx_abs_installed_datadir}",[Hard system support directory])
|
||||
AC_DEFINE_UNQUOTED([PROGRAM_SUFFIX],
|
||||
"${version_suffix}",[Program version suffix])
|
||||
|
||||
AC_DEFINE_UNQUOTED([LYX_DATE],"$LYX_DATE",[Date of release])
|
||||
AC_DEFINE_UNQUOTED([VERSION_INFO],"$VERSION_INFO",[Full version info])
|
||||
AC_DEFINE_UNQUOTED([LYX_MAJOR_VERSION],$lyx_major,[Major version number])
|
||||
@ -461,7 +467,6 @@ AC_DEFINE_UNQUOTED([LYX_MINOR_VERSION],$lyx_minor,[Minor version number])
|
||||
AC_DEFINE_UNQUOTED([LYX_RELEASE_LEVEL],$lyx_release,[Release version number])
|
||||
AC_DEFINE_UNQUOTED([LYX_RELEASE_PATCH],$lyx_patch,[Patch version number])
|
||||
|
||||
|
||||
AC_CONFIG_FILES([Makefile
|
||||
boost/Makefile \
|
||||
config/Makefile \
|
||||
@ -472,7 +477,7 @@ AC_CONFIG_FILES([Makefile
|
||||
development/MacOSX/spotlight/Makefile \
|
||||
development/lyx.spec \
|
||||
intl/Makefile \
|
||||
lib/Makefile \
|
||||
lib/Makefile \
|
||||
lib/doc/Makefile \
|
||||
lib/lyx2lyx/lyx2lyx_version.py \
|
||||
lib/lyx2lyx/Makefile \
|
||||
|
@ -116,6 +116,10 @@
|
||||
#cmakedefine LYX_DATE "${LYX_DATE}"
|
||||
#cmakedefine VERSION_INFO "${VERSION_INFO}"
|
||||
|
||||
#cmakedefine PROGRAM_SUFFIX "${PPROGRAM_SUFFIX}"
|
||||
#cmakedefine LYX_ABS_INSTALLED_DATADIR "${LYX_DIR}"
|
||||
#cmakedefine LYX_ABS_INSTALLED_LOCALEDIR "${LOCALEDIR}"
|
||||
#cmakedefine LYX_ABS_TOP_SRCDIR "${TOP_SRCDIR}"
|
||||
|
||||
#cmakedefine USE_POSIX_PACKAGING 1
|
||||
#cmakedefine USE_WINDOWS_PACKAGING 1
|
||||
|
@ -6,8 +6,8 @@
|
||||
|
||||
project(support)
|
||||
|
||||
configure_file(${TOP_SRC_DIR}/src/support/Package.cpp.in
|
||||
${CMAKE_CURRENT_BINARY_DIR}/package.C)
|
||||
#configure_file(${TOP_SRC_DIR}/src/support/Package.cpp.in
|
||||
# ${CMAKE_CURRENT_BINARY_DIR}/package.C)
|
||||
|
||||
file(GLOB support_sources ${TOP_SRC_DIR}/src/support/${LYX_CPP_FILES})
|
||||
file(GLOB support_headers ${TOP_SRC_DIR}/src/support/${LYX_HPP_FILES})
|
||||
@ -25,7 +25,7 @@ list(REMOVE_ITEM support_sources
|
||||
${TOP_SRC_DIR}/src/support/minizip/iowin32.h
|
||||
${TOP_SRC_DIR}/src/support/minizip/iowin32.c)
|
||||
|
||||
set(support_sources ${support_sources} ${CMAKE_CURRENT_BINARY_DIR}/package.C)
|
||||
#set(support_sources ${support_sources} ${CMAKE_CURRENT_BINARY_DIR}/package.C)
|
||||
|
||||
lyx_add_msvc_pch(support)
|
||||
|
||||
|
@ -21,7 +21,6 @@ LIBS += -lAiksaurus
|
||||
|
||||
LIBS += -L../lib
|
||||
|
||||
LIBS += ../support/$(OBJECTS_DIR)/Package.o
|
||||
LIBS += -Wl,--start-group
|
||||
LIBS += -llyxmathed$${DEBUGSUFFIX}
|
||||
LIBS += -llyxinsets$${DEBUGSUFFIX}
|
||||
|
@ -55,6 +55,7 @@ CPP += FileName.cpp
|
||||
CPP += ForkedCallQueue.cpp
|
||||
CPP += Forkedcall.cpp
|
||||
CPP += ForkedcallsController.cpp
|
||||
CPP += Package.cpp
|
||||
CPP += Path.cpp
|
||||
CPP += Systemcall.cpp
|
||||
CPP += Timeout.cpp
|
||||
@ -84,63 +85,6 @@ CPP += unicode.cpp
|
||||
CPP += unlink.cpp
|
||||
CPP += userinfo.cpp
|
||||
|
||||
|
||||
QMAKE_RUN_CXX1 = $(CXX) -c $(CXXFLAGS) $(INCPATH)
|
||||
|
||||
#packagetarget.target = Package.cpp
|
||||
#packagetarget.commands = \
|
||||
# @rm -f tmp_package ;\
|
||||
# sed \'s,@LYX_DIR@,$(LYX_ABS_INSTALLED_DATADIR),;\
|
||||
#s,@LOCALEDIR@,$(LYX_ABS_INSTALLED_LOCALEDIR),;\
|
||||
#s,@TOP_SRCDIR@,$(LYX_ABS_TOP_SRCDIR),;\
|
||||
#s,@PROGRAM_SUFFIX@,$(program_suffix),\' \
|
||||
# $${BUILD_BASE_SOURCE_DIR}/src/support/Package.cpp.in > tmp_package ;\
|
||||
# if cmp -s tmp_package Package.cpp ; then \
|
||||
# rm -f tmp_package ;\
|
||||
# else \
|
||||
# rm -f Package.cpp ;\
|
||||
# cp tmp_package Package.cpp ;\
|
||||
# fi
|
||||
#packagetarget.depends = config.h
|
||||
#packagetarget.variable_out = SOURCES
|
||||
#packagetarget.CONFIG = no_link
|
||||
##SOURCES += $${BUILD_BASE_TARGET_DIR}/src/Package.cpp
|
||||
#QMAKE_EXTRA_TARGETS += packagetarget
|
||||
#
|
||||
##OBJECTS += $(OBJECTS_DIR)/Package.o
|
||||
#POST_TARGETDEPS += $(OBJECTS_DIR)/Package.o
|
||||
|
||||
packagetarget.target = Package.cpp
|
||||
packagetarget.commands = \
|
||||
@rm -f tmp_package ;\
|
||||
sed \'s,@LYX_DIR@,$(LYX_ABS_INSTALLED_DATADIR),;\
|
||||
s,@LOCALEDIR@,$(LYX_ABS_INSTALLED_LOCALEDIR),;\
|
||||
s,@TOP_SRCDIR@,$(LYX_ABS_TOP_SRCDIR),;\
|
||||
s,@PROGRAM_SUFFIX@,$(program_suffix),\' \
|
||||
$${BUILD_BASE_SOURCE_DIR}/src/support/Package.cpp.in > tmp_package ;\
|
||||
if cmp -s tmp_package Package.cpp ; then \
|
||||
rm -f tmp_package ;\
|
||||
else \
|
||||
rm -f Package.cpp ;\
|
||||
cp tmp_package Package.cpp ;\
|
||||
fi
|
||||
#packagetarget.depends = config.h
|
||||
packagetarget.CONFIG = no_link
|
||||
#SOURCES += $${BUILD_BASE_TARGET_DIR}/src/Package.cpp
|
||||
|
||||
packagetarget2.target = $(OBJECTS_DIR)/Package.o
|
||||
packagetarget2.commands = $${QMAKE_RUN_CXX1} -c Package.cpp \
|
||||
-o $(OBJECTS_DIR)/Package.o
|
||||
packagetarget2.depends = Package.cpp
|
||||
|
||||
QMAKE_EXTRA_TARGETS += packagetarget packagetarget2
|
||||
|
||||
QMAKE_CLEAN += $(OBJECTS_DIR)/Package.o Package.cpp
|
||||
|
||||
PRE_TARGETDEPS += $(OBJECTS_DIR)/Package.o
|
||||
|
||||
LIBS += $(OBJECTS_DIR)/Package.o
|
||||
|
||||
for(FILE,CPP) { SOURCES += $${BUILD_BASE_SOURCE_DIR}/src/support/$${FILE} }
|
||||
for(FILE,HPP) { HEADERS += $${BUILD_BASE_SOURCE_DIR}/src/support/$${FILE} }
|
||||
for(PATH,INC) { INCLUDEPATH += $${BUILD_BASE_SOURCE_DIR}/$${PATH} }
|
||||
|
@ -350,10 +350,11 @@ env.AppendUnique(LIBPATH = ['$LOCALLIBPATH'])
|
||||
# 3. compiler commands and flags like CCFLAGS.
|
||||
# MSGFMT used to process po files
|
||||
# 4. Variables that will be used to replace variables in some_file.in
|
||||
# src/support/Package.cpp.in:
|
||||
# TOP_SRCDIR, LOCALEDIR, LYX_DIR, PROGRAM_SUFFIX
|
||||
# lib/lyx2lyx/lyx2lyx_version.py.in
|
||||
# PACKAGE_VERSION
|
||||
# FIXME Bo: Please look here, that's not needed anymore (Andre')
|
||||
# src/support/Package.cpp.in:
|
||||
# TOP_SRCDIR, LOCALEDIR, LYX_DIR, PROGRAM_SUFFIX
|
||||
|
||||
# full path name is used to build msvs project files
|
||||
# and to replace TOP_SRCDIR in package.C
|
||||
@ -383,6 +384,8 @@ if env.has_key('version_suffix'):
|
||||
program_suffix = env['version_suffix']
|
||||
else:
|
||||
program_suffix = ''
|
||||
|
||||
# FIXME Bo: Please look here, can this be simplified? (Andre')
|
||||
# used by Package.cpp.in
|
||||
env['PROGRAM_SUFFIX'] = program_suffix
|
||||
|
||||
@ -1042,6 +1045,14 @@ result = utils.createConfigFile(conf,
|
||||
'Full version info'),
|
||||
('#define LYX_DATE "%s"' % lyx_date,
|
||||
'Date of release'),
|
||||
('#define PROGRAM_SUFFIX "%s"' % '$PROGRAM_SUFFIX',
|
||||
'Program version suffix'),
|
||||
('#define LYX_ABS_INSTALLED_DATADIR "%s"' % '$LYX_DIR',
|
||||
'Hard coded system support directory'),
|
||||
('#define LYX_ABS_INSTALLED_LOCALEDIR "%s"' % '$LOCALEDIR',
|
||||
'Hard coded locale directory'),
|
||||
('#define LYX_ABS_TOP_SRCDIR "%s"' % '$TOP_SRCDIR',
|
||||
'Top source directory'),
|
||||
('#define BOOST_ALL_NO_LIB 1',
|
||||
'disable automatic linking of boost libraries.'),
|
||||
('#define USE_%s_PACKAGING 1' % packaging_method.upper(),
|
||||
|
@ -340,6 +340,7 @@ src_support_files = Split('''
|
||||
ForkedCallQueue.cpp
|
||||
Forkedcall.cpp
|
||||
ForkedcallsController.cpp
|
||||
Package.cpp
|
||||
Path.cpp
|
||||
Systemcall.cpp
|
||||
Timeout.cpp
|
||||
@ -377,7 +378,6 @@ src_support_extra_header_files = Split('''
|
||||
|
||||
|
||||
src_support_extra_src_files = Split('''
|
||||
Package.cpp.in
|
||||
atexit.c
|
||||
os_cygwin.cpp
|
||||
os_unix.cpp
|
||||
|
@ -32,7 +32,6 @@ src/callback.cpp
|
||||
src/client/debug.cpp
|
||||
src/debug.cpp
|
||||
src/frontends/LyXView.cpp
|
||||
src/frontends/WorkArea.cpp
|
||||
src/frontends/controllers/ControlAboutlyx.cpp
|
||||
src/frontends/controllers/ControlBibtex.cpp
|
||||
src/frontends/controllers/ControlBox.cpp
|
||||
@ -144,7 +143,6 @@ src/output.cpp
|
||||
src/output_plaintext.cpp
|
||||
src/rowpainter.cpp
|
||||
src/support/FileFilterList.cpp
|
||||
src/support/Package.cpp.in
|
||||
src/support/filetools.cpp
|
||||
src/support/os_win32.cpp
|
||||
src/support/userinfo.cpp
|
||||
|
@ -2,7 +2,7 @@ include $(top_srcdir)/config/common.am
|
||||
|
||||
CLEANFILES += $(BUILT_SOURCES)
|
||||
|
||||
EXTRA_DIST = Package.cpp.in pch.h \
|
||||
EXTRA_DIST = pch.h \
|
||||
os_cygwin.cpp os_unix.cpp os_win32.cpp os_win32.h
|
||||
|
||||
pkglib_LTLIBRARIES = liblyxsupport.la
|
||||
@ -10,7 +10,7 @@ pkglib_LTLIBRARIES = liblyxsupport.la
|
||||
liblyxsupport_la_LIBADD = $(LIBSHLWAPI) $(QT4_CORE_LIB) $(BOOST_SIGNALS)
|
||||
liblyxsupport_la_LDFLAGS = $(QT4_CORE_LDFLAGS)
|
||||
|
||||
BUILT_SOURCES = $(PCH_FILE) Package.cpp
|
||||
BUILT_SOURCES = $(PCH_FILE)
|
||||
|
||||
AM_CPPFLAGS += $(PCH_FLAGS) -I$(srcdir)/.. $(BOOST_INCLUDES)
|
||||
AM_CPPFLAGS += $(QT4_CPPFLAGS) $(QT4_CORE_INCLUDES) -I$(srcdir)/minizip
|
||||
@ -103,24 +103,6 @@ liblyxsupport_la_SOURCES = \
|
||||
minizip/zip.c \
|
||||
minizip/zip.h
|
||||
|
||||
Package.cpp: build_package
|
||||
|
||||
# Solaris sed does not like spaces bewteen the ;-delimited commands
|
||||
build_package: Package.cpp.in
|
||||
@rm -f tmp_package ;\
|
||||
sed "s,@LYX_DIR@,$(LYX_ABS_INSTALLED_DATADIR),;\
|
||||
s,@LOCALEDIR@,$(LYX_ABS_INSTALLED_LOCALEDIR),;\
|
||||
s,@TOP_SRCDIR@,$(LYX_ABS_TOP_SRCDIR),;\
|
||||
s,@PROGRAM_SUFFIX@,$(program_suffix)," \
|
||||
$(srcdir)/Package.cpp.in > tmp_package ;\
|
||||
if cmp -s tmp_package Package.cpp ; then \
|
||||
rm -f tmp_package ;\
|
||||
else \
|
||||
rm -f Package.cpp ;\
|
||||
mv tmp_package Package.cpp ;\
|
||||
fi
|
||||
|
||||
|
||||
############################## Tests ##################################
|
||||
|
||||
EXTRA_DIST += tests/test_convert tests/test_filetools \
|
||||
|
@ -7,9 +7,6 @@
|
||||
* \author Angus Leeming
|
||||
*
|
||||
* Full author contact details are available in file CREDITS.
|
||||
*
|
||||
* Warning! This file is autogenerated from Package.cpp.in.
|
||||
* All changes to this file will be lost.
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
@ -181,7 +178,7 @@ FileName const hardcoded_localedir()
|
||||
{
|
||||
// FIXME UNICODE
|
||||
// The build system needs to make sure that this is in utf8 encoding.
|
||||
return FileName("@LOCALEDIR@");
|
||||
return FileName(LYX_ABS_INSTALLED_LOCALEDIR);
|
||||
}
|
||||
|
||||
|
||||
@ -189,15 +186,15 @@ FileName const hardcoded_system_support_dir()
|
||||
{
|
||||
// FIXME UNICODE
|
||||
// The build system needs to make sure that this is in utf8 encoding.
|
||||
return FileName("@LYX_DIR@");
|
||||
return FileName(LYX_ABS_INSTALLED_DATADIR);
|
||||
}
|
||||
|
||||
|
||||
string const & with_version_suffix()
|
||||
{
|
||||
static string const program_suffix("@PROGRAM_SUFFIX@");
|
||||
static string const
|
||||
with_version_suffix(" --with-version-suffix=@PROGRAM_SUFFIX@");
|
||||
static string const program_suffix = PROGRAM_SUFFIX;
|
||||
static string const with_version_suffix =
|
||||
" --with-version-suffix=" PROGRAM_SUFFIX;
|
||||
return program_suffix.empty() ? program_suffix : with_version_suffix;
|
||||
}
|
||||
|
||||
@ -208,7 +205,7 @@ FileName const & Package::top_srcdir()
|
||||
{
|
||||
// FIXME UNICODE
|
||||
// The build system needs to make sure that this is in utf8 encoding.
|
||||
static FileName const dir("@TOP_SRCDIR@");
|
||||
static FileName const dir(LYX_ABS_TOP_SRCDIR);
|
||||
return dir;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user