Some Makefile enhancements for documentation.
authorPeter Verthez <Peter.Verthez@advalvas.be>
Thu, 10 Jan 2002 18:45:36 +0000 (18:45 +0000)
committerPeter Verthez <Peter.Verthez@advalvas.be>
Thu, 10 Jan 2002 18:45:36 +0000 (18:45 +0000)
Makefile.am
Makefile.inc [new file with mode: 0644]
configure.in
doc/Makefile.am
doc/images/.cvsignore [new file with mode: 0644]
doc/images/Makefile.am [new file with mode: 0644]

index fc28a10210180bee69bb93a370331e9c4e559477..031d2a336984e77ee2b28aa87ad791f030173d5d 100644 (file)
@@ -14,13 +14,10 @@ testgedcom_LDADD  = @INTLLIBS@
 EXTRA_DIST = $(pkgdata_DATA)
 VERSIONED_FILES = README
 
+include $(top_srcdir)/Makefile.inc
+
 dist-hook:
-       @cd $(distdir); \
-       for file in $(VERSIONED_FILES); do \
-          sed 's/\@VERSION\@/${VERSION}/' $$file > $$file.new; \
-         rm $$file; \
-         mv $$file.new $$file; \
-       done
+       $(replace-VERSION)
 
 clean-local:
        rm -f testgedcom.out
diff --git a/Makefile.inc b/Makefile.inc
new file mode 100644 (file)
index 0000000..f86ad01
--- /dev/null
@@ -0,0 +1,12 @@
+## File to include in other Makefile's, defining common commands
+# $Id$
+# $Name$
+
+define replace-VERSION
+  cd $(distdir); \
+  for file in $(VERSIONED_FILES); do \
+  sed 's/\@VERSION\@/${VERSION}/' $$file > $$file.new; \
+  rm $$file; \
+  mv $$file.new $$file; \
+  done
+endef
index 6117f15ae3acb1412b4672f29f73d0ec74169882..3a111a2d6061e476e587f49af3621c7b186800c0 100644 (file)
@@ -38,6 +38,7 @@ AC_OUTPUT(Makefile
          ansel/Makefile
          t/Makefile
          doc/Makefile
+         doc/images/Makefile
          include/Makefile
           intl/Makefile
           po/Makefile.in)
index 550b6bf7ab8c2dc36033842dca527f03e1de0efa..7ce3c3f9e7d503c78891e969d7b1aefe3ecf7676 100644 (file)
@@ -2,16 +2,15 @@
 # $Id$
 # $Name$
 
-EXTRA_DIST = index.html usage.html parser.html interface.html links.html
+SUBDIRS = images .
+DOC_FILES = index.html usage.html parser.html interface.html links.html
 VERSIONED_FILES = index.html
+EXTRA_DIST = $(DOC_FILES)
+docdir = $(datadir)/doc/@PACKAGE@-@VERSION@
+
+include $(top_srcdir)/Makefile.inc
+
+doc_DATA = $(DOC_FILES)
 
 dist-hook:
-       mkdir -p $(distdir)/images;
-       cp -p $(srcdir)/images/schema.obj $(srcdir)/images/schema.png \
-          $(distdir)/images;
-       cd $(distdir); \
-       for file in $(VERSIONED_FILES); do \
-          sed 's/\@VERSION\@/${VERSION}/' $$file > $$file.new; \
-         rm $$file; \
-         mv $$file.new $$file; \
-       done
+       $(replace-VERSION)
diff --git a/doc/images/.cvsignore b/doc/images/.cvsignore
new file mode 100644 (file)
index 0000000..70845e0
--- /dev/null
@@ -0,0 +1 @@
+Makefile.in
diff --git a/doc/images/Makefile.am b/doc/images/Makefile.am
new file mode 100644 (file)
index 0000000..f3d0b38
--- /dev/null
@@ -0,0 +1,12 @@
+## Process this file with automake to produce Makefile.in
+# $Id$
+# $Name$
+
+DOC_FILES = schema.png
+EXTRA_DIST = $(DOC_FILES) schema.obj
+docdir = $(datadir)/doc/@PACKAGE@-@VERSION@/images
+
+doc_DATA = $(DOC_FILES)
+
+
+