mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-09-12 07:53:43 +02:00
configure: put buildinfo stuff in own config header
...so there's no need to rebuild everything all the time
This commit is contained in:
32
configure.ac
32
configure.ac
@@ -12,19 +12,27 @@ AC_PROG_CXX
|
|||||||
AC_DISABLE_STATIC
|
AC_DISABLE_STATIC
|
||||||
AM_PROG_LIBTOOL
|
AM_PROG_LIBTOOL
|
||||||
|
|
||||||
# Add build information to config.h
|
# Add build information to local_build_config.h.tmp
|
||||||
# ---------------------------------
|
# -------------------------------------------------
|
||||||
|
rm -f local_build_config.h.tmp
|
||||||
# Add host to config.h
|
cat > local_build_config.h.tmp << EOF
|
||||||
AC_DEFINE_UNQUOTED(USED_BUILD, ["$build"], [Build system under which the program was compiled on.])
|
/* Build system under which the program was compiled on. */
|
||||||
|
#define USED_BUILD "$build"
|
||||||
# Add used CXXFLAGS to config.h
|
/* Define to the used CXXFLAGS to compile this package. */
|
||||||
AC_DEFINE_UNQUOTED(USED_CXXFLAGS, ["$CXXFLAGS"], [Define to the used CXXFLAGS to compile this package.])
|
#define USED_CXXFLAGS "$CXXFLAGS"
|
||||||
|
EOF
|
||||||
# Get compiler (version)
|
|
||||||
AH_TEMPLATE(USED_COMPILER, [Define to name and version of used compiler])
|
|
||||||
if COMPILER=`$CC --version | head -n 1`; then
|
if COMPILER=`$CC --version | head -n 1`; then
|
||||||
AC_DEFINE_UNQUOTED(USED_COMPILER, ["$COMPILER"])
|
cat >> local_build_config.h.tmp <<-EOF
|
||||||
|
/* Define to name and version of used compiler */
|
||||||
|
#define USED_COMPILER "$COMPILER"
|
||||||
|
EOF
|
||||||
|
fi
|
||||||
|
# only update header if it differs to avoid unnecessary rebuilds
|
||||||
|
if ! diff local_build_config.h.tmp local_build_config.h >/dev/null 2>&1; then
|
||||||
|
rm -f local_build_config.h
|
||||||
|
mv local_build_config.h.tmp local_build_config.h
|
||||||
|
else
|
||||||
|
rm -f local_build_config.h.tmp
|
||||||
fi
|
fi
|
||||||
|
|
||||||
AC_ARG_WITH([tremor], [AS_HELP_STRING([--with-tremor],
|
AC_ARG_WITH([tremor], [AS_HELP_STRING([--with-tremor],
|
||||||
|
@@ -33,6 +33,8 @@
|
|||||||
#include <gui/widget/messagebox.h>
|
#include <gui/widget/messagebox.h>
|
||||||
#include <system/helpers.h>
|
#include <system/helpers.h>
|
||||||
|
|
||||||
|
#include <local_build_config.h>
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
CBuildInfo::CBuildInfo() : CComponentsWindow(1, 1, 700, 500, LOCALE_BUILDINFO_MENU, NEUTRINO_ICON_INFO)
|
CBuildInfo::CBuildInfo() : CComponentsWindow(1, 1, 700, 500, LOCALE_BUILDINFO_MENU, NEUTRINO_ICON_INFO)
|
||||||
|
Reference in New Issue
Block a user