Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dune-common
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Core Modules
dune-common
Commits
cc3e1376
Commit
cc3e1376
authored
16 years ago
by
Martin Nolte
Browse files
Options
Downloads
Patches
Plain Diff
automatically add version information to config.h files (see FlySpray #393).
[[Imported from SVN: r5280]]
parent
3e471e50
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
bin/dunecontrol
+1
-0
1 addition, 0 deletions
bin/dunecontrol
m4/dune.m4
+30
-4
30 additions, 4 deletions
m4/dune.m4
with
31 additions
and
4 deletions
bin/dunecontrol
+
1
−
0
View file @
cc3e1376
...
...
@@ -571,6 +571,7 @@ m4_define([DUNE_AC_INIT],[
AC_SUBST([DUNE_MOD_VERSION], [
$version
])
AC_SUBST([DUNE_MOD_NAME], [
$name
])
AC_SUBST([DUNE_MAINTAINER_NAME], [
$maintainer
])
DUNE_PARSE_MODULE_VERSION([
$name
], [
$version
])
# don't build shared libs per default, this is way better for debugging...
m4_ifdef([LT_INIT],
[LT_INIT],
...
...
This diff is collapsed.
Click to expand it.
m4/dune.m4
+
30
−
4
View file @
cc3e1376
...
...
@@ -31,6 +31,31 @@ AC_DEFUN([DUNE_MODULE_ADD_SUMMARY_ENTRY],[
DUNE_ADD_SUMMARY_MOD_ENTRY
(
_dune_name,[
$result
])
])
AC_DEFUN
([
DUNE_PARSE_MODULE_VERSION],[
m4_pushdef
([
_dune_name],
[
$1
])
m4_pushdef
([
_dune_version],
[
$2
])
m4_pushdef
([
_dune_module],
[
m4_translit
(
_dune_name,
[
-],
[
_]
)])
m4_pushdef
([
_DUNE_MODULE],
[
m4_toupper
(
_dune_module
)])
-DUNE_MODULE
[]
_VERSION
=
_dune_version
_DUNE_MODULE[]_VERSION_MAJOR
=
"
`
echo
_dune_version |
awk
'{ split($[]0,s,"."); match(s[[1]],/[[[[:digit:]]]]*/,n); print n[[0]] }'
`
"
_DUNE_MODULE[]_VERSION_MINOR
=
"
`
echo
_dune_version |
awk
'{ split($[]0,s,"."); match(s[[2]],/[[[[:digit:]]]]*/,n); print n[[0]] }'
`
"
_DUNE_MODULE[]_VERSION_REVISION
=
"
`
echo
_dune_version |
awk
'{ split($[]0,s,"."); match(s[[3]],/[[[[:digit:]]]]*/,n); print n[[0]] }'
`
"
if
test
x
$_DUNE_MODULE
[]
_VERSION_REVISION
=
x
;
then
_DUNE_MODULE[]_VERSION_REVISION
=
0
fi
AC_DEFINE_UNQUOTED
(
_DUNE_MODULE[]_VERSION,
"_dune_version"
,
[
Define to the version of] _dune_name
)
AC_DEFINE_UNQUOTED
(
_DUNE_MODULE[]_VERSION_MAJOR,
$_DUNE_MODULE
[]
_VERSION_MAJOR,
[
Define to the major version of] _dune_name
)
AC_DEFINE_UNQUOTED
(
_DUNE_MODULE[]_VERSION_MINOR,
$_DUNE_MODULE
[]
_VERSION_MINOR,
[
Define to the minor version of] _dune_name
)
AC_DEFINE_UNQUOTED
(
_DUNE_MODULE[]_VERSION_REVISION,
$_DUNE_MODULE
[]
_VERSION_REVISION,
[
Define to the revision of] _dune_name
)
m4_popdef
([
_DUNE_MODULE]
)
m4_popdef
([
_dune_module]
)
m4_popdef
([
_dune_version]
)
m4_popdef
([
_dune_name]
)
])
AC_DEFUN
([
DUNE_CHECK_MODULES],[
AC_REQUIRE
([
AC_PROG_CXX]
)
AC_REQUIRE
([
AC_PROG_CXXCPP]
)
...
...
@@ -107,10 +132,10 @@ AC_DEFUN([DUNE_CHECK_MODULES],[
if
test
-d
$_DUNE_MODULE
[]
_ROOT/include/dune
;
then
# Dune was installed into directory given by with-dunecommon
_DUNE_MODULE[]_CPPFLAGS
=
"-I
$_DUNE_MODULE
[]_ROOT/include"
_DUNE_MODULE[]_VERSION
=
"
`
PKG_CONFIG_PATH
=
$PKG_CONFIG_PATH
:
$_DUNE_MODULE
[]
_ROOT/lib/pkgconfig
$PKG_CONFIG
--modversion
_dune_name
`
"
2>/dev/null
_DUNE_MODULE[]_VERSION
=
"
`
PKG_CONFIG_PATH
=
$PKG_CONFIG_PATH
:
$_DUNE_MODULE
[]
_ROOT/lib/pkgconfig
$PKG_CONFIG
--modversion
_dune_name
`
"
2>/dev/null
else
_DUNE_MODULE[]_CPPFLAGS
=
"-I
$_DUNE_MODULE
[]_ROOT"
_DUNE_MODULE[]_VERSION
=
"
`
grep
Version
$_DUNE_MODULE
[]
_ROOT/dune.module |
sed
-e
's/^Version: *//'
`
"
2>/dev/null
_DUNE_MODULE[]_VERSION
=
"
`
grep
Version
$_DUNE_MODULE
[]
_ROOT/dune.module |
sed
-e
's/^Version: *//'
`
"
2>/dev/null
fi
ifelse
(
_dune_symbol,,,[
_DUNE_MODULE[]_LDFLAGS
=
"-L
$_DUNE_MODULE
[]_ROOT/lib"
...
...
@@ -196,8 +221,9 @@ AC_DEFUN([DUNE_CHECK_MODULES],[
AC_SUBST
(
_DUNE_MODULE[]_LDFLAGS,
"
$_DUNE_MODULE
[]_LDFLAGS"
)
AC_SUBST
(
_DUNE_MODULE[]_LIBS,
"
$_DUNE_MODULE
[]_LIBS"
)
AC_SUBST
(
_DUNE_MODULE[]_ROOT,
"
$_DUNE_MODULE
[]_ROOT"
)
AC_DEFINE
(
HAVE_[]_DUNE_MODULE, 1,
[
Define to 1
if
_dune_module was found]
)
AC_DEFINE_UNQUOTED
(
_DUNE_MODULE[]_VERSION,
"
$_DUNE_MODULE
[]_VERSION"
,
[
Define to the version of _dune_module.]
)
AC_DEFINE
(
HAVE_[]_DUNE_MODULE, 1,
[
Define to 1
if
]
_dune_name
[
was found]
)
DUNE_PARSE_MODULE_VERSION
(
_dune_name,
$_DUNE_MODULE
[]
_VERSION
)
# set DUNE_* variables
AC_SUBST
(
DUNE_CPPFLAGS,
"
$DUNE_CPPFLAGS
"
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment