[dia: 54/105] #19: Fix dependencies for target 'run'.
- From: Zander <zbrown src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [dia: 54/105] #19: Fix dependencies for target 'run'.
- Date: Mon, 28 Jan 2019 19:23:52 +0000 (UTC)
commit a81cce41be73a5c67e0eca5b6d7975a07e603c59
Author: Eduard Nicodei <eddnicodei gmail com>
Date: Thu Jan 3 23:59:50 2019 +0000
#19: Fix dependencies for target 'run'.
app/meson.build | 2 +-
lib/plug-ins.c | 15 +++------------
meson.build | 4 +++-
objects/meson.build | 3 +--
plug-ins/drs/meson.build | 2 +-
plug-ins/layout/meson.build | 2 +-
plug-ins/meson.build | 3 +--
plug-ins/python/meson.build | 2 +-
plug-ins/stress/meson.build | 2 +-
plug-ins/wmf/meson.build | 2 +-
10 files changed, 14 insertions(+), 23 deletions(-)
---
diff --git a/app/meson.build b/app/meson.build
index 2e2b50a6..4d4249f9 100644
--- a/app/meson.build
+++ b/app/meson.build
@@ -74,7 +74,7 @@ endif
diaapp_inc = include_directories('.')
-diaapp = executable('dia',
+rundeps += executable('dia',
dia_sources + [dia_app_icons_h, diamarshal_h],
dependencies : [libgtk_dep, libxml_dep, libm_dep],
link_with : [libdia],
diff --git a/lib/plug-ins.c b/lib/plug-ins.c
index 744d8554..10f6afbd 100644
--- a/lib/plug-ins.c
+++ b/lib/plug-ins.c
@@ -309,7 +309,7 @@ for_each_in_dir(const gchar *directory, ForEachInDirDoFunc dofunc,
}
while ((dentry = g_dir_read_name(dp)) != NULL) {
- gchar *name = g_strconcat(directory,G_DIR_SEPARATOR_S,dentry,NULL);
+ gchar *name = g_build_filename(directory,dentry,NULL);
if (filter(name)) dofunc(name);
g_free(name);
@@ -320,22 +320,13 @@ for_each_in_dir(const gchar *directory, ForEachInDirDoFunc dofunc,
static gboolean
directory_filter(const gchar *name)
{
- const char *rslash = strrchr(name, G_DIR_SEPARATOR);
-
- if (rslash && ( 0 == strcmp(rslash, G_DIR_SEPARATOR_S ".")
- || 0 == strcmp(rslash, G_DIR_SEPARATOR_S "..")))
- return FALSE;
-
- if (!g_file_test (name, G_FILE_TEST_IS_DIR))
- return FALSE;
-
- return TRUE;
+ return g_file_test (name, G_FILE_TEST_IS_DIR);
}
static gboolean
dia_plugin_filter(const gchar *name)
{
- if (!g_file_test (name, G_FILE_TEST_IS_REGULAR | G_FILE_TEST_IS_DIR))
+ if (!g_file_test (name, G_FILE_TEST_IS_REGULAR))
return FALSE;
return this_is_a_plugin(name);
diff --git a/meson.build b/meson.build
index 31090261..4b0f5957 100644
--- a/meson.build
+++ b/meson.build
@@ -71,6 +71,8 @@ configure_file(output : 'config.h',
# To fix we should remove #ifdef HAVE_CONFIG_H checks from all source files.
add_project_arguments('-DHAVE_CONFIG_H', language : 'c')
+rundeps = []
+
subdir('po')
subdir('lib')
subdir('objects')
@@ -84,6 +86,6 @@ subdir('shapes')
# Convenience target
run_target('run',
command: [find_program('run_dia.sh')],
- depends: [diaapp, diaobjects, diaplugins],
+ depends: rundeps,
)
meson.add_install_script('meson-helpers/post-install.py', datadir)
diff --git a/objects/meson.build b/objects/meson.build
index f7a4ac61..30ee2d24 100644
--- a/objects/meson.build
+++ b/objects/meson.build
@@ -19,9 +19,8 @@ subdir('Sozi')
subdir('standard')
subdir('UML')
-diaobjects = []
foreach o : dia_object_desc
- diaobjects += library(o[0],
+ rundeps += library(o[0],
o[1],
dependencies : [libc_dep, libgtk_dep, libxml_dep, libm_dep] + o[2],
link_with : libdia,
diff --git a/plug-ins/drs/meson.build b/plug-ins/drs/meson.build
index 5e8b7350..08c8ee28 100644
--- a/plug-ins/drs/meson.build
+++ b/plug-ins/drs/meson.build
@@ -6,7 +6,7 @@ sources = files(
)
# Prevent installation - currently a debug tool only
-shared_library(
+rundeps += shared_library(
'drs_filter',
sources,
dependencies: [libc_dep, libgtk_dep, libm_dep, libxml_dep],
diff --git a/plug-ins/layout/meson.build b/plug-ins/layout/meson.build
index 81cec58a..53ded378 100644
--- a/plug-ins/layout/meson.build
+++ b/plug-ins/layout/meson.build
@@ -13,7 +13,7 @@ endif
# Need to define it as shared module since it depends
# on symbols found in the dia *app* (which will be linked at run-time).
-shared_module(
+rundeps += shared_module(
'layout_filter',
sources,
dependencies: deps,
diff --git a/plug-ins/meson.build b/plug-ins/meson.build
index c655afe4..d6272c85 100644
--- a/plug-ins/meson.build
+++ b/plug-ins/meson.build
@@ -31,10 +31,9 @@ subdir('wpg')
subdir('xfig')
subdir('xslt')
-diaplugins = []
foreach p : install_plugins_desc
message(p[0])
- diaplugins += library(
+ rundeps += library(
p[0],
p[1],
dependencies: [libc_dep, libgtk_dep, libm_dep, libxml_dep] + [p[2]],
diff --git a/plug-ins/python/meson.build b/plug-ins/python/meson.build
index e2dc0fa3..f1dc2120 100644
--- a/plug-ins/python/meson.build
+++ b/plug-ins/python/meson.build
@@ -45,7 +45,7 @@ python_scripts = [
if py_dep.found()
# Same as layout plugin.
- shared_module(
+ rundeps += shared_module(
'python_plugin',
sources,
dependencies: [libc_dep, libxml_dep, libgtk_dep, py_dep],
diff --git a/plug-ins/stress/meson.build b/plug-ins/stress/meson.build
index cb700f02..08876289 100644
--- a/plug-ins/stress/meson.build
+++ b/plug-ins/stress/meson.build
@@ -8,7 +8,7 @@ sources = files(
# TODO: test this on Windows.
if host_machine.system() != 'windows'
- library(
+ rundeps += library(
'stress_filter',
sources,
dependencies: [libc_dep, libgtk_dep, libm_dep],
diff --git a/plug-ins/wmf/meson.build b/plug-ins/wmf/meson.build
index fa0e1a0d..4c541941 100644
--- a/plug-ins/wmf/meson.build
+++ b/plug-ins/wmf/meson.build
@@ -12,7 +12,7 @@ if host_machine.system() == 'windows'
deps += [cc.find_library('comdlg32')]
endif
-library(
+rundeps += library(
'wmf_filter',
sources,
dependencies: [libc_dep, libgtk_dep, libm_dep, libxml_dep] + deps,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]