From f429e2c55f77d5869683d902c9f4d96df1678d6c Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 3 May 2017 09:18:25 +0200 Subject: Get rid of legacy build systems --- libstudxml/details/build2/config-vc.h | 20 ---------------- libstudxml/details/build2/config.h | 45 ----------------------------------- libstudxml/details/config-vc.h | 4 +++- libstudxml/details/config.h | 40 +++++++++++++++++++++++++++++++ libstudxml/details/config.h.in | 15 ------------ libstudxml/details/config.hxx | 16 +++---------- libstudxml/details/expat/config.h | 14 +++-------- libstudxml/details/export.hxx | 34 -------------------------- 8 files changed, 49 insertions(+), 139 deletions(-) delete mode 100644 libstudxml/details/build2/config-vc.h delete mode 100644 libstudxml/details/build2/config.h create mode 100644 libstudxml/details/config.h delete mode 100644 libstudxml/details/config.h.in (limited to 'libstudxml/details') diff --git a/libstudxml/details/build2/config-vc.h b/libstudxml/details/build2/config-vc.h deleted file mode 100644 index f54ad58..0000000 --- a/libstudxml/details/build2/config-vc.h +++ /dev/null @@ -1,20 +0,0 @@ -/* file : libstudxml/details/build2/config-vc.h - * copyright : Copyright (c) 2013-2017 Code Synthesis Tools CC - * license : MIT; see accompanying LICENSE file - */ - -/* Configuration file for Windows/VC++ for the build2 build. */ - -#ifndef LIBSTUDXML_DETAILS_CONFIG_VC_H -#define LIBSTUDXML_DETAILS_CONFIG_VC_H - -/* Define LIBSTUDXML_BUILD2 for the installed case. */ -#ifndef LIBSTUDXML_BUILD2 -# define LIBSTUDXML_BUILD2 -#endif - -// Always little-endian, at least on i686 and x86_64. -// -#define LIBSTUDXML_BYTEORDER 1234 - -#endif /* LIBSTUDXML_DETAILS_CONFIG_VC_H */ diff --git a/libstudxml/details/build2/config.h b/libstudxml/details/build2/config.h deleted file mode 100644 index b47f252..0000000 --- a/libstudxml/details/build2/config.h +++ /dev/null @@ -1,45 +0,0 @@ -/* file : libstudxml/details/build2/config.h - * copyright : Copyright (c) 2013-2017 Code Synthesis Tools CC - * license : MIT; see accompanying LICENSE file - */ - -/* Static configuration file for the build2 build. */ - -#ifndef LIBSTUDXML_DETAILS_CONFIG_H -#define LIBSTUDXML_DETAILS_CONFIG_H - -/* Define LIBSTUDXML_BUILD2 for the installed case. */ -#ifndef LIBSTUDXML_BUILD2 -# define LIBSTUDXML_BUILD2 -#endif - -#ifdef __FreeBSD__ -# include /* BYTE_ORDER */ -#else -# if defined(_WIN32) -# ifndef BYTE_ORDER -# define BIG_ENDIAN 4321 -# define LITTLE_ENDIAN 1234 -# define BYTE_ORDER LITTLE_ENDIAN -# endif -# else -# include /* BYTE_ORDER/__BYTE_ORDER */ -# ifndef BYTE_ORDER -# ifdef __BYTE_ORDER -# define BYTE_ORDER __BYTE_ORDER -# define BIG_ENDIAN __BIG_ENDIAN -# define LITTLE_ENDIAN __LITTLE_ENDIAN -# else -# error no BYTE_ORDER/__BYTE_ORDER define -# endif -# endif -# endif -#endif - -#if BYTE_ORDER == BIG_ENDIAN -# define LIBSTUDXML_BYTEORDER 4321 -#else -# define LIBSTUDXML_BYTEORDER 1234 -#endif - -#endif /* LIBSTUDXML_DETAILS_CONFIG_H */ diff --git a/libstudxml/details/config-vc.h b/libstudxml/details/config-vc.h index 7528b0e..3c2f9ab 100644 --- a/libstudxml/details/config-vc.h +++ b/libstudxml/details/config-vc.h @@ -3,11 +3,13 @@ * license : MIT; see accompanying LICENSE file */ -/* Configuration file for Windows/VC++. */ +/* Configuration file for Windows/VC++ for the build2 build. */ #ifndef LIBSTUDXML_DETAILS_CONFIG_VC_H #define LIBSTUDXML_DETAILS_CONFIG_VC_H +// Always little-endian, at least on i686 and x86_64. +// #define LIBSTUDXML_BYTEORDER 1234 #endif /* LIBSTUDXML_DETAILS_CONFIG_VC_H */ diff --git a/libstudxml/details/config.h b/libstudxml/details/config.h new file mode 100644 index 0000000..b31aa2d --- /dev/null +++ b/libstudxml/details/config.h @@ -0,0 +1,40 @@ +/* file : libstudxml/details/build2/config.h + * copyright : Copyright (c) 2013-2017 Code Synthesis Tools CC + * license : MIT; see accompanying LICENSE file + */ + +/* Static configuration file for the build2 build. */ + +#ifndef LIBSTUDXML_DETAILS_CONFIG_H +#define LIBSTUDXML_DETAILS_CONFIG_H + +#ifdef __FreeBSD__ +# include /* BYTE_ORDER */ +#else +# if defined(_WIN32) +# ifndef BYTE_ORDER +# define BIG_ENDIAN 4321 +# define LITTLE_ENDIAN 1234 +# define BYTE_ORDER LITTLE_ENDIAN +# endif +# else +# include /* BYTE_ORDER/__BYTE_ORDER */ +# ifndef BYTE_ORDER +# ifdef __BYTE_ORDER +# define BYTE_ORDER __BYTE_ORDER +# define BIG_ENDIAN __BIG_ENDIAN +# define LITTLE_ENDIAN __LITTLE_ENDIAN +# else +# error no BYTE_ORDER/__BYTE_ORDER define +# endif +# endif +# endif +#endif + +#if BYTE_ORDER == BIG_ENDIAN +# define LIBSTUDXML_BYTEORDER 4321 +#else +# define LIBSTUDXML_BYTEORDER 1234 +#endif + +#endif /* LIBSTUDXML_DETAILS_CONFIG_H */ diff --git a/libstudxml/details/config.h.in b/libstudxml/details/config.h.in deleted file mode 100644 index 83b633c..0000000 --- a/libstudxml/details/config.h.in +++ /dev/null @@ -1,15 +0,0 @@ -/* file : libstudxml/details/config.h.in - * copyright : Copyright (c) 2013-2017 Code Synthesis Tools CC - * license : MIT; see accompanying LICENSE file - */ - -/* This file is automatically processed by configure. */ - -#ifndef LIBSTUDXML_DETAILS_CONFIG_H -#define LIBSTUDXML_DETAILS_CONFIG_H - -#undef LIBSTUDXML_STATIC_LIB -#undef LIBSTUDXML_EXTERNAL_EXPAT -#undef LIBSTUDXML_BYTEORDER - -#endif /* LIBSTUDXML_DETAILS_CONFIG_H */ diff --git a/libstudxml/details/config.hxx b/libstudxml/details/config.hxx index 68b9dbd..d42d2cf 100644 --- a/libstudxml/details/config.hxx +++ b/libstudxml/details/config.hxx @@ -31,20 +31,10 @@ # define STUDXML_NOTHROW_NOEXCEPT throw() #endif -// Note: the same in expat/config.h -// -#ifdef LIBSTUDXML_BUILD2 -# ifdef _MSC_VER -# include -# else -# include -# endif +#ifdef _MSC_VER +# include #else -# ifdef _MSC_VER -# include -# else -# include -# endif +# include #endif #endif // LIBSTUDXML_DETAILS_CONFIG_HXX diff --git a/libstudxml/details/expat/config.h b/libstudxml/details/expat/config.h index f76e6d8..99fa673 100644 --- a/libstudxml/details/expat/config.h +++ b/libstudxml/details/expat/config.h @@ -1,18 +1,10 @@ #ifndef EXPAT_CONFIG_H #define EXPAT_CONFIG_H -#ifdef LIBSTUDXML_BUILD2 -# ifdef _MSC_VER -# include -# else -# include -# endif +#ifdef _MSC_VER +# include #else -# ifdef _MSC_VER -# include -# else -# include -# endif +# include #endif #define BYTEORDER LIBSTUDXML_BYTEORDER diff --git a/libstudxml/details/export.hxx b/libstudxml/details/export.hxx index 9c8ced7..b4a385e 100644 --- a/libstudxml/details/export.hxx +++ b/libstudxml/details/export.hxx @@ -5,8 +5,6 @@ #ifndef LIBSTUDXML_DETAILS_EXPORT_HXX #define LIBSTUDXML_DETAILS_EXPORT_HXX -#include - // Normally we don't export class templates (but do complete specializations), // inline functions, and classes with only inline member functions. Exporting // classes that inherit from non-exported/imported bases (e.g., std::string) @@ -15,8 +13,6 @@ // used before their inline definition. The workaround is to reorder code. In // the end it's all trial and error. -#ifdef LIBSTUDXML_BUILD2 - #if defined(LIBSTUDXML_STATIC) // Using static. # define LIBSTUDXML_EXPORT #elif defined(LIBSTUDXML_STATIC_BUILD) // Building static. @@ -42,34 +38,4 @@ # define LIBSTUDXML_EXPORT // Using static or shared. #endif -#else // LIBSTUDXML_BUILD2 - -#ifdef LIBSTUDXML_STATIC_LIB -# define LIBSTUDXML_EXPORT -#else -# ifdef _WIN32 -# ifdef _MSC_VER -# ifdef LIBSTUDXML_DYNAMIC_LIB -# define LIBSTUDXML_EXPORT __declspec(dllexport) -# else -# define LIBSTUDXML_EXPORT __declspec(dllimport) -# endif -# else -# ifdef LIBSTUDXML_DYNAMIC_LIB -# ifdef DLL_EXPORT -# define LIBSTUDXML_EXPORT __declspec(dllexport) -# else -# define LIBSTUDXML_EXPORT -# endif -# else -# define LIBSTUDXML_EXPORT __declspec(dllimport) -# endif -# endif -# else -# define LIBSTUDXML_EXPORT -# endif -#endif - -#endif // LIBSTUDXML_BUILD2 - #endif // LIBSTUDXML_DETAILS_EXPORT_HXX -- cgit v1.1