[PATCH 2/2] Use autoconf-provided variables instead of absolute paths

Xiangfu Liu xiangfu at qi-hardware.com
Tue Nov 3 12:55:26 EST 2009


Hi
thanks. applied.

Mikhail Gusarov wrote:
> Signed-off-by: Mikhail Gusarov <dottedmag at dottedmag.net>
> ---
>  usbboot/src/Makefile.am |   11 +++++------
>  usbboot/src/main.c      |    2 +-
>  2 files changed, 6 insertions(+), 7 deletions(-)
> 
> diff --git a/usbboot/src/Makefile.am b/usbboot/src/Makefile.am
> index 90e256a..a26f03b 100644
> --- a/usbboot/src/Makefile.am
> +++ b/usbboot/src/Makefile.am
> @@ -1,4 +1,4 @@
> -AM_CFLAGS = -pedantic -Wall -W -O1 -g3 -std=gnu99 -lusb -lconfuse
> +AM_CFLAGS = -pedantic -Wall -W -O1 -g3 -std=gnu99 -lusb -lconfuse -DCFGDIR=\"$(cfgdir)\"
>  
>  xburst-tools_version.h:
>  	echo -e '#ifndef XBURST_TOOLS_VERSION' \
> @@ -10,15 +10,14 @@ bin_PROGRAMS = usbboot
>  usbboot_SOURCES = cmd.c  command_line.c  ingenic_cfg.c  \
>  	ingenic_usb.c  main.c
>  
> -prefix = /usr
> -datadir = /usr/share/xburst-tools
> -data_DATA = ../xburst_stage1/xburst_stage1.bin \
> +pkgdatadir = $(datadir)/xburst-tools
> +pkgdata_DATA = ../xburst_stage1/xburst_stage1.bin \
>  	../xburst_stage2/xburst_stage2.bin
>  
> -cfgdir = /etc/xburst-tools
> +cfgdir = $(sysconfdir)/xburst-tools
>  cfg_DATA = ../doc/usbboot.cfg
>  
> -EXTRA_DIST = $(datadir) $(cfgdir)
> +EXTRA_DIST = $(pkgdatadir) $(cfgdir)
>  
>  ../xburst_stage1/xburst_stage1.bin:
>  	$(MAKE) CROSS_COMPILE=mipsel-openwrt-linux- -C ../xburst_stage1
> diff --git a/usbboot/src/main.c b/usbboot/src/main.c
> index d34f583..5197059 100644
> --- a/usbboot/src/main.c
> +++ b/usbboot/src/main.c
> @@ -26,7 +26,7 @@
>  #include "ingenic_usb.h"
>  #include "ingenic_cfg.h"
>  
> -#define CONFIG_FILE_PATH "/etc/xburst-tools/usbboot.cfg"
> +#define CONFIG_FILE_PATH (CFGDIR "xburst-tools/usbboot.cfg")
>  
>  extern struct ingenic_dev ingenic_dev;
>  extern struct hand hand;





More information about the discussion mailing list


interactive