VirtualBox

source: kBuild/vendor/gnumake/current/maintMakefile@ 2596

Last change on this file since 2596 was 2596, checked in by bird, 13 years ago

gnumake/current -> 3.82-cvs.

File size: 9.0 KB
Line 
1# Maintainer-only makefile segment. This contains things that are relevant
2# only if you have the full copy of the GNU make sources from the CVS
3# tree, not a dist copy.
4
5# We like mondo-warnings!
6AM_CFLAGS += -Wall -Wextra -Wdeclaration-after-statement -Wshadow -Wpointer-arith -Wbad-function-cast
7
8# I want this one but I have to wait for the const cleanup!
9# -Wwrite-strings
10
11# Find the glob source files... this might be dangerous, but we're maintainers!
12globsrc := $(wildcard glob/*.c)
13globhdr := $(wildcard glob/*.h)
14
15TEMPLATES = README README.DOS README.W32 README.OS2 \
16 config.ami configh.dos config.h.W32 config.h-vms
17MTEMPLATES = Makefile.DOS SMakefile
18
19# These are built as a side-effect of the dist rule
20#all-am: $(TEMPLATES) $(MTEMPLATES) build.sh.in
21
22# General rule for turning a .template into a regular file.
23#
24$(TEMPLATES) : % : %.template Makefile
25 rm -f $@
26 sed -e 's@%VERSION%@$(VERSION)@g' \
27 -e 's@%PACKAGE%@$(PACKAGE)@g' \
28 $< > $@
29 chmod a-w $@
30
31# Construct Makefiles by adding on dependencies, etc.
32#
33$(MTEMPLATES) : % : %.template .dep_segment Makefile
34 rm -f $@
35 sed -e 's@%VERSION%@$(VERSION)@g' \
36 -e 's@%PROGRAMS%@$(bin_PROGRAMS)@g' \
37 -e 's@%SOURCES%@$(filter-out remote-%,$(make_SOURCES)) remote-$$(REMOTE).c@g' \
38 -e 's@%OBJECTS%@$(filter-out remote-%,$(make_OBJECTS)) remote-$$(REMOTE).o@g' \
39 -e 's@%GLOB_SOURCES%@$(globsrc) $(globhdr)@g' \
40 -e 's@%GLOB_OBJECTS%@$(globsrc:glob/%.c=%.o)@g' \
41 $< > $@
42 echo >>$@; echo '# --------------- DEPENDENCIES' >>$@; echo '#' >>$@; \
43 cat $(word 2,$^) >>$@
44 chmod a-w $@
45
46NMakefile: NMakefile.template .dep_segment Makefile
47 rm -f $@
48 cp $< $@
49 echo >>$@; echo '# --------------- DEPENDENCIES' >>$@; echo '#' >>$@; \
50 sed 's/^\([^ ]*\)\.o:/$$(OUTDIR)\/\1.obj:/' $(word 2,$^) >>$@
51 chmod a-w $@
52
53# Construct build.sh.in
54#
55build.sh.in: build.template Makefile
56 rm -f $@
57 sed -e 's@%objs%@$(patsubst %.o,%.$${OBJEXT},$(filter-out remote-%,$(make_OBJECTS)))@g' \
58 -e 's@%globobjs%@$(patsubst %.c,%.$${OBJEXT},$(globsrc))@g' \
59 $< > $@
60 chmod a-w+x $@
61
62
63# Use automake to build a dependency list file, for "foreign" makefiles like
64# Makefile.DOS.
65#
66# Automake used to have a --generate-deps flag, but it's gone now, so we have
67# to do it ourselves.
68#
69DEP_FILES := $(wildcard $(DEPDIR)/*.Po)
70.dep_segment: Makefile.am maintMakefile $(DEP_FILES)
71 rm -f $@
72 (for f in $(DEPDIR)/*.Po; do \
73 echo ""; \
74 echo "# $$f"; \
75 sed -e '/^[^:]*\.[ch] *:/d' \
76 -e 's, /usr/[^ ]*,,g' \
77 -e 's, $(srcdir)/, ,g' \
78 -e '/^ *\\$$/d' \
79 -e '/^ *$$/d' \
80 < $$f; \
81 done) > $@
82
83# Get rid of everything "else".
84#
85maintFILES = configure aclocal.m4 config.h.in Makefile.in stamp-h.in
86
87CVS-CLEAN-FILES += $(maintFILES) $(TEMPLATES) $(MTEMPLATES) NMakefile \
88 build.sh.in .deps .dep_segment ABOUT-NLS \
89 ansi2knr.*
90
91# This rule tries to clean the tree right down to how it looks when you do a
92# virgin CVS checkout.
93
94# This target is potentially dangerous since it removes _ANY FILE_ that
95# is not in CVS. Including files you might mean to add to CVS but
96# haven't yet... I only use this in subdirectories where it's unlikely
97# we have any new files. Still... be careful!!
98
99cvsclean = $(PERL) -e '$$k{CVS} = 1; open(E,"< CVS/Entries") || die "CVS/Entries: $$!\n"; while (defined ($$_ = <E>)) { m%^/([^/]*)% or next; $$k{$$1} = 1; } close(E) || die "CVS/Entries: $$!\n"; opendir(D, ".") || die ".: $$!\n"; while (defined ($$_ = readdir(D))) { -f $$_ && ! exists $$k{$$_} && unlink($$_); } closedir(D) || die ".: $$!\n";'
100
101.PHONY: cvs-clean
102cvs-clean: maintainer-clean
103 -rm -rf *~ $(CVS-CLEAN-FILES)
104 -cd config && $(cvsclean)
105 -cd po && $(cvsclean)
106 -cd doc && $(cvsclean)
107 -cd glob && $(cvsclean)
108
109
110# ----------------------------------------------------------------------
111#
112# The sections below were stolen from the Makefile.maint used by fileutils,
113# sh-utils, textutils, CPPI, Bison, and Autoconf.
114
115
116## ---------------- ##
117## Updating files. ##
118## ---------------- ##
119
120WGET = wget --passive-ftp -nv
121ftp-gnu = ftp://ftp.gnu.org/gnu
122
123move_if_change = if test -r $(target) && cmp -s $(target).t $(target); then \
124 echo $(target) is unchanged; rm -f $(target).t; \
125 else \
126 mv $(target).t $(target); \
127 fi
128
129# ------------------- #
130# Updating PO files. #
131# ------------------- #
132
133# PO archive mirrors --- Be careful; some might not be fully populated!
134# ftp://ftp.unex.es/pub/gnu-i18n/po/maint/
135# http://translation.sf.net/maint/
136# ftp://tiger.informatik.hu-berlin.de/pub/po/maint/
137
138po_repo = http://translationproject.org/latest/$(PACKAGE)
139.PHONY: do-po-update po-update
140do-po-update:
141 tmppo="/tmp/po-$(PACKAGE)-$(VERSION).$$$$" \
142 && rm -rf "$$tmppo" \
143 && mkdir "$$tmppo" \
144 && (cd "$$tmppo" \
145 && $(WGET) -r -l1 -nd --no-parent -A '*.po' $(po_repo)) \
146 && cp "$$tmppo"/*.po $(top_srcdir)/po && rm -rf "$$tmppo"
147 cd po && $(MAKE) update-po
148 $(MAKE) po-check
149
150po-update:
151 [ -d "po" ] && $(MAKE) do-po-update
152
153# -------------------------- #
154# Updating GNU build files. #
155# -------------------------- #
156
157# The following pseudo table associates a local directory and a URL
158# with each of the files that belongs to some other package and is
159# regularly updated from the specified URL.
160
161cvs-url = http://savannah.gnu.org/cgi-bin/viewcvs/~checkout~
162git-url = http://git.savannah.gnu.org/cgit
163target = $(patsubst get-%,%,$@)
164
165config-url = $(git-url)/config.git/plain/$(patsubst get-config/%,%,$@)
166get-config/config.guess get-config/config.sub:
167 @echo $(WGET) $(config-url) -O $(target) \
168 && $(WGET) $(config-url) -O $(target).t \
169 && $(move_if_change)
170
171gnulib-url = $(git-url)/gnulib.git/plain/build-aux/$(patsubst get-config/%,%,$@)
172get-config/texinfo.tex:
173 @echo $(WGET) $(gnulib-url) -O $(target) \
174 && $(WGET) $(gnulib-url) -O $(target).t \
175 && $(move_if_change)
176
177gnustandards-url = $(cvs-url)/gnustandards/gnustandards/$(patsubst get-doc/%,%,$@)
178get-doc/make-stds.texi get-doc/fdl.texi:
179 @echo $(WGET) $(gnustandards-url) -O $(target) \
180 && $(WGET) $(gnustandards-url) -O $(target).t \
181 && $(move_if_change)
182
183.PHONY: scm-update
184scm-update: get-config/texinfo.tex get-config/config.guess get-config/config.sub get-doc/make-stds.texi get-doc/fdl.texi
185
186
187# --------------------- #
188# Updating everything. #
189# --------------------- #
190
191.PHONY: update
192update: po-update scm-update
193
194
195## --------------- ##
196## Sanity checks. ##
197## --------------- ##
198
199# Checks that don't require cvs. Run `changelog-check' last as
200# previous test may reveal problems requiring new ChangeLog entries.
201local-check: po-check changelog-check
202
203# copyright-check writable-files
204
205changelog-check:
206 if head $(top_srcdir)/ChangeLog | grep 'Version $(VERSION)' >/dev/null; then \
207 :; \
208 else \
209 echo "$(VERSION) not in ChangeLog" 1>&2; \
210 exit 1; \
211 fi
212
213# Verify that all source files using _() are listed in po/POTFILES.in.
214# Ignore make.h; it defines _().
215po-check:
216 if test -f po/POTFILES.in; then \
217 grep '^[^#]' po/POTFILES.in | sort > $@-1; \
218 $(PERL) -wn -e 'if (/\b_\(/) { $$ARGV eq "make.h" || print "$$ARGV\n" and close ARGV }' *.c *.h | sort > $@-2; \
219 diff -u $@-1 $@-2 || exit 1; \
220 rm -f $@-1 $@-2; \
221 fi
222
223## ------------------------- ##
224## GNU FTP upload artifacts. ##
225## ------------------------- ##
226
227# This target creates the upload artifacts.
228# Sign it with my key. If you don't have my key/passphrase then sorry,
229# you're SOL! :)
230
231GPG = gpg
232GPGFLAGS = -u 6338B6D4
233
234DIST_ARCHIVES_SIG = $(addsuffix .sig,$(DIST_ARCHIVES))
235DIST_ARCHIVES_DIRECTIVE = $(addsuffix .directive.asc,$(DIST_ARCHIVES))
236
237# A simple rule to test signing, etc.
238.PHONY: distsign
239distsign: $(DIST_ARCHIVES_SIG) $(DIST_ARCHIVES_DIRECTIVE)
240
241%.sig : %
242 @echo "Signing file '$<':"
243 $(GPG) $(GPGFLAGS) -o "$@" -b "$<"
244
245%.directive.asc: %
246 @echo "Creating directive file '$@':"
247 @( \
248 echo 'version: 1.1'; \
249 echo 'directory: make'; \
250 echo 'filename: $*'; \
251 echo 'comment: Official upload of GNU make version $(VERSION)'; \
252 ) > "$*.directive"
253 $(GPG) $(GPGFLAGS) -o "$@" --clearsign "$*.directive"
254 @rm -f "$*.directive"
255
256# Upload the artifacts
257
258FTPPUT = ncftpput
259gnu-upload-host = ftp-upload.gnu.org
260gnu-upload-dir = /incoming
261
262
263UPLOADS = upload-alpha upload-ftp
264.PHONY: $(UPLOADS)
265$(UPLOADS): $(DIST_ARCHIVES) $(DIST_ARCHIVES_SIG) $(DIST_ARCHIVES_DIRECTIVE)
266 $(FTPPUT) "$(gnu-upload-host)" "$(gnu-upload-dir)/$(@:upload-%=%)" $^
267
268
269# Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
270# 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
271# This file is part of GNU Make.
272#
273# GNU Make is free software; you can redistribute it and/or modify it under
274# the terms of the GNU General Public License as published by the Free Software
275# Foundation; either version 3 of the License, or (at your option) any later
276# version.
277#
278# GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
279# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
280# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
281# details.
282#
283# You should have received a copy of the GNU General Public License along with
284# this program. If not, see <http://www.gnu.org/licenses/>.
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette