bug-grep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: "make dist" fails if I delete the dummy ChangeLog


From: Jim Meyering
Subject: Re: "make dist" fails if I delete the dummy ChangeLog
Date: Sun, 06 Nov 2011 19:04:45 +0100

Stefano Lattarini wrote:
...
> Also, I've made the recipe more customizable, allowing overrides of the
> build-aux directory, and allowing an empty "start date" (which will mean
> "give me all the git log entries, from the root commit onwards").  I've
> also tried to cater to a bug of Solaris make (the recipe of a .PHONY
> target named as an existing file is *not* executed, d'oh!).  My new
> attempt is attached; once it has been polished, I'll submit it to the
> bug-gnulib list, and then you can start using it in grep.
...
> +.PHONY: gl--changelog-regen-hook
> +gl--changelog-regen-hook:
> +.PHONY: ChangeLog
> +ChangeLog: gl--changelog-regen-hook
> +     $(AM_V_GEN)set -e; set -u;                                       \
> +     build_auxdir=$(build_auxdir);                                    \
> +     test -n "$$build_auxdir"                                         \
> +       || build_auxdir=$(top_srcdir)/build-aux;                       \
> +     log_start_date=$(changelog_start_date);                          \
> +     test -z "$$log_start_date"                                       \
> +       || log_start_date="--since=$$log_start_date";                  \
> +## The ChangeLog should be regenerated unconditionally when working from
> +## checked-out sources; otherwise, if we're working from a distribution
> +## tarball, we expect the ChangeLog to be distributed, so check that it
> +## is indeed present in the source directory.
> +     if test -d $(srcdir)/.git; then                                  \
> +       rm -f address@hidden                                                  
>  \
> +         && $$build_auxdir/gitlog-to-changelog $$log_start_date 
> >address@hidden \
> +         && chmod a-w address@hidden                                         
>  \
> +         && mv -f address@hidden $@                                          
>  \
> +         || exit 1;                                                   \
> +     elif test ! -f $(srcdir)/$@; then                                \
> +       echo "Source tree is not a git checkout, and no pre-existent"  \
> +            "$@ file has been found there" >&2;                       \
> +       exit 1;                                                        \
> +     fi

Thanks, but this would currently remove the ChangeLog
symlink[*] that I typically have in the top-level directory,
replacing it with a generated file.  There is no need
to put such a file in the working directory.



[*] That ChangeLog symlink is generated per this excerpt from
vc-dwim --help:

EXAMPLE
    Here's how to use vc-dwim in a project that does not version-control a
    ChangeLog file.  Create a repository just for your personal ChangeLog file
    and make a symlink to it from the top-level directory of the project.  For
    projects that use git, I put this tiny auxiliary repository in a directory
    named .git/c.  You can use this bash/zsh alias to set it up and to create
    the symlink:

        git-changelog-symlink-init()
        {
            local d=.git/c
            test -d .git || return 1
            mkdir $d
            touch $d/ChangeLog
            (cd $d && git init && git add ChangeLog && git commit -m. -a)
            ln --backup -s $d/ChangeLog .
        }



reply via email to

[Prev in Thread] Current Thread [Next in Thread]