Skip to content
Commits on Source (13)
2021-05-20 Kjell Ahlstedt <kjellahlstedt@gmail.com>
1.0.3
2021-05-18 Kjell Ahlstedt <kjellahlstedt@gmail.com>
skeletonmm: Add dependencies to Doxygen tag files in subprojects
Doxygen in a main project shall not be called before tag files have been
created or updated in subprojects.
2021-05-18 Kjell Ahlstedt <kjellahlstedt@gmail.com>
Add global_tag_file_target when mm-common is a subproject
A main project can depend on it. Doxygen in a main project shall not
be called before libstdc++.tag has been created or updated.
2021-05-16 Kjell Ahlstedt <kjellahlstedt@gmail.com>
skeletonmm: Make it possible to use it as a subproject
skeleton and glibmm can be subprojects of skeletonmm.
2021-05-05 Kjell Ahlstedt <kjellahlstedt@gmail.com>
Subprojects can use meson.add_dist_script() if meson.version() >= 0.58.0
* meson.build:
* skeletonmm/doc/reference/meson.build:
* skeletonmm/meson.build:
* skeletonmm/skeleton/skeletonmm/meson.build:
Call add_dist_script() in a subproject, if meson.version() >= 0.58.0.
* util/build_scripts/dist-build-scripts.py:
* util/build_scripts/dist-changelog.py:
* util/build_scripts/doc-reference.py:
* util/build_scripts/generate-binding.py:
* util/meson_aux/extra-dist-cmd.py:
Use MESON_PROJECT_DIST_ROOT if it exists, else MESON_DIST_ROOT.
It exists if meson.version() >= 0.58.0.
2021-04-19 Kjell Ahlstedt <kjellahlstedt@gmail.com>
Make quiet installations possible
* util/build_scripts/doc-reference.py:
* util/build_scripts/generate-binding.py:
* util/meson_aux/extra-install-cmd.py: Don't print names of installed
files or other informative messages if the environment variable
MESON_INSTALL_QUIET is set.
It is set by "meson install --quiet" in Meson 0.54.0 and newer.
2021-04-16 Kjell Ahlstedt <kjellahlstedt@gmail.com>
extra-install-cmd.py: Ignore FileNotFoundError
util/meson_aux/extra-install-cmd.py: Ignore FileNotFoundError.
On Windows, subprocess.run() may fail to find aclocal even if
the calling meson.build file has found it. Ignore this case.
https://mail.gnome.org/archives/gtkmm-list/2021-April/msg00005.html
2021-04-04 Kjell Ahlstedt <kjellahlstedt@gmail.com>
skeletonmm: Update Meson build files
Add "implicit_include_directories: false" to library() and executable().
Don't use the deprecated dep.get_pkgconfig_variable() function.
Change dependencies: glibmm-2.4 -> glibmm-2.68, sigc++-2.0 -> sigc++-3.0.
2021-03-12 Kjell Ahlstedt <kjellahlstedt@gmail.com>
meson.build: Make it possible to use mm-common as a subproject
If mm-common is a subproject, make mm-common-get2 that can be executed
without being installed. The main project is built before the subprojects
have been installed.
2021-02-25 Kjell Ahlstedt <kjellahlstedt@gmail.com>
skeletonmm/doc/reference/Doxyfile.in: Remove obsolete entries
2021-02-25 Kjell Ahlstedt <kjellahlstedt@gmail.com>
skeletonmm, Meson build: Use relative paths to untracked/
The paths to the source code in untracked/ shall be relative to the
meson.build file, when library files are built from a tarball.
With absolute paths Meson may generate too long file names.
See merge request gtkmm!61
2020-09-29 Kjell Ahlstedt <kjellahlstedt@gmail.com>
skeletonmm, Meson build: Fix versioning on macOS
See https://github.com/libsigcplusplus/libsigcplusplus/pull/65
2020-09-25 Kjell Ahlstedt <kjellahlstedt@gmail.com>
1.0.2
......@@ -1516,113 +1613,3 @@
* NEWS: Bump release date of mm-common 0.6. Mention new Autoconf
macros for particular program checks.
2009-08-24 Daniel Elstner <danielk@openismus.com>
Mention new Autoconf macros in README
* README: Mention the new Autoconf macros added to mm-pkg.m4. Also,
elaborate on how exactly ACLOCAL_FLAGS will have to be prepared when
not using a system package of mm-common or a jhbuild environment.
2009-08-23 Daniel Elstner <daniel.kitta@gmail.com>
Implement check for GNU make features
* macros/mm-pkg.m4 (MM_CHECK_GNU_MAKE): New Autoconf macro to ensure
that the installed make program is compatible with GNU make.
* macros/mm-module.m4 (MM_INIT_MODULE): Require MM_CHECK_GNU_MAKE.
* macros/mm-doc.m4 (MM_CONFIG_DOCTOOL_DIR): ditto.
2009-08-23 Daniel Elstner <daniel.kitta@gmail.com>
Smoothen documentation magic complexity
* macros/mm-doc.m4 (_MM_CONFIG_DOCTOOL_DIR): Collapse redundant
indirection through $mm_doctooldir.
(_MM_ARG_ENABLE_DOCUMENTATION): Reorganize the error handling logic.
Report all utilities which are missing, not just the first one.
(_MM_TR_URI): New internal helper macro, defining the shell construct
used to create a file:// URI from a native filesystem path.
(_MM_ARG_WITH_TAGFILE_DOC): Use new _MM_TR_URI() macro.
* build/doc-reference.am (docdir_base_uri): Split expression into two
variable assignments for clarity. Use $(subst ,, ) trick instead of
auxiliary variables to define a literal space character.
2009-08-21 Daniel Elstner <daniel.kitta@gmail.com>
Add missing backslash escape
* util/mm-common-prepare.in: Insert a missing backslash to escape
another backslash within a double-quoted sed script. Apparently it
accidentally worked even without proper escaping.
2009-08-21 Daniel Elstner <danielk@openismus.com>
Remove mistaken M4 assertion
* macros/mm-pkg.m4 (MM_CHECK_PERL): Remove the bogus m4_assert() on
the number of arguments being at least two. Since a default action
is implemented, it is perfectly valid to call MM_CHECK_PERL() with
less than two arguments.
2009-08-21 Daniel Elstner <danielk@openismus.com>
Refactor Perl checks into separate Autoconf macros
* macros/mm-pkg.m4 (MM_PATH_PERL): New Autoconf macro to locate the
Perl interpreter executable.
(MM_CHECK_PERL): New Autoconf macro to require a minimum version of
the Perl interpreter.
* macros/mm-doc.m4 (_MM_ARG_ENABLE_DOCUMENTATION): Remove Perl check.
(MM_ARG_ENABLE_DOCUMENTATION): Require MM_PATH_PERL.
2009-08-20 Daniel Elstner <danielk@openismus.com>
Prepare for mm-common 0.6 release
* configure.ac (AC_INIT): Bump version number to 0.6.
* NEWS: Summarize changes since mm-common 0.5.
2009-08-20 Daniel Elstner <danielk@openismus.com>
Make version components available as substitutions
* macros/mm-module.m4 (_MM_INIT_MODULE_VERSION): Make the major, minor
and micro version number components available as substitutions through
AC_SUBST(), in addition to defining the preprocessor macros.
(MM_INIT_MODULE): Document the new substitutions.
2009-08-19 Daniel Elstner <danielk@openismus.com>
Disable documentation if utilities are missing
* macros/mm-doc.m4 (_MM_ARG_ENABLE_DOCUMENTATION): If one of the
required utilities for the documentation build is missing, display
a warning message and disable the documentation build, but otherwise
continue execution. However, do abort with an error if the configure
option --enable-documentation was used explicitly.
2009-08-19 Daniel Elstner <danielk@openismus.com>
Use URIs instead of OS path names in markup files
* macros/mm-doc.m4 (_MM_ARG_WITH_TAGFILE_DOC): Translate local path
names to file:// URIs, since these path names end up in XML and HTML
files. The canonical representation also simplifies the translation
from absolute to relative path names during installation.
* build/doc-reference.am (htmlref_install): Take the new file:// URI
prefix into account when translating from absolute to relative links.
2009-08-19 Daniel Elstner <danielk@openismus.com>
Bump mm-doc.m4 #serial
2009-08-19 Daniel Elstner <danielk@openismus.com>
Turn doc-postprocess.pl into a good Unix citizen
* util/doc-postprocess.pl: Implement rudimentary error reporting and
minimal command-line option handling, so that at least --help works.
Also, refine some of the substitutions performed and add new ones to
translate entity references to numerical code points.
......@@ -130,6 +130,7 @@ MAINTAINERCLEANFILES = $(dist_doctags_DATA)
EXTRA_DIST = \
meson.build \
meson_options.txt \
util/meson_aux/copy-files.py \
util/meson_aux/extra-dist-cmd.py \
util/meson_aux/extra-install-cmd.py \
util/meson_aux/libstdcxx-tag.py \
......
mm-common 1.0.3 (2021-05-20)
Meson build:
* Make it possible to use mm-common as a subproject
(Kjell Ahlstedt)
* extra-install-cmd.py: Ignore FileNotFoundError
(Kjell Ahlstedt)
* Make quiet installations possible
(Kjell Ahlstedt)
Skeletonmm:
* Fix versioning on macOS
(Kjell Ahlstedt) Pull request sigc++!65 (Tom Schoonjans)
* Use relative paths to untracked/
(Kjell Ahlstedt) Merge request gtkmm!61 (Mingli Yu)
* Update dependencies in Meson build files:
glibmm-2.4 -> glibmm-2.68, sigc++-2.0 -> sigc++-3.0
(Kjell Ahlstedt)
* Make it possible to use skeletonmm as a subproject
(Kjell Ahlstedt)
mm-common 1.0.2 (2020-09-25)
* util/doc-install.pl: Update for Doxygen >= 1.8.16
......
......@@ -15,7 +15,7 @@
## You should have received a copy of the GNU General Public License
## along with mm-common. If not, see <http://www.gnu.org/licenses/>.
AC_INIT([mm-common], [1.0.2], [https://gitlab.gnome.org/GNOME/mm-common/issues/],
AC_INIT([mm-common], [1.0.3], [https://gitlab.gnome.org/GNOME/mm-common/issues/],
[mm-common], [http://www.gtkmm.org/])
AC_PREREQ([2.59])
AC_CONFIG_SRCDIR([util/mm-common-prepare.in])
......
# This file is part of mm-common.
project('mm-common',
version: '1.0.2',
meson_version: '>= 0.50.0', # required for python3.path()
version: '1.0.3',
meson_version: '>= 0.54.0', # required for meson.override_dependency()
license: 'GPLv2+'
)
......@@ -283,7 +283,7 @@ if get_option('use-network')
endif
# Download libstdc++.tag if it does not exist or if it's out of date.
custom_target('libstdc++.tag',
tag_file = custom_target('libstdc++.tag',
output: 'libstdc++.tag',
command: [
python3,
......@@ -298,8 +298,9 @@ custom_target('libstdc++.tag',
install: true
)
if not meson.is_subproject()
# Modify the contents of the distribution directory. (not allowed in a subproject)
if not meson.is_subproject() or meson.version().version_compare('>= 0.58.0')
# Modify the contents of the distribution directory.
# (not allowed in a subproject if meson.version() < 0.58.0)
meson.add_dist_script(
python3.path(),
script_dir / 'extra-dist-cmd.py',
......@@ -308,6 +309,54 @@ if not meson.is_subproject()
)
endif
if meson.is_subproject()
# A version of mm-common-get that can be executed uninstalled.
conf_data_subproj = configuration_data()
conf_data_subproj.merge_from(conf_data)
conf_data_subproj.set('configure_input', 'mm-common-get2 (for execution uninstalled). Generated from util/mm-common-get.in')
conf_data_subproj.set('datadir_py', project_build_root)
mm_common_get2 = configure_file(
input: 'util' / 'mm-common-get.in',
output: 'mm-common-get2',
configuration: conf_data_subproj,
install: false,
)
# Make the uninstalled mm-common-get2 executable.
cmd_py = '''
import os
import sys
os.chmod(sys.argv[1], 0o755)'''
run_command(python3, '-c', cmd_py, project_build_root / 'mm-common-get2')
# A main project that looks for mm-common-get shall find mm_common_get2.
meson.override_find_program('mm-common-get', mm_common_get2)
# Copy files needed by mm-common-get2 from source dir to build dir.
# The directory structure must be the same as in the installation directory.
run_command(python3, script_dir / 'copy-files.py',
project_source_root / 'util' / 'build_scripts',
project_build_root / meson.project_name() / 'build',
meson_build_support_basefiles,
)
run_command(python3, script_dir / 'copy-files.py',
project_source_root / 'util',
project_build_root / meson.project_name() / 'doctool',
doctool_basefiles,
)
mm_common_libstdc_dep = declare_dependency(
variables: {
'doxytagfile': project_build_root / 'libstdc++.tag',
'htmlrefpub': 'http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/'
}
)
# A main project that looks for mm-common-libstdc++.pc shall find mm_common_libstdc_dep.
meson.override_dependency('mm-common-libstdc++', mm_common_libstdc_dep)
# May be used in a main project.
global_tag_file_target = tag_file
endif
# Print a summary.
summary = [
'',
......
......@@ -36,7 +36,6 @@ SEPARATE_MEMBER_PAGES = NO
TAB_SIZE = 8
ALIASES = "newin{2}=\xrefitem since_\1_\2 \"Since @PACKAGE_NAME@ \1.\2\" \"New API in @PACKAGE_NAME@ \1.\2\"" \
"newin{3}=\xrefitem since_\1_\2_\3 \"Since @PACKAGE_NAME@ \1.\2.\3\" \"New API in @PACKAGE_NAME@ \1.\2.\3\""
TCL_SUBST =
OPTIMIZE_OUTPUT_FOR_C = NO
OPTIMIZE_OUTPUT_JAVA = NO
OPTIMIZE_FOR_FORTRAN = NO
......@@ -221,7 +220,7 @@ LATEX_OUTPUT = latex
LATEX_CMD_NAME = latex
MAKEINDEX_CMD_NAME = makeindex
COMPACT_LATEX = NO
PAPER_TYPE = a4wide
PAPER_TYPE = a4
EXTRA_PACKAGES =
LATEX_HEADER =
LATEX_FOOTER =
......
......@@ -2,34 +2,49 @@
# Input: built_files_root, project_source_root, skeletonmm_pcname, python3,
# hg_ccg_basenames, extra_h_files, built_h_file_targets, install_datadir,
# doc_reference
# Output: install_docdir, install_devhelpdir
# doc_reference, can_add_dist_script
# Output: install_docdir, install_devhelpdir, if build_documentation: tag_file
tag_file_modules = [
'mm-common-libstdc++',
'sigc++-2.0',
'glibmm-2.4',
'sigc++-3.0',
'glibmm-2.68',
# or:
# 'mm-common-libstdc++',
# 'sigc++-2.0',
# 'glibmm-2.4',
]
doxygen_tagfiles = ''
doxygen_tag_targets = []
docinstall_flags = []
foreach module : tag_file_modules
depmod = dependency(module, required: false)
if depmod.found()
doxytagfile = depmod.get_pkgconfig_variable('doxytagfile')
htmlrefpub = depmod.get_pkgconfig_variable('htmlrefpub', default: '')
htmlrefdir = depmod.get_pkgconfig_variable('htmlrefdir', default: '')
if htmlrefpub == ''
htmlrefpub = htmlrefdir
elif htmlrefdir == ''
htmlrefdir = htmlrefpub
endif
doxygen_tagfiles += ' "' + doxytagfile + '=' + htmlrefpub + '"'
# Doxygen <= 1.8.15
docinstall_flags += ['-l', doxytagfile.split('/')[-1] + '@' + htmlrefdir]
if htmlrefpub != htmlrefdir
# Doxygen >= 1.8.16
docinstall_flags += ['-l', 's@' + htmlrefpub + '@' + htmlrefdir]
doxytagfile = depmod.get_variable(pkgconfig: 'doxytagfile', internal: 'doxytagfile', default_value: '')
if doxytagfile != ''
if depmod.type_name() == 'internal'
# Subprojects must build their tag files before doxygen is called.
if module.startswith('mm-common')
doxygen_tag_targets += subproject('mm-common').get_variable('global_tag_file_target')
else
doxygen_tag_targets += subproject(module).get_variable('global_tag_file_target')
endif
endif
htmlrefpub = depmod.get_variable(pkgconfig: 'htmlrefpub', internal: 'htmlrefpub', default_value: '')
htmlrefdir = depmod.get_variable(pkgconfig: 'htmlrefdir', internal: 'htmlrefdir', default_value: '')
if htmlrefpub == ''
htmlrefpub = htmlrefdir
elif htmlrefdir == ''
htmlrefdir = htmlrefpub
endif
doxygen_tagfiles += ' "' + doxytagfile + '=' + htmlrefpub + '"'
# Doxygen <= 1.8.15
docinstall_flags += ['-l', doxytagfile.split('/')[-1] + '@' + htmlrefdir]
if htmlrefpub != htmlrefdir
# Doxygen >= 1.8.16
docinstall_flags += ['-l', 's@' + htmlrefpub + '@' + htmlrefdir]
endif
endif
endif
endforeach
......@@ -48,7 +63,7 @@ doc_conf_data.set('abs_top_srcdir', project_source_root)
doc_conf_data.set('SKELETONMM_MODULE_NAME', book_name)
doc_conf_data.set('DOXYGEN_TAGFILES', doxygen_tagfiles)
configure_file(
doxyfile = configure_file(
input: 'Doxyfile.in',
output: '@BASENAME@',
configuration: doc_conf_data,
......@@ -106,6 +121,8 @@ tag_file = custom_target('html_and_tag',
src_h_files,
built_h_files,
],
depend_files: doxyfile,
depends: doxygen_tag_targets,
build_by_default: build_documentation,
install: true,
install_dir: install_reference_docdir,
......@@ -135,9 +152,8 @@ meson.add_install_script(
docinstall_flags
)
if not meson.is_subproject()
if can_add_dist_script
# Distribute built files and files copied by mm-common-prepare.
# (add_dist_script() is not allowed in a subproject)
meson.add_dist_script(
python3.path(), doc_reference, 'dist_doc',
doctool_dir,
......
# examples
# input: gnome, skeletonmm_dep, build_examples
# input: gnome, skeletonmm_own_dep, build_examples
examples = [
# [[dir-name], exe-name, [sources]]
......@@ -27,7 +27,8 @@ foreach ex : examples
endforeach
exe_file = executable(ex_name, ex_sources, resources,
dependencies: skeletonmm_dep,
dependencies: skeletonmm_own_dep,
implicit_include_directories: false,
gui_app: true,
build_by_default: build_examples
)
......
......@@ -6,7 +6,8 @@ project('skeletonmm', 'cpp',
default_options: [
'cpp_std=c++17'
],
meson_version: '>= 0.50.0', # required for python3.path()
meson_version: '>= 0.54.0', # required for meson.override_dependency()
# and dep.get_variable(internal:)
)
skeletonmm_api_version = '1.0'
......@@ -29,7 +30,12 @@ libtool_soversion = [0, 0, 0]
skeletonmm_libversion = '@0@.@1@.@2@'.format(
libtool_soversion[0] - libtool_soversion[2],
libtool_soversion[2],
libtool_soversion[1])
libtool_soversion[1]
)
macos_darwin_versions = [
libtool_soversion[0] + 1,
'@0@.@1@'.format(libtool_soversion[0] + 1, libtool_soversion[1])
]
# Use these instead of meson.source_root() and meson.build_root() in subdirectories.
# source_root() and build_root() are not useful, if this is a subproject.
......@@ -82,15 +88,17 @@ install_pkgconfigdir = install_libdir / 'pkgconfig'
# Dependencies.
# skeletonmm_build_dep: Dependencies when building the skeletonmm library.
# skeletonmm_dep (created in skeleton/skeletonmm/meson.build):
# skeletonmm_own_dep (created in skeleton/skeletonmm/meson.build):
# Dependencies when using the skeletonmm library.
glibmm_req = '>= 2.62.0'
glibmm_req = '>= 2.68.0' # E.g. >= 2.66.0 if the dependency is glibmm-2.4
skeleton_req = '>= 1.0.0'
glibmm_dep = dependency('glibmm-2.4', version: glibmm_req)
glibmm_dep = dependency('glibmm-2.68', version: glibmm_req)
# or: glibmm_dep = dependency('glibmm-2.4', version: glibmm_req)
skeleton_dep = dependency('skeleton-1.0', version: skeleton_req)
skeletonmm_build_dep = [glibmm_dep, skeleton_dep]
skeletonmm_requires = ' '.join([
'glibmm-2.4', glibmm_req,
'glibmm-2.68', glibmm_req,
# or: 'glibmm-2.4', glibmm_req,
'skeleton-1.0', skeleton_req,
])
gnome = import('gnome')
......@@ -99,7 +107,11 @@ gnome = import('gnome')
# reference documentation shall be built.
mm_common_get = find_program('mm-common-get', required: false)
if maintainer_mode and not mm_common_get.found()
error('mm-common-get not found. mm-common >= 1.0.0 is required.')
message('Maintainer mode requires the \'mm-common-get\' command. If it is not found,\n' +
'install the \'mm-common\' package, version 1.0.0 or higher.')
# If meson --wrap-mode != forcefallback, Meson falls back to the mm-common
# subproject only if mm-common-get is required.
mm_common_get = find_program('mm-common-get', required: true)
endif
m4 = find_program('m4', required: maintainer_mode) # Used by gmmproc (in glibmm)
perl = find_program('perl', required: maintainer_mode or build_documentation)
......@@ -108,7 +120,7 @@ dot = find_program('dot', required: build_documentation) # Used by Doxygen
xsltproc = find_program('xsltproc', required: build_documentation)
# Where to find gmmproc and generate_wrap_init.pl.
gmmproc_dir = glibmm_dep.get_pkgconfig_variable('gmmprocdir')
gmmproc_dir = glibmm_dep.get_variable(pkgconfig: 'gmmprocdir', internal: 'gmmprocdir')
# Script files copied to 'untracked' by mm-common-get.
script_dir = project_source_root / 'untracked' / 'build_scripts'
......@@ -154,21 +166,23 @@ endif
warning_flags = cpp_compiler.get_supported_arguments(warning_flags)
add_project_arguments(warning_flags, language: 'cpp')
# add_dist_script() is not allowed in a subproject if meson.version() < 0.58.0.
can_add_dist_script = not meson.is_subproject() or meson.version().version_compare('>= 0.58.0')
subdir('tools/extra_defs_gen')
subdir('skeleton')
subdir('examples')
subdir('tests')
subdir('doc/reference')
if not meson.is_subproject()
if can_add_dist_script
# Add a ChangeLog file to the distribution directory.
# (add_dist_script() is not allowed in a subproject)
meson.add_dist_script(
python3.path(), dist_changelog,
project_source_root,
)
# Add build scripts to the distribution directory, and delete .gitignore
# files and an empty $MESON_DIST_ROOT/build/ directory.
# files and an empty $MESON_PROJECT_DIST_ROOT/build/ directory.
meson.add_dist_script(
python3.path(), dist_build_scripts,
project_source_root,
......@@ -176,6 +190,27 @@ if not meson.is_subproject()
)
endif
if meson.is_subproject()
pkgconfig_vars = {
'gmmprocm4dir': project_source_root / 'tools' / 'm4',
'htmlrefdir': install_prefix / install_docdir / 'reference' / 'html',
'htmlrefpub': 'http://library.gnome.org/devel/' + pkg_conf_data.get_unquoted('PACKAGE_TARNAME') + '/unstable/'
}
if build_documentation
pkgconfig_vars += {'doxytagfile': tag_file.full_path()}
# May be used in a main project.
global_tag_file_target = tag_file
endif
skeletonmm_dep = declare_dependency(
dependencies: skeletonmm_own_dep,
variables: pkgconfig_vars,
)
# A main project that looks for skeletonmm_pcname.pc shall find skeletonmm_dep.
meson.override_dependency(skeletonmm_pcname, skeletonmm_dep)
endif
# Print a summary.
real_maintainer_mode = ''
if maintainer_mode_opt == 'if-git-build'
......
......@@ -5,6 +5,8 @@ datarootdir=@datarootdir@
datadir=@datadir@
includedir=@includedir@
gmmprocm4dir=${libdir}/@SKELETONMM_MODULE_NAME@/proc/m4
docdir=${datarootdir}/doc/@SKELETONMM_MODULE_NAME@
doxytagfile=${docdir}/reference/@SKELETONMM_MODULE_NAME@.tag
htmlrefdir=${docdir}/reference/html
......
......@@ -2,9 +2,9 @@
# Input: skeletonmm_build_dep, skeletonmm_pcname, maintainer_mode, project_source_root,
# generate_binding, m4_files, skeletonmm_libversion, install_includedir,
# python3
# macos_darwin_versions, python3, can_add_dist_script
# Output: hg_ccg_basenames, extra_h_files, built_h_file_targets, built_files_root,
# skeletonmm_dep
# skeletonmm_own_dep
defs_basefiles = [
'skeleton.defs',
......@@ -35,6 +35,7 @@ install_headers('..' / 'skeletonmm.h', subdir: skeletonmm_pcname)
install_headers(extra_h_files, subdir: skeletonmm_pcname / 'skeletonmm')
untracked_skeletonmm = 'untracked' / 'skeleton' / 'skeletonmm'
rel_untracked_skeletonmm = '..' / '..' / untracked_skeletonmm
src_untracked_skeletonmm = project_source_root / untracked_skeletonmm
if maintainer_mode
......@@ -96,6 +97,8 @@ if maintainer_mode
skeletonmm_library = library(skeletonmm_pcname,
built_cc_file_targets, built_h_file_targets, extra_cc_files,
version: skeletonmm_libversion,
darwin_versions: macos_darwin_versions,
implicit_include_directories: false,
include_directories: extra_include_dirs,
dependencies: skeletonmm_build_dep,
install: true,
......@@ -128,15 +131,17 @@ else # not maintainer_mode
hg_ccg_basenames,
)
built_cc_files = [ src_untracked_skeletonmm / 'wrap_init.cc' ]
built_cc_files = [ rel_untracked_skeletonmm / 'wrap_init.cc' ]
foreach file : hg_ccg_basenames
built_cc_files += src_untracked_skeletonmm / file + '.cc'
built_cc_files += rel_untracked_skeletonmm / file + '.cc'
endforeach
extra_include_dirs = [ '..', '..' / '..' / 'untracked' / 'skeleton' ]
skeletonmm_library = library(skeletonmm_pcname,
built_cc_files, extra_cc_files,
version: skeletonmm_libversion,
darwin_versions: macos_darwin_versions,
implicit_include_directories: false,
include_directories: extra_include_dirs,
dependencies: skeletonmm_build_dep,
install: true,
......@@ -154,9 +159,8 @@ meson.add_install_script(
hg_ccg_basenames
)
if not meson.is_subproject()
if can_add_dist_script
# Distribute built files.
# (add_dist_script() is not allowed in a subproject)
meson.add_dist_script(
python3.path(), generate_binding, 'dist_built_files',
built_h_cc_dir,
......@@ -165,9 +169,9 @@ if not meson.is_subproject()
)
endif
# This is useful in the main project when skeletonmm is used as a subproject.
# It's also used when building example programs and test programs.
skeletonmm_dep = declare_dependency(
# This is used when building example programs and test programs.
# It's also a part of skeletonmm_dep, when skeletonmm is a subproject.
skeletonmm_own_dep = declare_dependency(
sources: built_h_file_targets,
link_with: skeletonmm_library,
include_directories: extra_include_dirs,
......
[wrap-git]
directory=glibmm-2.4
url=https://gitlab.gnome.org/GNOME/glibmm.git
revision=glibmm-2-66
depth=1
[provide]
dependency_names = glibmm-2.4, giomm-2.4
[wrap-git]
directory=glibmm
url=https://gitlab.gnome.org/GNOME/glibmm.git
revision=master
depth=1
[provide]
dependency_names = glibmm-2.68, giomm-2.68
[wrap-git]
directory=skeleton
url=https://gitlab.gnome.org/GNOME/skeleton.git
revision=master
depth=1
[provide]
skeleton-1.0 = libskeleton_dep
# tests
# input: gnome, skeletonmm_dep
# input: gnome, skeletonmm_own_dep
tests = [
# [[dir-name], exe-name, [sources]]
......@@ -28,7 +28,8 @@ foreach ex : tests
endforeach
exe_file = executable(ex_name, ex_sources, resources,
dependencies: skeletonmm_dep,
dependencies: skeletonmm_own_dep,
implicit_include_directories: false,
gui_app: false,
build_by_default: true
)
......
# tools/extra_defs_gen
# Input: cpp_compiler, skeletonmm_build_dep, install_libdir, skeletonmm_pcname
# Input: cpp_compiler, skeletonmm_build_dep, install_libdir, skeletonmm_pcname,
# glibmm_dep
# Output: m4_files, install_m4dir
glibmm_generate_extra_defs_dep = cpp_compiler.find_library(
'glibmm_generate_extra_defs-2.4',
'glibmm_generate_extra_defs-2.68',
# or: 'glibmm_generate_extra_defs-2.4',
required: glibmm_dep.type_name() != 'internal',
)
if not glibmm_generate_extra_defs_dep.found()
glibmm_generate_extra_defs_dep = dependency(
'', fallback: ['glibmm-2.68', 'glibmm_generate_extra_defs_dep'],
# or: '', fallback: ['glibmm-2.4', 'glibmm_generate_extra_defs_dep'],
)
endif
executable('generate_defs_skeleton', 'generate_defs_skeleton.cc',
dependencies: [skeletonmm_build_dep, glibmm_generate_extra_defs_dep],
implicit_include_directories: false,
install: false,
)
......
......@@ -6,16 +6,17 @@
# dist-build-scripts.py <root_src_dir> <script_dir> <no_dist>...
# <script_dir> The directory with the build scripts, relative to <root_source_dir>.
# <no_dist> Zero or more names (relative to MESON_DIST_ROOT) of files and
# directories that shall not be distributed.
# <no_dist> Zero or more names (relative to MESON_PROJECT_DIST_ROOT)
# of files and directories that shall not be distributed.
import os
import sys
import shutil
dist_root = os.getenv('MESON_DIST_ROOT')
# MESON_PROJECT_DIST_ROOT is set only if meson.version() >= 0.58.0.
project_dist_root = os.getenv('MESON_PROJECT_DIST_ROOT', os.getenv('MESON_DIST_ROOT'))
src_script_dir = os.path.join(sys.argv[1], sys.argv[2])
dist_script_dir = os.path.join(dist_root, sys.argv[2])
dist_script_dir = os.path.join(project_dist_root, sys.argv[2])
# Create the distribution script directory, if it does not exist.
os.makedirs(dist_script_dir, exist_ok=True)
......@@ -32,12 +33,12 @@ for file in files:
shutil.copy(os.path.join(src_script_dir, file), dist_script_dir)
# Don't distribute .gitignore files.
for dirpath, dirnames, filenames in os.walk(dist_root):
for dirpath, dirnames, filenames in os.walk(project_dist_root):
if '.gitignore' in filenames:
os.remove(os.path.join(dirpath, '.gitignore'))
# Remove an empty MESON_DIST_ROOT/build directory.
dist_build_dir = os.path.join(dist_root, 'build')
# Remove an empty MESON_PROJECT_DIST_ROOT/build directory.
dist_build_dir = os.path.join(project_dist_root, 'build')
if os.path.isdir(dist_build_dir):
try:
os.rmdir(dist_build_dir)
......@@ -45,9 +46,9 @@ if os.path.isdir(dist_build_dir):
# Ignore the error, if not empty.
pass
# Remove specified files and directories from the MESON_DIST_ROOT directory.
# Remove specified files and directories from the MESON_PROJECT_DIST_ROOT directory.
for rel_path in sys.argv[3:]:
abs_path = os.path.join(dist_root, rel_path)
abs_path = os.path.join(project_dist_root, rel_path)
if os.path.isfile(abs_path):
os.remove(abs_path)
elif os.path.isdir(abs_path):
......
......@@ -20,5 +20,7 @@ cmd = [
'--max-count=200',
'--pretty=tformat:%cd %an <%ae>%n%n %s%n%w(0,0,2)%+b',
]
with open(os.path.join(os.getenv('MESON_DIST_ROOT'), 'ChangeLog'), mode='w') as logfile:
# MESON_PROJECT_DIST_ROOT is set only if meson.version() >= 0.58.0.
project_dist_root = os.getenv('MESON_PROJECT_DIST_ROOT', os.getenv('MESON_DIST_ROOT'))
with open(os.path.join(project_dist_root, 'ChangeLog'), mode='w') as logfile:
sys.exit(subprocess.run(cmd, stdout=logfile).returncode)
......@@ -100,14 +100,17 @@ def install_doc():
os.makedirs(destdir_htmlrefdir, exist_ok=True)
os.makedirs(destdir_devhelpdir, exist_ok=True)
verbose = []
if not os.getenv('MESON_INSTALL_QUIET'):
verbose = ['--verbose']
# Install html files.
cmd = [
'perl',
'--',
os.path.join(MMDOCTOOLDIR, 'doc-install.pl'),
'--verbose',
'--mode=0644',
] + sys.argv[6:] + [
] + verbose + sys.argv[6:] + [
'-t', destdir_htmlrefdir,
'--glob',
'--',
......@@ -121,8 +124,8 @@ def install_doc():
'perl',
'--',
os.path.join(MMDOCTOOLDIR, 'doc-install.pl'),
'--verbose',
'--mode=0644',
] + verbose + [
'--book-base=' + prefix_htmlrefdir.rstrip('/'),
'-t', destdir_devhelpdir,
'--',
......@@ -139,10 +142,13 @@ def dist_doc():
# argv[3] argv[4] argv[5] argv[6]
# <doctool_dist_dir> <doc_ref_build_dir> <tagfile> <devhelpfile>
# <doctool_dist_dir> is a distribution directory, relative to MESON_DIST_ROOT.
# <doctool_dist_dir> is a distribution directory, relative to MESON_PROJECT_DIST_ROOT.
# <doc_ref_build_dir> is a relative or absolute path in the build directory.
# <tagfile> and <devhelpfile> are relative or absolute paths in the build directory.
doctool_dist_dir = os.path.join(os.getenv('MESON_DIST_ROOT'), sys.argv[3])
# MESON_PROJECT_DIST_ROOT is set only if meson.version() >= 0.58.0.
project_dist_root = os.getenv('MESON_PROJECT_DIST_ROOT', os.getenv('MESON_DIST_ROOT'))
doctool_dist_dir = os.path.join(project_dist_root, sys.argv[3])
doc_ref_build_dir = sys.argv[4]
tagfile = sys.argv[5]
devhelpfile = sys.argv[6]
......
......@@ -96,15 +96,18 @@ def install_built_h_files():
# Create the installation directory, if it does not exist.
os.makedirs(os.path.join(install_dir, 'private'), exist_ok=True)
quiet = bool(os.getenv('MESON_INSTALL_QUIET'))
for file in sys.argv[4:]:
path_h = os.path.join(built_h_dir, file+'.h')
print('Installing ', path_h, ' to ', install_dir)
if not quiet:
print('Installing ', path_h, ' to ', install_dir)
# shutil.copy2() copies timestamps and some other file metadata.
shutil.copy2(path_h, install_dir)
path_h = os.path.join(built_h_dir, 'private', file+'_p.h')
install_priv_dir = os.path.join(install_dir, 'private')
print('Installing ', path_h, ' to ', install_priv_dir)
if not quiet:
print('Installing ', path_h, ' to ', install_priv_dir)
shutil.copy2(path_h, install_priv_dir)
return 0
......@@ -114,9 +117,12 @@ def dist_built_files():
# <built_h_cc_dir> <dist_dir> <basefilenames>...
# <built_h_cc_dir> is an absolute path in the build directory or source directory.
# <dist_dir> is a distribution directory, relative to MESON_DIST_ROOT.
# <dist_dir> is a distribution directory, relative to MESON_PROJECT_DIST_ROOT.
# MESON_PROJECT_DIST_ROOT is set only if meson.version() >= 0.58.0.
project_dist_root = os.getenv('MESON_PROJECT_DIST_ROOT', os.getenv('MESON_DIST_ROOT'))
built_h_cc_dir = sys.argv[2]
dist_dir = os.path.join(os.getenv('MESON_DIST_ROOT'), sys.argv[3])
dist_dir = os.path.join(project_dist_root, sys.argv[3])
# Create the distribution directory, if it does not exist.
os.makedirs(os.path.join(dist_dir, 'private'), exist_ok=True)
......