Commit 5211ef74 authored by Rico Tzschichholz's avatar Rico Tzschichholz

build: Use dedicated PACKAGE_VALADOC_* defines

parent a3298c07
......@@ -3,8 +3,7 @@ include $(top_srcdir)/Makefile.common
NULL =
AM_CFLAGS = \
-DPACKAGE_ICONDIR=\"$(datadir)/valadoc/icons/\" \
-DPACKAGE_DATADIR=\"$(libdir)/valadoc\" \
-DPACKAGE_VALADOC_LIBDIR=\"$(libdir)/valadoc\" \
-DPACKAGE_VERSION=\"$(VERSION)\" \
$(COVERAGE_CFLAGS) \
$(LIBGVC_CFLAGS) \
......
......@@ -22,9 +22,6 @@
namespace Valadoc {
[CCode (cprefix = "", cname = "PACKAGE_ICONDIR")]
public extern const string icons_dir;
/**
* Makes a copy of the file src to dest.
*
......
......@@ -64,7 +64,7 @@ public class Valadoc.ModuleLoader : Object {
if (is_doclet(local_path)) {
return local_path;
} else {
return Path.build_filename (Config.PACKAGE_DATADIR, pluginsubdir, pluginpath);
return Path.build_filename (Config.PACKAGE_VALADOC_LIBDIR, pluginsubdir, pluginpath);
}
}
......@@ -73,7 +73,7 @@ public class Valadoc.ModuleLoader : Object {
public static string get_doclet_path (string? docletpath, ErrorReporter reporter) {
if (docletpath == null) {
return Path.build_filename (Config.PACKAGE_DATADIR, "doclets", "html");
return Path.build_filename (Config.PACKAGE_VALADOC_LIBDIR, "doclets", "html");
}
return get_plugin_path (docletpath, "doclets");
......
......@@ -9,7 +9,7 @@ SUBDIRS = \
$(NULL)
AM_CFLAGS = \
-DPACKAGE_DATADIR=\"$(libdir)/valadoc\" \
-DPACKAGE_VALADOC_LIBDIR=\"$(libdir)/valadoc\" \
-DPACKAGE_VERSION=\"$(VERSION)\" \
-I$(top_srcdir)/libvaladoc/ \
-I$(top_srcdir)/gee \
......
......@@ -3,7 +3,7 @@ include $(top_srcdir)/Makefile.common
NULL =
AM_CFLAGS = \
-DPACKAGE_ICONDIR=\"$(datadir)/valadoc/icons/\" \
-DPACKAGE_VALADOC_ICONDIR=\"$(datadir)/valadoc/icons/\" \
-I$(top_srcdir)/gee/ \
-I$(top_srcdir)/vala/ \
-I$(top_srcdir)/libvaladoc/ \
......@@ -35,7 +35,7 @@ libdoclet.vala.stamp: $(libdoclet_la_VALASOURCES)
$(VALAFLAGS) \
-C \
--vapidir $(top_srcdir)/vala --pkg libvala@PACKAGE_SUFFIX@ \
--vapidir $(top_srcdir)/vapi \
--vapidir $(top_srcdir)/vapi --pkg config \
--vapidir $(top_srcdir)/libvaladoc --pkg valadoc@PACKAGE_SUFFIX@ \
$(filter %.vala %.c,$^)
touch $@
......
......@@ -82,7 +82,7 @@ public class Valadoc.Devhelp.Doclet : Valadoc.Html.BasicDoclet {
var rt = DirUtils.create (path, 0777);
rt = DirUtils.create (imgpath, 0777);
copy_directory (icons_dir, path);
copy_directory (Config.PACKAGE_VALADOC_ICONDIR, path);
var devfile = FileStream.open (devpath, "w");
_devhelpwriter = new Devhelp.MarkupWriter (devfile);
......
......@@ -3,7 +3,7 @@ include $(top_srcdir)/Makefile.common
NULL =
AM_CFLAGS = \
-DPACKAGE_ICONDIR=\"$(datadir)/valadoc/icons/\" \
-DPACKAGE_VALADOC_ICONDIR=\"$(datadir)/valadoc/icons/\" \
-I$(top_srcdir)/gee/ \
-I$(top_srcdir)/vala/ \
-I$(top_srcdir)/libvaladoc/ \
......
......@@ -3,7 +3,7 @@ include $(top_srcdir)/Makefile.common
NULL =
AM_CFLAGS = \
-DPACKAGE_ICONDIR=\"$(datadir)/valadoc/icons/\" \
-DPACKAGE_VALADOC_ICONDIR=\"$(datadir)/valadoc/icons/\" \
-I$(top_srcdir)/gee/ \
-I$(top_srcdir)/vala/ \
-I$(top_srcdir)/libvaladoc/ \
......@@ -35,7 +35,7 @@ libdoclet.vala.stamp: $(libdoclet_la_VALASOURCES)
$(VALAFLAGS) \
-C \
--vapidir $(top_srcdir)/vala --pkg libvala@PACKAGE_SUFFIX@ \
--vapidir $(top_srcdir)/vapi \
--vapidir $(top_srcdir)/vapi --pkg config \
--vapidir $(top_srcdir)/libvaladoc --pkg valadoc@PACKAGE_SUFFIX@ \
$(filter %.vala %.c,$^)
touch $@
......
......@@ -73,7 +73,7 @@ public class Valadoc.Html.Doclet : Valadoc.Html.BasicDoclet {
base.process (settings, tree, reporter);
DirUtils.create_with_parents (this.settings.path, 0777);
copy_directory (icons_dir, settings.path);
copy_directory (Config.PACKAGE_VALADOC_ICONDIR, settings.path);
write_wiki_pages (tree, css_path_wiki, js_path_wiki, Path.build_filename(settings.path, settings.pkg_name));
......
......@@ -22,7 +22,7 @@ check-TESTS: $(TESTS)
G_DEBUG=fatal_warnings $(builddir)/driver
AM_CFLAGS = \
-DPACKAGE_DATADIR=\"$(libdir)/valadoc\" \
-DPACKAGE_VALADOC_LIBDIR=\"$(libdir)/valadoc\" \
-DPACKAGE_VERSION=\"$(VERSION)\" \
-DTOP_SRC_DIR=\"$(abs_top_srcdir)\" \
-I$(top_srcdir)/libvaladoc/ \
......
......@@ -24,4 +24,6 @@
namespace Config {
public const string PACKAGE_DATADIR;
public const string PACKAGE_SUFFIX;
public const string PACKAGE_VALADOC_LIBDIR;
public const string PACKAGE_VALADOC_ICONDIR;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment