+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.
#
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)
# Distribution.
#
-dist: srcdist bindist
+dist: srcdist bindist docdist licdist
abs_top_srcdir = @abs_top_srcdir@
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: