Patchwork [2/4] luajit: allow building for the host

login
register
mail settings
Submitter Francois Perrad
Date July 30, 2012, 6:31 a.m.
Message ID <1343629890-4657-2-git-send-email-francois.perrad@gadz.org>
Download mbox | patch
Permalink /patch/173965/
State Superseded
Headers show

Comments

Francois Perrad - July 30, 2012, 6:31 a.m.
---
 package/luajit/luajit.mk |   10 ++++++++++
 1 file changed, 10 insertions(+)
Thomas Petazzoni - July 30, 2012, 8:54 p.m.
Hello,

Le Mon, 30 Jul 2012 08:31:28 +0200,
Francois Perrad <fperrad@gmail.com> a écrit :

> diff --git a/package/luajit/luajit.mk b/package/luajit/luajit.mk
> index b35cdb4..19bf659 100644
> --- a/package/luajit/luajit.mk
> +++ b/package/luajit/luajit.mk
> @@ -48,6 +48,11 @@ define LUAJIT_BUILD_CMDS
>  		-C $(@D) amalg
>  endef
>  
> +define HOST_LUAJIT_BUILD_CMDS
> +	$(MAKE) PREFIX="/usr" \
> +		-C $(@D) amalg
> +endef
> +
>  define LUAJIT_INSTALL_STAGING_CMDS
>  	$(MAKE) PREFIX="/usr" DESTDIR="$(STAGING_DIR)" -C $(@D) install
>  endef
> @@ -56,8 +61,13 @@ define LUAJIT_INSTALL_TARGET_CMDS
>  	$(MAKE) PREFIX="/usr" DESTDIR="$(TARGET_DIR)" -C $(@D) install
>  endef
>  
> +define HOST_LUAJIT_INSTALL_CMDS
> +	$(MAKE) PREFIX="/usr" DESTDIR="$(HOST_DIR)" -C $(@D) install
> +endef
> +
>  define LUAJIT_CLEAN_CMDS
>  	-$(MAKE) -C $(@D) clean
>  endef
>  
>  $(eval $(generic-package))
> +$(eval $(host-generic-package))

What is the use case for building luajit on the host?

Thanks!

Thomas

Patch

diff --git a/package/luajit/luajit.mk b/package/luajit/luajit.mk
index b35cdb4..19bf659 100644
--- a/package/luajit/luajit.mk
+++ b/package/luajit/luajit.mk
@@ -48,6 +48,11 @@  define LUAJIT_BUILD_CMDS
 		-C $(@D) amalg
 endef
 
+define HOST_LUAJIT_BUILD_CMDS
+	$(MAKE) PREFIX="/usr" \
+		-C $(@D) amalg
+endef
+
 define LUAJIT_INSTALL_STAGING_CMDS
 	$(MAKE) PREFIX="/usr" DESTDIR="$(STAGING_DIR)" -C $(@D) install
 endef
@@ -56,8 +61,13 @@  define LUAJIT_INSTALL_TARGET_CMDS
 	$(MAKE) PREFIX="/usr" DESTDIR="$(TARGET_DIR)" -C $(@D) install
 endef
 
+define HOST_LUAJIT_INSTALL_CMDS
+	$(MAKE) PREFIX="/usr" DESTDIR="$(HOST_DIR)" -C $(@D) install
+endef
+
 define LUAJIT_CLEAN_CMDS
 	-$(MAKE) -C $(@D) clean
 endef
 
 $(eval $(generic-package))
+$(eval $(host-generic-package))