~ubuntu-branches/ubuntu/gutsy/m4/gutsy

« back to all changes in this revision

Viewing changes to Makefile.maint

  • Committer: Bazaar Package Importer
  • Author(s): Santiago Vila
  • Date: 2006-09-25 19:20:30 UTC
  • mfrom: (1.2.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20060925192030-x9s2i4h7wlvsx7dy
Tags: 1.4.7-1
New upstream release. See the NEWS file for details.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
## Makefile.maint -- Makefile rules for m4 maintainers -*-Makefile-*-
2
2
##
3
 
## Copyright (C) 2004, 2005 Free Software Foundation
 
3
## Copyright (C) 2004, 2005, 2006 Free Software Foundation
4
4
##
5
5
## This program is free software; you can redistribute it and/or modify
6
6
## it under the terms of the GNU General Public License as published by
17
17
## the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18
18
## Boston, MA 02110-1301, USA.
19
19
 
20
 
# Need various variables defined by configure, a lot easier to just
21
 
# include the Makefile than figure out a way to put them in here too
22
 
include Makefile
23
 
Makefile:
24
 
        @echo " *** Run maintainer rules from the build tree, with"
25
 
        @echo " *** \`make -f../Makefile.maint' for example, where"
26
 
        @echo " *** \`../' is the relative path back to the directory"
27
 
        @echo " *** that contains the \`Makefile.maint'.  Alternatively,"
28
 
        @echo " *** run \`./configure' in the source tree for an in"
29
 
        @echo " *** tree build."
30
 
        @exit 1
31
 
 
32
20
TEXI2HTML = texi2html
33
21
 
34
22
.PHONY: cvs-release
35
 
cvs-release: version-check prev-tarball cvs-news fetch cvs-commit cvs-dist deltas web-manual
 
23
cvs-release: version-check prev-tarball cvs-news cvs-commit cvs-dist deltas web-manual
36
24
        @tarname="$(PACKAGE)-$(VERSION).tar.gz"; \
37
25
        diffname="$(PACKAGE)-$(LASTRELEASE)-$(VERSION).diff.gz"; \
38
26
        xdeltaname="$(PACKAGE)-$(LASTRELEASE)-$(VERSION).xdelta"; \
78
66
.PHONY: cvs-news
79
67
cvs-news:
80
68
## Make sure the NEWS file is up-to-date:
81
 
        @if sed '1,3d;4q' $(srcdir)/NEWS | grep -e "$(VERSION)" >/dev/null; \
 
69
        @if sed '1,4d;5q' $(srcdir)/NEWS | grep -e "$(VERSION)" >/dev/null; \
82
70
        then :; \
83
71
        else \
84
72
          echo "NEWS not updated; not releasing" 1>&2; \
85
73
          exit 1; \
86
74
        fi
87
75
 
88
 
## Program to use to fetch files.
89
 
WGET = wget
90
 
WGETSGO = $(WGET) http://savannah.gnu.org/cgi-bin/viewcvs/~checkout~
91
 
 
92
 
## Files that we fetch and which we compare against.
93
 
## FIXME should be a lot more here
94
 
FETCHFILES = \
95
 
./INSTALL \
96
 
./install-sh \
97
 
doc/texinfo.tex
98
 
 
99
 
## Fetch the latest versions of files we care about.
100
 
.PHONY: fetch
101
 
fetch:
102
 
        rm -rf Fetchdir > /dev/null 2>&1
103
 
        mkdir Fetchdir
104
 
## If a get fails then that is a problem.
105
 
        (cd Fetchdir && \
106
 
        $(WGETSGO)/autoconf/autoconf/INSTALL; \
107
 
        $(WGETSGO)/automake/automake/lib/install-sh; \
108
 
        $(WGETSGO)/texinfo/texinfo/doc/texinfo.tex; \
109
 
        $(WGETSGO)/texinfo/texinfo/util/gendocs.sh; \
110
 
        $(WGETSGO)/texinfo/texinfo/util/gendocs_template; )
111
 
## Don't exit after test because we want to give as many errors as
112
 
## possible.
113
 
        @stat=0; for file in $(FETCHFILES); do \
114
 
          fetchedfile=Fetchdir/`echo $$file | sed 's,.*/,,g'`; \
115
 
          if diff -u $(srcdir)/$$file $$fetchedfile \
116
 
            >>Fetchdir/update.patch 2>/dev/null; then :; \
117
 
          else \
118
 
            stat=1; \
119
 
            echo "Updating $(srcdir)/$$file..."; \
120
 
            cp $$fetchedfile $(srcdir)/$$file; \
121
 
          fi; \
122
 
        done; \
123
 
        test $$stat = 1 && \
124
 
          echo "See Fetchdir/update.patch for a log of the changes."; \
125
 
        exit $$stat
126
 
 
127
 
 
128
 
GPG = gpg # set it to `:' to avoid gpg operations
129
 
 
130
76
.PHONY: cvs-commit
131
77
cvs-commit: cvs-news
132
78
        cd $(srcdir) && $(SHELL) ./commit
138
84
## Finally, if everything was successful, tag the release
139
85
        cd $(srcdir) \
140
86
          && $(CVS) -q tag `echo "release-$(VERSION)" | sed 's/\./_/g'`
141
 
## Generate signatures and directives for FSF ftp-upload:
142
 
        for suffix in .gz .bz2; do \
143
 
          ofile="$(PACKAGE)-$(VERSION).tar$$suffix"; \
144
 
          $(GPG) --detach-sign $$ofile \
145
 
          && echo "directory: $(PACKAGE)" > $$ofile.directive \
146
 
          && $(GPG) --clearsign $$ofile.directive \
147
 
          && rm -f $$ofile.directive; \
148
 
        done
149
87
 
150
88
.PHONY: new-tarball
151
89
new-tarball:
182
120
        && tar xzf "../$(PACKAGE)-$(VERSION).tar.gz" \
183
121
        && $(DIFF) $(DIFF_OPTIONS) \
184
122
                $(PACKAGE)-$(LASTRELEASE) $(PACKAGE)-$(VERSION) \
185
 
                | GZIP=$(GZIP_ENV) gzip -c > $$ofile \
186
 
        && $(GPG) --detach-sign $$ofile \
187
 
        && echo "directory: $(PACKAGE)" > $$ofile.directive \
188
 
        && $(GPG) --clearsign $$ofile.directive \
189
 
        && rm -f $$ofile.directive
 
123
                | GZIP=$(GZIP_ENV) gzip -c > $$ofile
190
124
 
191
125
        rm -rf delta-diff
192
126
 
195
129
 
196
130
.PHONY: delta-xdelta
197
131
delta-xdelta: prev-tarball new-tarball got-xdelta
198
 
## Generate the delta file (xdelta has wierd exit statuses, so we need to
 
132
## Generate the delta file (xdelta has weird exit statuses, so we need to
199
133
## add some shell code to keep make happy), and then generate the signatures
200
134
## for FSF ftp-upload:
201
135
        ofile="$(PACKAGE)-$(LASTRELEASE)-$(VERSION).xdelta"; \
202
136
        ( test -z `$(XDELTA) delta $(XDELTA_OPTIONS) \
203
137
            $(PACKAGE)-$(LASTRELEASE).tar.gz $(PACKAGE)-$(VERSION).tar.gz \
204
138
            $$ofile 2>&1` \
205
 
          && : ) \
206
 
        && $(GPG) --detach-sign $$ofile \
207
 
        && echo "directory: $(PACKAGE)" > $$ofile.directive \
208
 
        && $(GPG) --clearsign $$ofile.directive \
209
 
        && rm -f $$ofile.directive
 
139
          && : )
210
140
 
211
141
.PHONY: web-manual
212
142
web-manual:
213
 
        @ln -s `cd $(srcdir) && pwd`/doc/$(PACKAGE).texinfo doc/$(PACKAGE).texi
214
 
        @ln -s `cd $(srcdir) && pwd`/doc/version.texi doc/version.texi
215
 
        @ln -s `pwd`/Fetchdir/gendocs.sh doc/gendocs.sh
216
 
        @ln -s `pwd`/Fetchdir/gendocs_template doc/gendocs_template
217
 
        @cd doc; \
218
 
          $(SHELL) ./gendocs.sh $(PACKAGE) "GNU $(PACKAGE) - GNU macro processor"
219
 
        @rm -rf doc/$(PACKAGE).texi doc/version.texi doc/gendocs* manual
220
 
        @mv -f doc/manual .
221
 
        @echo " *** Upload the manual directory to web-cvs."
 
143
        @cd ./doc ; \
 
144
          $(SHELL) ../gendocs.sh $(PACKAGE) \
 
145
            "GNU $(PACKAGE)- GNU macro processor"
 
146
        @echo " *** Upload the doc/manual directory to web-cvs."