OSDN Git Service

Assemble licence and documentation tarballs for distribution.
authorKeith Marshall <keithmarshall@users.sourceforge.net>
Thu, 30 May 2013 20:07:47 +0000 (21:07 +0100)
committerKeith Marshall <keithmarshall@users.sourceforge.net>
Thu, 30 May 2013 20:07:47 +0000 (21:07 +0100)
ChangeLog
Makefile.in

index 00a4633..07dbadd 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2013-05-30  Keith Marshall  <keithmarshall@users.sourceforge.net>
+
+       Assemble licence and documentation tarballs for distribution.
+
+       * Makefile.in (dist): Add dependencies on...
+       (licdist, docdist): ...these new build goals; specify them based on...
+       (LIC_DISTFILES, DOC_DISTFILES): ...these new macros; define them as
+       the respective list of files to include in each tarball.
+
 2013-05-29  Keith Marshall  <keithmarshall@users.sourceforge.net>
 
        Force a remake, on package version updates.
index 4b06680..138fcd0 100644 (file)
@@ -63,6 +63,14 @@ AUX_DISTFILES = \
 #
 BIN_DISTFILES = pexports$(EXEEXT)
 
+# Files to be included in a documentation tarball.
+#
+DOC_DISTFILES = README ChangeLog
+
+# Files to be included in a licence tarball.
+#
+LIC_DISTFILES = COPYING
+
 OBJECT_FILES = \
   hlex.$(OBJEXT) hparse.$(OBJEXT) pexports.$(OBJEXT) str_tree.$(OBJEXT)
 
@@ -119,7 +127,7 @@ uninstall:
 
 # Distribution.
 #
-dist: srcdist bindist
+dist: srcdist bindist docdist licdist
 
 abs_top_srcdir = @abs_top_srcdir@
 
@@ -149,6 +157,26 @@ bindist: $(BIN_DISTFILES)
        cd tmp && tar -chof - bin | xz > ../$(PACKAGE_DISTNAME)-bin.tar.xz
        $(RM) -r tmp
 
+docdist:
+       $(RM) -r tmp
+       $(MKDIR_P) tmp/share/doc/$(PACKAGE_TARNAME)/$(PACKAGE_VERSION)
+       cd tmp/share/doc/$(PACKAGE_TARNAME)/$(PACKAGE_VERSION) && \
+       for file in $(DOC_DISTFILES); \
+         do $(LN_S) ${abs_top_srcdir}/$$file .; \
+         done
+       cd tmp && tar -chof - share | xz > ../$(PACKAGE_DISTNAME)-doc.tar.xz
+       $(RM) -r tmp
+
+licdist:
+       $(RM) -r tmp
+       $(MKDIR_P) tmp/share/doc/$(PACKAGE_TARNAME)/$(PACKAGE_VERSION)
+       cd tmp/share/doc/$(PACKAGE_TARNAME)/$(PACKAGE_VERSION) && \
+       for file in $(LIC_DISTFILES); \
+         do $(LN_S) ${abs_top_srcdir}/$$file .; \
+         done
+       cd tmp && tar -chof - share | xz > ../$(PACKAGE_DISTNAME)-lic.tar.xz
+       $(RM) -r tmp
+
 # Clean-up.
 #
 mostlyclean clean: