Changeset 3140 in kBuild for trunk/src/kmk/maintMakefile
- Timestamp:
- Mar 14, 2018 9:28:10 PM (7 years ago)
- Location:
- trunk/src/kmk
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
maintMakefile (modified) (11 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kmk
-
Property svn:mergeinfo
set to
/vendor/gnumake/current merged eligible
-
Property svn:mergeinfo
set to
-
trunk/src/kmk/maintMakefile
r2591 r3140 1 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 CVS2 # only if you have the full copy of the GNU make sources from the Git 3 3 # tree, not a dist copy. 4 5 BUGLIST := bug-make@gnu.org 6 7 # These are related to my personal setup. 8 GPG_FINGERPRINT := 6338B6D4 9 10 # SRCROOTDIR is just a handy location to keep source files in 11 SRCROOTDIR ?= $(HOME)/src 12 13 # Where the gnulib project has been locally cloned 14 GNULIBDIR ?= $(SRCROOTDIR)/gnulib 15 16 # Where to put the CVS checkout of the GNU web repository 17 GNUWEBDIR ?= $(SRCROOTDIR)/gnu-www 18 19 # Where to put the CVS checkout of the GNU make web repository 20 MAKEWEBDIR ?= $(SRCROOTDIR)/make/make-web 4 21 5 22 # We like mondo-warnings! 6 23 ifeq ($(KBUILD_TARGET),openbsd) # bird 7 AM_CFLAGS += -Wall -W shadow -Wpointer-arith -Wbad-function-cast24 AM_CFLAGS += -Wall -Wwrite-strings -Wshadow -Wpointer-arith -Wbad-function-cast 8 25 else 9 AM_CFLAGS += -Wall -W extra -Wdeclaration-after-statement -Wshadow -Wpointer-arith -Wbad-function-cast26 AM_CFLAGS += -Wall -Wwrite-strings -Wextra -Wdeclaration-after-statement -Wshadow -Wpointer-arith -Wbad-function-cast 10 27 endif 28 29 MAKE_MAINTAINER_MODE := -DMAKE_MAINTAINER_MODE 30 AM_CPPFLAGS += $(MAKE_MAINTAINER_MODE) 11 31 12 32 # I want this one but I have to wait for the const cleanup! … … 23 43 # These are built as a side-effect of the dist rule 24 44 #all-am: $(TEMPLATES) $(MTEMPLATES) build.sh.in 45 46 # Create preprocessor output files--GCC specific! 47 %.i : %.c 48 $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) -E -dD -o $@ $< 25 49 26 50 # General rule for turning a .template into a regular file. … … 85 109 done) > $@ 86 110 87 # Get rid of everything "else". 88 # 89 maintFILES = configure aclocal.m4 config.h.in Makefile.in stamp-h.in 90 91 CVS-CLEAN-FILES += $(maintFILES) $(TEMPLATES) $(MTEMPLATES) NMakefile \ 92 build.sh.in .deps .dep_segment ABOUT-NLS \ 93 ansi2knr.* 94 95 # This rule tries to clean the tree right down to how it looks when you do a 96 # virgin CVS checkout. 97 98 # This target is potentially dangerous since it removes _ANY FILE_ that 99 # is not in CVS. Including files you might mean to add to CVS but 100 # haven't yet... I only use this in subdirectories where it's unlikely 101 # we have any new files. Still... be careful!! 102 103 cvsclean = $(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";' 104 105 .PHONY: cvs-clean 106 cvs-clean: maintainer-clean 107 -rm -rf *~ $(CVS-CLEAN-FILES) 108 -cd config && $(cvsclean) 109 -cd po && $(cvsclean) 110 -cd doc && $(cvsclean) 111 -cd glob && $(cvsclean) 112 113 114 # ---------------------------------------------------------------------- 115 # 116 # The sections below were stolen from the Makefile.maint used by fileutils, 117 # sh-utils, textutils, CPPI, Bison, and Autoconf. 111 # Cleaning 112 113 GIT := git 114 115 # git-clean: Clean all "ignored" files. Leave untracked files. 116 # git-very-clean: Clean all files that aren't stored in source control. 117 118 .PHONY: git-clean git-very-clean 119 git-clean: 120 -$(GIT) clean -fdX 121 git-very-clean: git-clean 122 -$(GIT) clean -fd 123 124 125 126 ## ---------------------- ## 127 ## Generating ChangeLog. ## 128 ## ---------------------- ## 129 130 gl2cl-date := 2013-10-10 131 gl2cl := $(GNULIBDIR)/build-aux/gitlog-to-changelog 132 133 # Rebuild the changelog whenever a new commit is added 134 ChangeLog: .check-git-HEAD 135 if test -f '$(gl2cl)'; then \ 136 '$(gl2cl)' --since='$(gl2cl-date)' > '$@'; \ 137 else \ 138 echo "WARNING: $(gl2cl) is not available. No $@ generated."; \ 139 fi 140 141 .PHONY: .check-git-HEAD 142 .check-git-HEAD: 143 sha="`git rev-parse HEAD`"; \ 144 [ -f '$@' ] && [ "`cat '$@' 2>/dev/null`" = "$$sha" ] \ 145 || echo "$$sha" > '$@' 118 146 119 147 … … 121 149 ## Updating files. ## 122 150 ## ---------------- ## 123 124 WGET = wget --passive-ftp -n v151 RSYNC = rsync -Lrtvz 152 WGET = wget --passive-ftp -np -nv 125 153 ftp-gnu = ftp://ftp.gnu.org/gnu 126 154 … … 128 156 echo $(target) is unchanged; rm -f $(target).t; \ 129 157 else \ 130 mv $(target).t $(target); \158 mv -f $(target).t $(target); \ 131 159 fi 132 160 … … 140 168 # ftp://tiger.informatik.hu-berlin.de/pub/po/maint/ 141 169 170 po_wget_flags = --recursive --level=1 --no-directories --no-check-certificate 142 171 po_repo = http://translationproject.org/latest/$(PACKAGE) 172 po_sync = translationproject.org::tp/latest/$(PACKAGE)/ 173 143 174 .PHONY: do-po-update po-update 144 175 do-po-update: … … 146 177 && rm -rf "$$tmppo" \ 147 178 && mkdir "$$tmppo" \ 148 && (cd"$$tmppo" \149 && $(WGET) -r -l1 -nd --no-parent -A '*.po' $(po_repo))\150 && cp "$$tmppo"/*.po $(top_srcdir)/po &&rm -rf "$$tmppo"179 && $(RSYNC) $(po_sync) "$$tmppo" \ 180 && cp "$$tmppo"/*.po $(top_srcdir)/po \ 181 && rm -rf "$$tmppo" 151 182 cd po && $(MAKE) update-po 152 183 $(MAKE) po-check … … 197 228 198 229 230 # ---------------------------------- # 231 # Alternative configuration checks. # 232 # ---------------------------------- # 233 234 .PHONY: check-alt-config 235 check-alt-config: \ 236 checkcfg.--disable-job-server \ 237 checkcfg.--disable-load \ 238 checkcfg.--without-guile \ 239 checkcfg.CPPFLAGS^-DNO_OUTPUT_SYNC \ 240 checkcfg.CPPFLAGS^-DNO_ARCHIVES 241 242 # Trick GNU make so it doesn't run the submake as a recursive make. 243 NR_MAKE = $(MAKE) 244 245 # Check builds both with build.sh and with make 246 checkcfg.%: distdir 247 @echo "Building $@ (output in checkcfg.$*.log)" 248 @exec >'checkcfg.$*.log' 2>&1; \ 249 rm -rf $(distdir)/_build \ 250 && mkdir $(distdir)/_build \ 251 && cd $(distdir)/_build \ 252 && echo "Testing configure with $(subst ^,=,$*)" \ 253 && ../configure --srcdir=.. $(subst ^,=,$*) \ 254 $(AM_DISTCHECK_CONFIGURE_FLAGS) $(DISTCHECK_CONFIGURE_FLAGS) \ 255 CFLAGS='$(AM_CFLAGS)' \ 256 && ./build.sh \ 257 && ./make $(AM_MAKEFLAGS) check \ 258 && rm -f *.o make \ 259 && $(NR_MAKE) $(AM_MAKEFLAGS) \ 260 && ./make $(AM_MAKEFLAGS) check 261 262 199 263 ## --------------- ## 200 264 ## Sanity checks. ## 201 265 ## --------------- ## 202 266 203 # Checks that don't require cvs. Run `changelog-check' last as 267 # Before we build a distribution be sure we run our local checks 268 #distdir: local-check 269 270 .PHONY: local-check po-check changelog-check 271 272 # Checks that don't require Git. Run 'changelog-check' last as 204 273 # previous test may reveal problems requiring new ChangeLog entries. 205 274 local-check: po-check changelog-check … … 216 285 217 286 # Verify that all source files using _() are listed in po/POTFILES.in. 218 # Ignore make .h; it defines _().287 # Ignore makeint.h; it defines _(). 219 288 po-check: 220 289 if test -f po/POTFILES.in; then \ 221 290 grep '^[^#]' po/POTFILES.in | sort > $@-1; \ 222 $(PERL) -wn -e 'if (/\b_\(/) { $$ARGV eq " make.h" || print "$$ARGV\n" and close ARGV }' *.c *.h| sort > $@-2; \291 $(PERL) -wn -e 'if (/\b_\(/) { $$ARGV eq "./makeint.h" || print "$$ARGV\n" and close ARGV }' `find . -name '*.[ch]'` | sed 's,^\./,,' | sort > $@-2; \ 223 292 diff -u $@-1 $@-2 || exit 1; \ 224 293 rm -f $@-1 $@-2; \ 225 294 fi 226 295 296 297 ## --------------- ## 298 ## Generate docs. ## 299 ## --------------- ## 300 301 .PHONY: update-makeweb gendocs 302 303 CVS = cvs 304 305 makeweb-repo = $(USER)@cvs.sv.gnu.org:/web/make 306 gnuweb-repo = :pserver:anonymous@cvs.sv.gnu.org:/web/www 307 gnuweb-dir = www/server/standards 308 309 # Get the GNU make web page boilerplate etc. 310 update-makeweb: 311 [ -d '$(MAKEWEBDIR)' ] || mkdir -p '$(MAKEWEBDIR)' 312 [ -d '$(MAKEWEBDIR)'/CVS ] \ 313 && { cd '$(MAKEWEBDIR)' && $(CVS) update; } \ 314 || { mkdir -p '$(dir $(MAKEWEBDIR))' && cd '$(dir $(MAKEWEBDIR))' \ 315 && $(CVS) -d $(makeweb-repo) co -d '$(notdir $(MAKEWEBDIR))' make; } 316 317 # Get the GNU web page boilerplate etc. 318 update-gnuweb: 319 [ -d '$(GNUWEBDIR)' ] || mkdir -p '$(GNUWEBDIR)' 320 [ -d '$(GNUWEBDIR)/$(gnuweb-dir)'/CVS ] \ 321 && { cd '$(GNUWEBDIR)/$(gnuweb-dir)' && $(CVS) update; } \ 322 || { cd '$(GNUWEBDIR)' && $(CVS) -d $(gnuweb-repo) co '$(gnuweb-dir)'; } 323 324 gendocs: update-gnuweb update-makeweb 325 cp $(GNULIBDIR)/doc/gendocs_template doc 326 cd doc \ 327 && rm -rf doc/manual \ 328 && $(GNULIBDIR)/build-aux/gendocs.sh --email '$(BUGLIST)' \ 329 make 'GNU Make Manual' 330 find '$(MAKEWEBDIR)'/manual \( -name CVS -prune \) -o \( -name '[!.]*' -type f -exec rm -f '{}' \; \) 331 cp -r doc/manual '$(MAKEWEBDIR)' 332 @echo 'Status of $(MAKEWEBDIR) repo:' && cd '$(MAKEWEBDIR)' \ 333 && cvs -q -n update | grep -v '^M ' \ 334 && echo '- cvs add <new files>' \ 335 && echo '- cvs remove <deleted files>' \ 336 && echo '- cvs commit' \ 337 && echo '- cvs tag make-$(subst .,-,$(VERSION))' 338 339 ## ------------------------- ## 340 ## Make release targets. ## 341 ## ------------------------- ## 342 343 .PHONY: tag-release 344 tag-release: 345 case '$(VERSION)' in \ 346 (*.*.9*) message=" candidate" ;; \ 347 (*) message= ;; \ 348 esac; \ 349 $(GIT) tag -m "GNU Make release$$message $(VERSION)" -u '$(GPG_FINGERPRINT)' '$(VERSION)' 350 227 351 ## ------------------------- ## 228 352 ## GNU FTP upload artifacts. ## … … 234 358 235 359 GPG = gpg 236 GPGFLAGS = -u 6338B6D4360 GPGFLAGS = -u $(GPG_FINGERPRINT) 237 361 238 362 DIST_ARCHIVES_SIG = $(addsuffix .sig,$(DIST_ARCHIVES)) … … 271 395 272 396 273 # Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 274 # 2007, 2008, 2009, 2010 Free Software Foundation, Inc. 397 # Rebuild Makefile.in if this file is modifed. 398 Makefile.in: maintMakefile 399 400 # Copyright (C) 1997-2016 Free Software Foundation, Inc. 275 401 # This file is part of GNU Make. 276 402 #
Note:
See TracChangeset
for help on using the changeset viewer.

