VirtualBox

Changeset 3140 in kBuild for trunk/src/kmk/maintMakefile


Ignore:
Timestamp:
Mar 14, 2018 9:28:10 PM (7 years ago)
Author:
bird
Message:

kmk: Merged in changes from GNU make 4.2.1 (2e55f5e4abdc0e38c1d64be703b446695e70b3b6 / https://git.savannah.gnu.org/git/make.git).

Location:
trunk/src/kmk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kmk

  • trunk/src/kmk/maintMakefile

    r2591 r3140  
    11# 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
     2# only if you have the full copy of the GNU make sources from the Git
    33# tree, not a dist copy.
     4
     5BUGLIST := bug-make@gnu.org
     6
     7# These are related to my personal setup.
     8GPG_FINGERPRINT := 6338B6D4
     9
     10# SRCROOTDIR is just a handy location to keep source files in
     11SRCROOTDIR ?= $(HOME)/src
     12
     13# Where the gnulib project has been locally cloned
     14GNULIBDIR ?= $(SRCROOTDIR)/gnulib
     15
     16# Where to put the CVS checkout of the GNU web repository
     17GNUWEBDIR ?= $(SRCROOTDIR)/gnu-www
     18
     19# Where to put the CVS checkout of the GNU make web repository
     20MAKEWEBDIR ?= $(SRCROOTDIR)/make/make-web
    421
    522# We like mondo-warnings!
    623ifeq ($(KBUILD_TARGET),openbsd) # bird
    7 AM_CFLAGS += -Wall -Wshadow -Wpointer-arith -Wbad-function-cast
     24AM_CFLAGS += -Wall -Wwrite-strings -Wshadow -Wpointer-arith -Wbad-function-cast
    825else
    9 AM_CFLAGS += -Wall -Wextra -Wdeclaration-after-statement -Wshadow -Wpointer-arith -Wbad-function-cast
     26AM_CFLAGS += -Wall -Wwrite-strings -Wextra -Wdeclaration-after-statement -Wshadow -Wpointer-arith -Wbad-function-cast
    1027endif
     28
     29MAKE_MAINTAINER_MODE := -DMAKE_MAINTAINER_MODE
     30AM_CPPFLAGS += $(MAKE_MAINTAINER_MODE)
    1131
    1232# I want this one but I have to wait for the const cleanup!
     
    2343# These are built as a side-effect of the dist rule
    2444#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 $@ $<
    2549
    2650# General rule for turning a .template into a regular file.
     
    85109         done) > $@
    86110
    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
     113GIT :=  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
     119git-clean:
     120        -$(GIT) clean -fdX
     121git-very-clean: git-clean
     122        -$(GIT) clean -fd
     123
     124
     125
     126## ---------------------- ##
     127## Generating ChangeLog.  ##
     128## ---------------------- ##
     129
     130gl2cl-date := 2013-10-10
     131gl2cl := $(GNULIBDIR)/build-aux/gitlog-to-changelog
     132
     133# Rebuild the changelog whenever a new commit is added
     134ChangeLog: .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" > '$@'
    118146
    119147
     
    121149## Updating files.  ##
    122150## ---------------- ##
    123 
    124 WGET = wget --passive-ftp -nv
     151RSYNC = rsync -Lrtvz
     152WGET = wget --passive-ftp -np -nv
    125153ftp-gnu = ftp://ftp.gnu.org/gnu
    126154
     
    128156                    echo $(target) is unchanged; rm -f $(target).t; \
    129157                  else \
    130                     mv $(target).t $(target); \
     158                    mv -f $(target).t $(target); \
    131159                  fi
    132160
     
    140168#   ftp://tiger.informatik.hu-berlin.de/pub/po/maint/
    141169
     170po_wget_flags = --recursive --level=1 --no-directories --no-check-certificate
    142171po_repo = http://translationproject.org/latest/$(PACKAGE)
     172po_sync = translationproject.org::tp/latest/$(PACKAGE)/
     173
    143174.PHONY: do-po-update po-update
    144175do-po-update:
     
    146177          && rm -rf "$$tmppo" \
    147178          && 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"
    151182        cd po && $(MAKE) update-po
    152183        $(MAKE) po-check
     
    197228
    198229
     230# ---------------------------------- #
     231# Alternative configuration checks.  #
     232# ---------------------------------- #
     233
     234.PHONY: check-alt-config
     235check-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.
     243NR_MAKE = $(MAKE)
     244
     245# Check builds both with build.sh and with make
     246checkcfg.%: 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
    199263## --------------- ##
    200264## Sanity checks.  ##
    201265## --------------- ##
    202266
    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
    204273# previous test may reveal problems requiring new ChangeLog entries.
    205274local-check: po-check changelog-check
     
    216285
    217286# Verify that all source files using _() are listed in po/POTFILES.in.
    218 # Ignore make.h; it defines _().
     287# Ignore makeint.h; it defines _().
    219288po-check:
    220289        if test -f po/POTFILES.in; then \
    221290          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; \
    223292          diff -u $@-1 $@-2 || exit 1; \
    224293          rm -f $@-1 $@-2; \
    225294        fi
    226295
     296
     297## --------------- ##
     298## Generate docs.  ##
     299## --------------- ##
     300
     301.PHONY: update-makeweb gendocs
     302
     303CVS = cvs
     304
     305makeweb-repo = $(USER)@cvs.sv.gnu.org:/web/make
     306gnuweb-repo = :pserver:anonymous@cvs.sv.gnu.org:/web/www
     307gnuweb-dir = www/server/standards
     308
     309# Get the GNU make web page boilerplate etc.
     310update-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.
     318update-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
     324gendocs: 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
     344tag-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
    227351## ------------------------- ##
    228352## GNU FTP upload artifacts. ##
     
    234358
    235359GPG = gpg
    236 GPGFLAGS = -u 6338B6D4
     360GPGFLAGS = -u $(GPG_FINGERPRINT)
    237361
    238362DIST_ARCHIVES_SIG = $(addsuffix .sig,$(DIST_ARCHIVES))
     
    271395
    272396
    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.
     398Makefile.in: maintMakefile
     399
     400# Copyright (C) 1997-2016 Free Software Foundation, Inc.
    275401# This file is part of GNU Make.
    276402#
Note: See TracChangeset for help on using the changeset viewer.

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