Skip to content

Commit

Permalink
[49_6] Move OS_XXX from config.h.xmake to tm_configure.hpp.xmake
Browse files Browse the repository at this point in the history
  • Loading branch information
da-liii authored Oct 31, 2023
1 parent 5661a4a commit 96ee476
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 109 deletions.
6 changes: 0 additions & 6 deletions src/System/config.h.xmake
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
/* L1 Kernel */
${define QTTEXMACS}
${define OS_MINGW}
${define OS_GNU_LINUX}
${define OS_MACOS}
${define OS_WIN}
${define OS_WASM}


/* Define to 1 if the system has the type `intptr_t'. */
${define HAVE_INTPTR_T}
Expand Down
6 changes: 1 addition & 5 deletions src/System/config_l3.h.xmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,4 @@
${define HAVE_INTPTR_T}
${define HAVE_STDINT_H}
${define QTTEXMACS}
${define SANITY_CHECKS}
${define OS_MINGW}
${define OS_MACOS}
${define OS_WIN}
${define OS_WASM}
${define SANITY_CHECKS}
26 changes: 16 additions & 10 deletions src/System/tm_configure.hpp.xmake
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,24 @@
#ifndef TM_CONFIGURE_H
#define TM_CONFIGURE_H

#define TEXMACS_VERSION "@VERSION@"
#define XMACS_VERSION "@XMACS_VERSION@"
#define TEXMACS_VERSION "${TEXMACS_VERSION}"
#define XMACS_VERSION "${XMACS_VERSION}"
#define TEXMACS_SOURCES ""
#define PDFHUMMUS_VERSION "@PDFHUMMUS_VERSION@"
#define LOLLY_VERSION "@LOLLY_VERSION@"
#define PDFHUMMUS_VERSION "${PDFHUMMUS_VERSION}"
#define LOLLY_VERSION "${LOLLY_VERSION}"

#define BUILD_USER "@CONFIG_USER@"
#define BUILD_DATE "@VERSION_BUILD@"
#define BUILD_USER "${CONFIG_USER}"
#define BUILD_DATE "${VERSION_BUILD}"

#define TM_DEVEL "@tm_devel@"
#define TM_DEVEL_RELEASE "@tm_devel_release@"
#define TM_STABLE "@tm_stable@"
#define TM_STABLE_RELEASE "@tm_stable_release@"
#define TM_DEVEL "${tm_devel}"
#define TM_DEVEL_RELEASE "${tm_devel_release}"
#define TM_STABLE "${tm_stable}"
#define TM_STABLE_RELEASE "${tm_stable_release}"

${define OS_MINGW}
${define OS_GNU_LINUX}
${define OS_MACOS}
${define OS_WIN}
${define OS_WASM}

#endif // defined TM_CONFIGURE_H
21 changes: 16 additions & 5 deletions src/System/tm_configure_l3.hpp.xmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
#define BUILD_USER "@CONFIG_USER@"
#define BUILD_DATE "@VERSION_BUILD@"
#define TEXMACS_VERSION "@VERSION@"
#define LOLLY_VERSION "@LOLLY_VERSION@"
#define XMACS_VERSION "@XMACS_VERSION@"
#ifndef TM_CONFIGURE_H
#define TM_CONFIGURE_H

#define BUILD_USER "${CONFIG_USER}"
#define BUILD_DATE "${VERSION_BUILD}"
#define LOLLY_VERSION "${LOLLY_VERSION}"
#define XMACS_VERSION "${XMACS_VERSION}"
#define TEXMACS_VERSION "${TEXMACS_VERSION}"

${define OS_MINGW}
${define OS_GNU_LINUX}
${define OS_MACOS}
${define OS_WIN}
${define OS_WASM}

#endif // defined TM_CONFIGURE_H
80 changes: 0 additions & 80 deletions tests/System/Classes/url_test.cpp

This file was deleted.

5 changes: 2 additions & 3 deletions xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ local STABLE_RELEASE = 1

local TM_CONFIGURE_VARS = {
CONFIG_USER = CONFIG_USER,
TEXMACS_VERSION = TEXMACS_VERSION,
XMACS_VERSION = XMACS_VERSION,
tm_devel = "Texmacs-" .. DEVEL_VERSION,
tm_devel_release = "Texmacs-" .. DEVEL_VERSION .. "-" .. DEVEL_RELEASE,
Expand Down Expand Up @@ -125,13 +126,11 @@ function add_tm_configure(target_name, variables)
if target_name == "libmogan" then
add_configfiles("src/System/tm_configure.hpp.xmake", {
filename = "tm_configure.hpp",
pattern = "@(.-)@",
variables = variables
})
else
add_configfiles("src/System/tm_configure.hpp.xmake", {
filename = target_name .. "/tm_configure.hpp",
pattern = "@(.-)@",
variables = variables
})
end
Expand Down Expand Up @@ -183,13 +182,13 @@ target("libkernel_l3") do
})
add_configfiles("src/System/tm_configure_l3.hpp.xmake", {
filename = "L3/tm_configure.hpp",
pattern = "@(.-)@",
variables = {
CONFIG_USER = CONFIG_USER,
CONFIG_OS = CONFIG_OS,
VERSION = TEXMACS_VERSION,
LOLLY_VERSION = LOLLY_VERSION,
XMACS_VERSION = XMACS_VERSION,
TEXMACS_VERSION = TEXMACS_VERSION,
}
})

Expand Down

0 comments on commit 96ee476

Please sign in to comment.