[Buildroot] [PATCH 1/4] Convert tinyhttpd to gentargets

Peter Korsgaard jacmet at uclibc.org
Tue Apr 3 20:48:55 UTC 2012


>>>>> "Maxime" == Maxime Ripard <maxime.ripard at free-electrons.com> writes:

 Maxime> Signed-off-by: Maxime Ripard <maxime.ripard at free-electrons.com>

Thanks, committed with minor changes (see below).

 Maxime> -TINYHTTPD_BINARY:=httpd
 Maxime> -TINYHTTPD_TARGET_BINARY:=usr/sbin/tinyhttpd
 Maxime> +TINYHTTPD_VERSION := 0.1.0
 Maxime> +TINYHTTPD_SITE := http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/tinyhttpd/

We normally use '=' instead of ':=' for these.

 
 Maxime> -$(DL_DIR)/$(TINYHTTPD_SOURCE):
 Maxime> -	 $(call DOWNLOAD,$(TINYHTTPD_SITE)/$(TINYHTTPD_SOURCE))
 Maxime> +define TINYHTTPD_BUILD_CMDS
 Maxime> +		$(MAKE1) -C $(@D) CC="$(TARGET_CC)" CFLAGS="$(TARGET_CFLAGS)" LDFLAGS="$(TARGET_LDFLAGS)" httpd

A few comments:
 - We normally break long lines like this
 - Makefile is very simple, with a single step so MAKE1 isn't needed
 - Default target builds httpd, so the final 'httpd' isn't needed.

 Maxime> +define TINYHTTPD_INSTALL_TARGET_CMDS
 Maxime> +	$(INSTALL) -m 0755 $(@D)/httpd $(TARGET_DIR)/usr/sbin/
 Maxime>  	$(INSTALL) -m 0755 package/tinyhttpd/S85tinyhttpd $(TARGET_DIR)/etc/init.d
 Maxime>  	mkdir -p $(TARGET_DIR)/var/www
 Maxime> +endef

Please use install -D.
 

-- 
Bye, Peter Korsgaard



More information about the buildroot mailing list