On Fri, Oct 18, 2013 at 10:51:37AM +0000, Michele Tartara wrote:
> Checking the correctness of the NEWS file syntax is an important part of the
> check process, but up to now it was only possible as part of a bigger set of
> tests. This commit creates a Makefile target to run that independently.
> 
> The developer notes are updated to document this new target.
> 
> Signed-off-by: Michele Tartara <[email protected]>
> ---
>  Makefile.am      |    6 ++++--
>  doc/devnotes.rst |    4 ++++
>  2 files changed, 8 insertions(+), 2 deletions(-)
> 
> diff --git a/Makefile.am b/Makefile.am
> index d15854e..0bcd349 100644
> --- a/Makefile.am
> +++ b/Makefile.am
> @@ -2027,11 +2027,13 @@ check-dirs: $(GENERATED_FILES)
>       }
>  
>  .PHONY: check-local
> -check-local: check-dirs $(GENERATED_FILES)
> +check-news:

Isn't a dependency on $(CHECK_NEWS) or 'check-dirs' necessary ?
What about a dependency on the 'NEWS' file?

> +     RELEASE=$(PACKAGE_VERSION) $(CHECK_NEWS) < $(top_srcdir)/NEWS

Isn't it safer to use 'env' ?

  env RELEASE=$(PACKAGE_VERSION) ...

Thanks,
Jose

> +
> +check-local: check-dirs check-news $(GENERATED_FILES)
>       $(CHECK_PYTHON_CODE) $(check_python_code)
>       PYTHONPATH=. $(CHECK_HEADER) $(check_python_code)
>       $(CHECK_VERSION) $(VERSION) $(top_srcdir)/NEWS
> -     RELEASE=$(PACKAGE_VERSION) $(CHECK_NEWS) < $(top_srcdir)/NEWS
>       PYTHONPATH=. $(RUN_IN_TEMPDIR) $(CURDIR)/$(CHECK_IMPORTS) . 
> $(standalone_python_modules)
>       error= ; \
>       if [ "x`echo $(VERSION_SUFFIX)|grep 'alpha'`" == "x" ]; then \
> diff --git a/doc/devnotes.rst b/doc/devnotes.rst
> index 222f4ce..bdd0ebe 100644
> --- a/doc/devnotes.rst
> +++ b/doc/devnotes.rst
> @@ -214,6 +214,10 @@ for example::
>  
>    $ make hs-shell-{balancing,basic}
>  
> +Checking for the correct style of the NEWS file is also possible, by 
> running::
> +
> +  $ make check-news
> +
>  Packaging notes
>  ===============
>  
> -- 
> 1.7.10.4
> 

-- 
Jose Antonio Lopes
Ganeti Engineering
Google Germany GmbH
Dienerstr. 12, 80331, München

Registergericht und -nummer: Hamburg, HRB 86891
Sitz der Gesellschaft: Hamburg
Geschäftsführer: Graham Law, Christine Elizabeth Flores
Steuernummer: 48/725/00206
Umsatzsteueridentifikationsnummer: DE813741370

Reply via email to