From 489d24b2d3e91762354023127fdaf384c2570427 Mon Sep 17 00:00:00 2001 From: Tomas Bzatek Date: Fri, 27 Feb 2009 21:41:40 +0100 Subject: Dist templates Dist sample source structure - automake always deference symlinks, we need to find better way to handle the sample structure --- .gitignore | 2 +- Makefile.am | 6 ++++-- configure.ac | 5 +++-- sample/Makefile.am | 6 ++++++ src/setup.c | 7 +------ templates/Makefile.am | 13 +++++++++++++ 6 files changed, 28 insertions(+), 11 deletions(-) create mode 100644 sample/Makefile.am create mode 100644 templates/Makefile.am diff --git a/.gitignore b/.gitignore index a664f3c..9f8eda2 100644 --- a/.gitignore +++ b/.gitignore @@ -5,7 +5,6 @@ .settings/ 3rd_party/ Names.txt -TODO cataract-notes.txt cgg data/ @@ -35,5 +34,6 @@ missing stamp-h1 src/.deps/ src/Makefile +TODO.txt *.o diff --git a/Makefile.am b/Makefile.am index b782c4b..76fd658 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,7 +1,9 @@ NULL = SUBDIRS = \ - src + src \ + templates \ + sample EXTRA_DIST = \ $(NULL) @@ -20,4 +22,4 @@ samples: ACLOCAL_AMFLAGS = -I m4 -AUTOMAKE_OPTIONS = foreign +AUTOMAKE_OPTIONS = foreign dist-bzip2 diff --git a/configure.ac b/configure.ac index 1829de6..1a1ea7e 100644 --- a/configure.ac +++ b/configure.ac @@ -94,10 +94,11 @@ AC_DEFINE_UNQUOTED(APP_BUILD_DATE, ["$APP_BUILD_DATE"], [build date]) AC_DEFINE_UNQUOTED(APP_COPYRIGHT_STRING, ["$APP_COPYRIGHT_STRING"], [copyright string]) + AC_CONFIG_FILES([ Makefile src/Makefile + templates/Makefile + sample/Makefile ]) AC_OUTPUT - - diff --git a/sample/Makefile.am b/sample/Makefile.am new file mode 100644 index 0000000..1ab712f --- /dev/null +++ b/sample/Makefile.am @@ -0,0 +1,6 @@ +NULL = + +EXTRA_DIST = \ + gen.sh \ + src \ + $(NULL) diff --git a/src/setup.c b/src/setup.c index 2e19acf..1481be6 100644 --- a/src/setup.c +++ b/src/setup.c @@ -62,12 +62,7 @@ find_setup_xml (TGallerySetup *setup) g_free (pth); if (b) return TRUE; - pth = g_strconcat("/usr/share/cgg/", SETUP_XML, NULL); - b = parse_setup_xml (pth, setup); - g_free (pth); - if (b) return TRUE; - - pth = g_strconcat("/usr/local/share/cgg/", SETUP_XML, NULL); + pth = g_strconcat (DATADIR, "/cgg/", SETUP_XML, NULL); b = parse_setup_xml (pth, setup); g_free (pth); return b; diff --git a/templates/Makefile.am b/templates/Makefile.am new file mode 100644 index 0000000..45c3baf --- /dev/null +++ b/templates/Makefile.am @@ -0,0 +1,13 @@ +NULL = + +templatesdir = $(datadir)/cgg + +templates_DATA = \ + scripts-general.js \ + styles.css \ + template-album.tmpl \ + template-index.tmpl \ + template-view_photo.tmpl \ + $(NULL) + +EXTRA_DIST = $(templates_DATA) -- cgit v1.2.3