From b7f597b1ebba5321f11f904ca4c3762dd7ca4514 Mon Sep 17 00:00:00 2001 From: Hans Ulrich Niedermann Date: Mon, 16 Jun 2008 10:08:24 +0200 Subject: [PATCH] Use --htmldir= for HTML docs instead of --docdir= Now the default installation location for the docs is the same as in 0.24.x, but still can be easily changed at configure time. --- INSTALL | 3 +++ Makefile.am | 2 +- doc/docimages/Makefile.am | 8 ++++---- doc/en/Makefile.am | 6 +++--- doc/translated-manual.mk | 6 +++--- mainwindow.cpp | 4 ++-- 6 files changed, 16 insertions(+), 13 deletions(-) diff --git a/INSTALL b/INSTALL index 112b06c..7e4c1a1 100644 --- a/INSTALL +++ b/INSTALL @@ -47,6 +47,9 @@ If you want to install NtEd in a certain directory use: ./configure --prefix= +If you want to install the docs into a special directory, add +--docdir=... and/or --htmldir=... to the configure line. + If you have trouble with the documentation creation: ./configure --without-doc diff --git a/Makefile.am b/Makefile.am index 0073746..1127564 100644 --- a/Makefile.am +++ b/Makefile.am @@ -27,7 +27,7 @@ dist_doc_DATA += ABOUT_THE_EXAMPLES.TXT dist_doc_DATA += FAQ AM_CPPFLAGS = -AM_CPPFLAGS += -DNTED_DOCDIR=\"${docdir}\" +AM_CPPFLAGS += -DNTED_HTMLDIR=\"${htmldir}\" AM_CPPFLAGS += -DNTED_DATADIR=\"${datarootdir}/${PACKAGE_TARNAME}\" AM_CPPFLAGS += -DLOCALEDIR=\"${localedir}\" AM_CPPFLAGS += -I$(top_srcdir)/dialogs -I$(top_srcdir)/commands diff --git a/doc/docimages/Makefile.am b/doc/docimages/Makefile.am index 3bbe5bb..44c6b5a 100755 --- a/doc/docimages/Makefile.am +++ b/doc/docimages/Makefile.am @@ -25,11 +25,11 @@ dist-hook:: if MAKE_DOCS install-data-local: - $(INSTALL) -d -m 0755 $(DESTDIR)/$(docdir)/HTML/docimages; \ - $(INSTALL) -m 0644 $(srcdir)/*.png $(DESTDIR)/$(docdir)/HTML/docimages/ + $(INSTALL) -d -m 0755 $(DESTDIR)$(htmldir)/docimages; \ + $(INSTALL) -m 0644 $(srcdir)/*.png $(DESTDIR)$(htmldir)/docimages/ uninstall-local: - rm -f $(DESTDIR)/$(docdir)/HTML/docimages/* - rmdir $(DESTDIR)/$(docdir)/HTML/docimages + rm -f $(DESTDIR)$(htmldir)/docimages/* + rmdir $(DESTDIR)$(htmldir)/docimages endif diff --git a/doc/en/Makefile.am b/doc/en/Makefile.am index 14cdb2a..195e78f 100755 --- a/doc/en/Makefile.am +++ b/doc/en/Makefile.am @@ -29,14 +29,14 @@ index.html: index.docbook $(XMLTO) html $(srcdir)/index.docbook install-data-local: index.docbook index.html - $(INSTALL) -D -m "u=rw,og=r" $(srcdir)/index.docbook $(DESTDIR)$(docdir)/HTML/$(LANGUAGE)/index.docbook + $(INSTALL) -D -m "u=rw,og=r" $(srcdir)/index.docbook $(DESTDIR)$(htmldir)/$(LANGUAGE)/index.docbook @-for i in *.html; \ do \ - $(INSTALL) -D -m "u=rw,og=r" $$i $(DESTDIR)$(docdir)/HTML/$(LANGUAGE)/$$i; \ + $(INSTALL) -D -m "u=rw,og=r" $$i $(DESTDIR)$(htmldir)/$(LANGUAGE)/$$i; \ done uninstall-local: - rm -f $(DESTDIR)$(docdir)/HTML/$(LANGUAGE)/* + rm -f $(DESTDIR)$(htmldir)/$(LANGUAGE)/* clean-local: rm -f *.html diff --git a/doc/translated-manual.mk b/doc/translated-manual.mk index e14394a..89a3857 100755 --- a/doc/translated-manual.mk +++ b/doc/translated-manual.mk @@ -45,14 +45,14 @@ $(srcdir)/$(LANGUAGE).po: ../templates/nted.pot ../en/index.docbook fi install-data-local: index.docbook index.html - $(INSTALL) -D -m "u=rw,og=r" index.docbook $(DESTDIR)$(docdir)/HTML/$(LANGUAGE)/index.docbook + $(INSTALL) -D -m "u=rw,og=r" index.docbook $(DESTDIR)$(htmldir)/$(LANGUAGE)/index.docbook @-for i in *.html; \ do \ - $(INSTALL) -D -m "u=rw,og=r" $$i $(DESTDIR)$(docdir)/HTML/$(LANGUAGE)/$$i; \ + $(INSTALL) -D -m "u=rw,og=r" $$i $(DESTDIR)$(htmldir)/$(LANGUAGE)/$$i; \ done uninstall-local: - rm -f $(DESTDIR)$(docdir)/HTML/$(LANGUAGE)/* + rm -f $(DESTDIR)$(htmldir)/$(LANGUAGE)/* endif diff --git a/mainwindow.cpp b/mainwindow.cpp index 280d45e..44cb1aa 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -7492,14 +7492,14 @@ int main (int argc, char **argv) #ifdef YELP_PATH langnames = g_get_language_names (); for (cptr = langnames; *cptr != NULL; cptr++) { - sprintf(Str, "%s/HTML/%s/index.docbook", NTED_DOCDIR, *cptr); + sprintf(Str, "%s/%s/index.docbook", NTED_HTMLDIR, *cptr); if (!access(Str, R_OK)) { yelparg = strdup(Str); break; } } if (yelparg == NULL) { - sprintf(Str, "%s/HTML/en/index.docbook", NTED_DOCDIR); + sprintf(Str, "%s/en/index.docbook", NTED_HTMLDIR); if (!access(Str, R_OK)) { yelparg = strdup(Str); } -- 1.5.5.1