mirror of
https://github.com/gperftools/gperftools
synced 2025-02-10 00:16:57 +00:00
implement simpler ChangeLog generation for source tarballs
We used ax_generate_changelog which works great. But it made our makefile require GNU make, which was causing annoyance on bsd systems.
This commit is contained in:
parent
b30b984281
commit
630dac81ea
@ -1,2 +0,0 @@
|
|||||||
The ChangeLog is auto-generated when releasing.
|
|
||||||
If you are seeing this, use 'git log' for a detailed list of changes.
|
|
11
Makefile.am
11
Makefile.am
@ -119,7 +119,7 @@ googleinclude_HEADERS = \
|
|||||||
# Add your documentation files (in doc/) in addition to these
|
# Add your documentation files (in doc/) in addition to these
|
||||||
# top-level boilerplate files. Also add a TODO file if you have one.
|
# top-level boilerplate files. Also add a TODO file if you have one.
|
||||||
# We'll add to this later, on a library-by-library basis
|
# We'll add to this later, on a library-by-library basis
|
||||||
dist_doc_DATA = AUTHORS COPYING ChangeLog INSTALL NEWS README README_windows.txt \
|
dist_doc_DATA = AUTHORS COPYING INSTALL NEWS README README_windows.txt \
|
||||||
TODO ChangeLog.old
|
TODO ChangeLog.old
|
||||||
|
|
||||||
# The libraries (.so's) you want to install
|
# The libraries (.so's) you want to install
|
||||||
@ -1442,10 +1442,15 @@ libprofiler.pc: libtcmalloc.pc
|
|||||||
libtool: $(LIBTOOL_DEPS)
|
libtool: $(LIBTOOL_DEPS)
|
||||||
$(SHELL) ./config.status --recheck
|
$(SHELL) ./config.status --recheck
|
||||||
|
|
||||||
@GENERATE_CHANGELOG_RULES@
|
$(top_distdir)/ChangeLog:
|
||||||
|
if test ! -f $(top_srcdir)/ChangeLog ; \
|
||||||
|
then git --git-dir=$(top_srcdir)/.git --work-tree=$(top_srcdir) \
|
||||||
|
log --stat -M -C --name-status --no-color \
|
||||||
|
| fmt --split-only >$(top_distdir)/ChangeLog; \
|
||||||
|
else cp $(top_srcdir)/ChangeLog $(top_distdir)/ChangeLog; fi
|
||||||
|
|
||||||
# Windows wants write permission to .vcxproj files and maybe even sln files.
|
# Windows wants write permission to .vcxproj files and maybe even sln files.
|
||||||
dist-hook: dist-ChangeLog
|
dist-hook: $(top_distdir)/ChangeLog
|
||||||
test -e "$(distdir)/vsprojects" \
|
test -e "$(distdir)/vsprojects" \
|
||||||
&& chmod -R u+w $(distdir)/*.sln $(distdir)/vsprojects/
|
&& chmod -R u+w $(distdir)/*.sln $(distdir)/vsprojects/
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ AC_SUBST(TCMALLOC_AND_PROFILER_SO_VERSION)
|
|||||||
AC_CONFIG_SRCDIR(README)
|
AC_CONFIG_SRCDIR(README)
|
||||||
AC_CONFIG_MACRO_DIR([m4])
|
AC_CONFIG_MACRO_DIR([m4])
|
||||||
AC_CANONICAL_HOST
|
AC_CANONICAL_HOST
|
||||||
AM_INIT_AUTOMAKE([dist-zip])
|
AM_INIT_AUTOMAKE([dist-zip foreign])
|
||||||
AC_CONFIG_HEADERS([src/config.h])
|
AC_CONFIG_HEADERS([src/config.h])
|
||||||
|
|
||||||
AM_MAINTAINER_MODE()
|
AM_MAINTAINER_MODE()
|
||||||
@ -33,8 +33,6 @@ AC_SUBST(TC_VERSION_MINOR)
|
|||||||
AC_SUBST(TC_VERSION_PATCH)
|
AC_SUBST(TC_VERSION_PATCH)
|
||||||
AC_SUBST(PACKAGE_STRING)
|
AC_SUBST(PACKAGE_STRING)
|
||||||
|
|
||||||
AX_GENERATE_CHANGELOG
|
|
||||||
|
|
||||||
# The user can choose not to compile in the heap-profiler, the
|
# The user can choose not to compile in the heap-profiler, the
|
||||||
# heap-checker, or the cpu-profiler. There's also the possibility
|
# heap-checker, or the cpu-profiler. There's also the possibility
|
||||||
# for a 'fully minimal' compile, which leaves out the stacktrace
|
# for a 'fully minimal' compile, which leaves out the stacktrace
|
||||||
|
@ -1,99 +0,0 @@
|
|||||||
# ===========================================================================
|
|
||||||
# http://www.gnu.org/software/autoconf-archive/ax_generate_changelog.html
|
|
||||||
# ===========================================================================
|
|
||||||
#
|
|
||||||
# SYNOPSIS
|
|
||||||
#
|
|
||||||
# AX_GENERATE_CHANGELOG()
|
|
||||||
#
|
|
||||||
# DESCRIPTION
|
|
||||||
#
|
|
||||||
# Builds a rule for generating a ChangeLog file from version control
|
|
||||||
# system commit messages. Currently, the only supported VCS is git, but
|
|
||||||
# support for others could be added in future.
|
|
||||||
#
|
|
||||||
# Defines GENERATE_CHANGELOG_RULES which should be substituted in your
|
|
||||||
# Makefile.
|
|
||||||
#
|
|
||||||
# Usage example:
|
|
||||||
#
|
|
||||||
# configure.ac:
|
|
||||||
#
|
|
||||||
# AX_GENERATE_CHANGELOG
|
|
||||||
#
|
|
||||||
# Makefile.am:
|
|
||||||
#
|
|
||||||
# @GENERATE_CHANGELOG_RULES@
|
|
||||||
# CHANGELOG_START = 0.2.3^
|
|
||||||
# dist-hook: dist-ChangeLog
|
|
||||||
#
|
|
||||||
# ChangeLog (stub committed to VCS):
|
|
||||||
#
|
|
||||||
# The ChangeLog is auto-generated when releasing.
|
|
||||||
# If you are seeing this, use 'git log' for a detailed list of changes.
|
|
||||||
#
|
|
||||||
# This results in a "dist-ChangeLog" rule being added to the Makefile.
|
|
||||||
# When run, "dist-ChangeLog" will generate a ChangeLog in the
|
|
||||||
# $(top_distdir), using $(CHANGELOG_GIT_FLAGS) to format the output from
|
|
||||||
# "git log" being run in $(CHANGELOG_GIT_DIR).
|
|
||||||
#
|
|
||||||
# Unless Automake is initialised with the 'foreign' option, a dummy
|
|
||||||
# ChangeLog file must be committed to VCS in $(top_srcdir), containing the
|
|
||||||
# text above (for example). It will be substituted by the automatically
|
|
||||||
# generated ChangeLog during "make dist".
|
|
||||||
#
|
|
||||||
# LICENSE
|
|
||||||
#
|
|
||||||
# Copyright (c) 2015 David King <amigadave@amigadave.com>
|
|
||||||
# Copyright (c) 2015 Philip Withnall <philip.withnall@collabora.co.uk>
|
|
||||||
#
|
|
||||||
# Copying and distribution of this file, with or without modification, are
|
|
||||||
# permitted in any medium without royalty provided the copyright notice
|
|
||||||
# and this notice are preserved. This file is offered as-is, without any
|
|
||||||
# warranty.
|
|
||||||
|
|
||||||
#serial 1
|
|
||||||
|
|
||||||
AC_DEFUN([AX_GENERATE_CHANGELOG],[
|
|
||||||
# Find git, defaulting to the 'missing' script so the user gets a nice
|
|
||||||
# message if git is missing, rather than a plain 'command not found'.
|
|
||||||
AC_PATH_PROG([GIT],[git],[${am_missing_run}git])
|
|
||||||
AC_SUBST([GIT])
|
|
||||||
|
|
||||||
# Build the ChangeLog rules.
|
|
||||||
m4_pattern_allow([AM_V_GEN])
|
|
||||||
GENERATE_CHANGELOG_RULES='
|
|
||||||
# Generate ChangeLog
|
|
||||||
#
|
|
||||||
# Optional:
|
|
||||||
# - CHANGELOG_START: git commit ID or tag name to output changelogs from
|
|
||||||
# (exclusive). (Default: include all commits)
|
|
||||||
# - CHANGELOG_GIT_FLAGS: General flags to pass to git-log when generating the
|
|
||||||
# ChangeLog. (Default: various)
|
|
||||||
# - CHANGELOG_GIT_DIR: .git directory to use. (Default: $(top_srcdir)/.git)
|
|
||||||
|
|
||||||
# git-specific
|
|
||||||
CHANGELOG_GIT_FLAGS ?= --stat -M -C --name-status --no-color
|
|
||||||
CHANGELOG_GIT_DIR ?= $(top_srcdir)/.git
|
|
||||||
|
|
||||||
ifeq ($(CHANGELOG_START),)
|
|
||||||
CHANGELOG_GIT_RANGE =
|
|
||||||
else
|
|
||||||
CHANGELOG_GIT_RANGE = $(CHANGELOG_START)..
|
|
||||||
endif
|
|
||||||
|
|
||||||
# Generate a ChangeLog in $(top_distdir)
|
|
||||||
dist-ChangeLog:
|
|
||||||
$(AM_V_GEN)if $(GIT) \
|
|
||||||
--git-dir=$(CHANGELOG_GIT_DIR) --work-tree=$(top_srcdir) log \
|
|
||||||
$(CHANGELOG_GIT_FLAGS) $(CHANGELOG_GIT_RANGE) \
|
|
||||||
| fmt --split-only >.ChangeLog.tmp; \
|
|
||||||
then mv -f .ChangeLog.tmp "$(top_distdir)/ChangeLog"; \
|
|
||||||
else rm -f .ChangeLog.tmp; exit 1; fi
|
|
||||||
|
|
||||||
.PHONY: dist-ChangeLog
|
|
||||||
'
|
|
||||||
|
|
||||||
AC_SUBST([GENERATE_CHANGELOG_RULES])
|
|
||||||
m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([GENERATE_CHANGELOG_RULES])])
|
|
||||||
])
|
|
Loading…
Reference in New Issue
Block a user