[anjuta] libanjuta: Move useful template macros from project wizard to a common directory
- From: Sebastien Granjoux <sgranjoux src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [anjuta] libanjuta: Move useful template macros from project wizard to a common directory
- Date: Mon, 30 Apr 2012 19:09:49 +0000 (UTC)
commit 0fdd127e35c04c995c1508c059d1a2001565af4f
Author: SÃbastien Granjoux <seb sfo free fr>
Date: Sun Apr 29 19:58:21 2012 +0200
libanjuta: Move useful template macros from project wizard to a common directory
configure.ac | 1 +
data/Makefile.am | 2 ++
data/templates/Makefile.am | 9 +++++++++
.../project-wizard => data}/templates/indent.tpl | 0
libanjuta/anjuta-autogen.c | 4 ++++
plugins/project-wizard/templates/Makefile.am | 3 +--
6 files changed, 17 insertions(+), 2 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 8d2f642..ca91609 100644
--- a/configure.ac
+++ b/configure.ac
@@ -763,6 +763,7 @@ pixmaps/48x48/Makefile
pixmaps/scalable/Makefile
data/Makefile
data/welcome.txt
+data/templates/Makefile
doc/anjuta.1
doc/anjuta-launcher.1
doc/Makefile
diff --git a/data/Makefile.am b/data/Makefile.am
index 1538a8d..10422e4 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -4,6 +4,8 @@
## If you don't want it to overwrite it,
## Please disable it in the Anjuta project configuration
+SUBDIRS = templates
+
anjuta_datadir = $(anjuta_data_dir)
anjuta_profiledir = $(anjuta_data_dir)/profiles
diff --git a/data/templates/Makefile.am b/data/templates/Makefile.am
new file mode 100644
index 0000000..3631c9a
--- /dev/null
+++ b/data/templates/Makefile.am
@@ -0,0 +1,9 @@
+# Templates
+template_datadir = "$(anjuta_data_dir)/templates/"
+template_data_DATA = \
+ indent.tpl
+
+EXTRA_DIST = \
+ $(template_data_DATA)
+
+-include $(top_srcdir)/git.mk
diff --git a/plugins/project-wizard/templates/indent.tpl b/data/templates/indent.tpl
similarity index 100%
rename from plugins/project-wizard/templates/indent.tpl
rename to data/templates/indent.tpl
diff --git a/libanjuta/anjuta-autogen.c b/libanjuta/anjuta-autogen.c
index 9f2107a..8e3e37d 100644
--- a/libanjuta/anjuta-autogen.c
+++ b/libanjuta/anjuta-autogen.c
@@ -86,6 +86,8 @@
#define FILE_BUFFER_SIZE 4096
+#define TEMPLATES_DIR PACKAGE_DATA_DIR"/templates"
+
/*---------------------------------------------------------------------------*/
struct _AnjutaAutogen
@@ -620,6 +622,8 @@ anjuta_autogen_init (AnjutaAutogen *this)
/* Create a temporary file for definitions */
this->deffilename = g_build_filename (g_get_tmp_dir (), TMP_DEF_FILENAME, NULL);
mktemp (this->deffilename);
+
+ this->library_paths = g_list_prepend (NULL, g_strdup (TEMPLATES_DIR));
}
static void
diff --git a/plugins/project-wizard/templates/Makefile.am b/plugins/project-wizard/templates/Makefile.am
index 8e95555..3d6d7f7 100644
--- a/plugins/project-wizard/templates/Makefile.am
+++ b/plugins/project-wizard/templates/Makefile.am
@@ -46,8 +46,7 @@ wizard_files_DATA = \
appwiz_sdl.png \
gnome.png \
gnome.svg \
- $(template_in_files:.in=) \
- indent.tpl
+ $(template_in_files:.in=)
# Translate wiz file
%.wiz: %.wiz.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< $@ -x -u -c $(top_builddir)/po/.intltool-merge-cache
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]