Experimental package creation tool for MinGW.org
Révision | 4d84c5a501be388ae3c24f89ec6692c407ca9ab1 (tree) |
---|---|
l'heure | 2019-07-11 19:16:33 |
Auteur | Keith Marshall <keith@user...> |
Commiter | Keith Marshall |
Implement "make" rules to create distributions.
* configure.ac (LN_S): Evaluate it.
* Makefile.in (dist, srcdist, bindist): Add build rules.
@@ -64,6 +64,8 @@ MAKE_SCRIPT = sed -e 's,%PACKAGE%,$(PACKAGE),' -e 's,%VERSION%,$(VERSION),' | ||
64 | 64 | # Installation Rules |
65 | 65 | # ------------------ |
66 | 66 | # |
67 | +install: install-dirs install-scripts install-libexec | |
68 | + | |
67 | 69 | INSTALL = @INSTALL@ |
68 | 70 | INSTALL_SCRIPT = @INSTALL_SCRIPT@ |
69 | 71 | INSTALL_DATA = @INSTALL_DATA@ |
@@ -79,11 +81,9 @@ bindir = @bindir@ | ||
79 | 81 | # installation directory infrastructure is in place; if not already in |
80 | 82 | # place, create it ... |
81 | 83 | # |
82 | -install: install-dirs install-scripts install-libexec | |
83 | -install-dirs: | |
84 | - for dir in ${bindir} ${libexecdir}/modules ${libexecdir}/plugins; \ | |
85 | - do $(MKDIR_P) $$dir; \ | |
86 | - done | |
84 | +${bindir} ${libexecdir}/modules ${libexecdir}/plugins: | |
85 | +install-dirs: ${bindir} ${libexecdir}/modules ${libexecdir}/plugins | |
86 | + $(MKDIR_P) $^ | |
87 | 87 | |
88 | 88 | # ... before installing the entire complement of executable scripts ... |
89 | 89 | # |
@@ -96,5 +96,29 @@ install-libexec: install-libexec-modules install-libexec-plugins | ||
96 | 96 | install-libexec-%: |
97 | 97 | $(INSTALL_DATA) ${srcdir}/src/$*/*.sh ${libexecdir}/$* |
98 | 98 | |
99 | + | |
100 | +# Distribution Rules | |
101 | +# ------------------ | |
102 | +# | |
103 | +dist: srcdist bindist | |
104 | +DISTNAME := $(PACKAGE)-$(VERSION) | |
105 | +override RELEASE := $(DISTNAME)$(RELEASE:%=-%) | |
106 | + | |
107 | +LN_S := @LN_S@ | |
108 | + | |
109 | +srcdist: src | |
110 | +srcdist: configure configure.ac Makefile.in install-sh | |
111 | + rm -rf dist/$(DISTNAME) | |
112 | + $(MKDIR_P) dist/$(DISTNAME) | |
113 | + $(LN_S) $(addprefix ${CURDIR}/,$^) dist/$(DISTNAME) | |
114 | + (cd dist; tar chf - $(DISTNAME)) | xz -c > dist/$(RELEASE)-src.tar.xz | |
115 | + rm -rf dist/$(DISTNAME) | |
116 | + | |
117 | +bindist: | |
118 | + rm -rf dist/staged | |
119 | + $(MAKE) --no-print-directory install prefix=${CURDIR}/dist/staged | |
120 | + (cd dist/staged; tar cf - *) | xz -c > dist/$(RELEASE)-bin.tar.xz | |
121 | + rm -rf dist/staged | |
122 | + | |
99 | 123 | # ----------------------------------------------------------------------------- |
100 | 124 | # $RCSfile$: end of file |
@@ -4,6 +4,7 @@ | ||
4 | 4 | AC_CONFIG_SRCDIR([src/mingw-pkg.sh]) |
5 | 5 | AC_PROG_MKDIR_P |
6 | 6 | AC_PROG_INSTALL |
7 | + AC_PROG_LN_S | |
7 | 8 | AC_CONFIG_FILES([Makefile]) |
8 | 9 | AC_OUTPUT |
9 | 10 | # |