Re: [PATCH v7 5/5] Build pylibfdt as part of the normal build process

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



On Tue, Feb 21, 2017 at 09:33:40PM -0700, Simon Glass wrote:
> Possibly this needs to be made optional. For now just hook it up.
> 
> Signed-off-by: Simon Glass <sjg@xxxxxxxxxxxx>

My one concern is that I don't want to add extra dependencies to the
regular build, particularly not ones as substantial as Python and
swig.  Can we rig the Makefile to only build the Python library if
Python headers and swig are available, otherwise just turn it off?

> ---
> 
> Changes in v7: None
> Changes in v6: None
> Changes in v5:
> - Fix 'possible' typo
> 
> Changes in v4: None
> Changes in v3: None
> Changes in v2: None
> 
>  Makefile | 16 +++++++++++++++-
>  1 file changed, 15 insertions(+), 1 deletion(-)
> 
> diff --git a/Makefile b/Makefile
> index 1c48210..4adba10 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -116,7 +116,7 @@ BIN += fdtput
>  
>  SCRIPTS = dtdiff
>  
> -all: $(BIN) libfdt
> +all: $(BIN) libfdt pylibfdt
>  
>  
>  ifneq ($(DEPTARGETS),)
> @@ -203,6 +203,19 @@ dist:
>  	cat ../dtc-$(dtc_version).tar | \
>  		gzip -9 > ../dtc-$(dtc_version).tar.gz
>  
> +
> +#
> +# Rules for pylibfdt
> +#
> +PYLIBFDT_srcdir = pylibfdt
> +PYLIBFDT_objdir = pylibfdt
> +
> +include $(PYLIBFDT_srcdir)/Makefile.pylibfdt
> +
> +.PHONY: pylibfdt
> +pylibfdt: $(PYLIBFDT_objdir)/_libfdt.so
> +
> +
>  #
>  # Release signing and uploading
>  # This is for maintainer convenience, don't try this at home.
> @@ -247,6 +260,7 @@ STD_CLEANFILES = *~ *.o *.$(SHAREDLIB_EXT) *.d *.a *.i *.s core a.out vgcore.* \
>  clean: libfdt_clean tests_clean
>  	@$(VECHO) CLEAN
>  	rm -f $(STD_CLEANFILES)
> +	rm -f $(PYLIBFDT_CLEANFILES)
>  	rm -f $(VERSION_FILE)
>  	rm -f $(BIN)
>  	rm -f dtc-*.tar dtc-*.tar.sign dtc-*.tar.asc

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Device Tree]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux