[Libosinfo] [osinfo-db-tools PATCH 6/8] Support `make syntax-check` without Makefile

Daniel P. Berrangé berrange at redhat.com
Thu Jun 20 17:14:18 UTC 2019


On Thu, Jun 20, 2019 at 05:21:25PM +0200, Fabiano Fidêncio wrote:
> A few dirty hacks have been done in GNUmakefile, cfg.mk, and maint.mk in
> order to support running `make syntax-check` without having to have a
> Makefile around.
> 
> GNUmakefile: set srcdir & top_srcdir and remove the parts that would
> cause an error due to no presence of a Makefile.
> 
> cfg.mk: replace $(SED) by sed as $(SED) is set in the Makefile after
> running ./configure.
> 
> maint.mk: add sc_prohibit_always-defined_macros to the list of local
> checks to skip as it looks for Makefile, which is generated after
> running ./configure.
> 
> Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
> ---
>  GNUmakefile | 28 ++--------------------------
>  cfg.mk      |  3 ++-
>  maint.mk    | 32 ++++++++++++++++----------------
>  3 files changed, 20 insertions(+), 43 deletions(-)


> diff --git a/maint.mk b/maint.mk
> index 04a839a..035d2ac 100644
> --- a/maint.mk
> +++ b/maint.mk
> @@ -69,7 +69,7 @@ _dot_escaped_srcdir = $(subst .,\.,$(srcdir))
>  ifeq ($(srcdir),.)
>    _prepend_srcdir_prefix =
>  else
> -  _prepend_srcdir_prefix = | $(SED) 's|^|$(srcdir)/|'
> +  _prepend_srcdir_prefix = | sed 's|^|$(srcdir)/|'
>  endif

This can be avoided if you just pull in the newer maint.mk from
gnulib. It simply sets the SED variable at the top for people
who are using this file directly instead of imported via automake.


Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|




More information about the Libosinfo mailing list