Just for the record -- removing the white space prior to "TARGETS+=gd" did the trick and the package is now built as part of buildroot.  Always something simple!

Steve

PS  As expected the .mk file did need a bit more tweaking to make sure everything ends up in the right place in the staging & target dirs

On 9/29/06, Steve Sakoman <sakoman@gmail.com> wrote:
I'm still struggling trying to add a package to buildroot :-(

Anyone see anything glaringly wrong with what I'm doing?  I've tried simplifying the .mk file to the point of doing practically nothing, but still no joy.

I'm probably missing something really simple!

Steve


On 9/28/06, Steve Sakoman <sakoman@gmail.com > wrote:
Dave,

Thanks again for your help!

I edited the Config.in in the package directory to add my package and added your suggested warnings.  This was most helpful, as my package now shows up in "make menuconfig" allowing me to select it for building.  When I do a make from the gumstix-buildroot directory I get the expected warning message "package/gd/gd.mk:57: BR2_PACKAGE_GD was selected in Config.in"

It is at this point that my luck runs out.  The make system never attempts to build my package!

Below are copies of my Config.in and gd.mk files.  I'm sure the .mk needs more work (since I just did some quick editing on the .mk for a similar package), but I expected the build system to at least download the tar.gz!

Can you see any glaring errors?

***Config.in***

config BR2_PACKAGE_GD
    bool "gd"
    default n
    help
        GD is an open source code library for the dynamic creation
        of images by programmers. GD is written in C, and "wrappers"
        are available for Perl, PHP and other languages. GD creates
        PNG, JPEG and GIF images, among other formats. GD is commonly
        used to generate charts, graphics, thumbnails, and most
        anything else, on the fly. While not restricted to use on the
        web, the most common applications of GD involve web site development.

***gd.mk***

#############################################################
#
# gd
#
#############################################################
GD_VERSION:=2.0.33
GD_SOURCE:=gd-$(GD_VERSION).tar.gz
GD_SITE:=http://www.boutell.com/gd/http
GD_DIR:=$(BUILD_DIR)/gd-$(GD_VERSION)
GD_LIBRARY:= libgd.la
GD_TARGET_LIBRARY:=lib/libgd.la

$(DL_DIR)/$(GD_SOURCE):
    $(WGET) -P $(DL_DIR) $(GD_SITE)/$(GD_SOURCE)

$(GD_DIR)/.source: $(DL_DIR)/$(GD_SOURCE)
    zcat $(DL_DIR)/$(GD_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
    touch $(GD_DIR)/.source

$(GD_DIR)/.configured: $(GD_DIR)/.source
    (cd $(GD_DIR); \
        $(TARGET_CONFIGURE_OPTS) \
        CFLAGS="$(TARGET_CFLAGS)" \
        ./configure \
            --target=$(GNU_TARGET_NAME) \
            --host=$(GNU_TARGET_NAME) \
            --build=$(GNU_HOST_NAME) \
            --prefix=$(STAGING_DIR) \
    );
    touch $(GD_DIR)/.configured;

$(GD_DIR)/$(GD_LIBRARY): $(GD_DIR)/.configured
    $(MAKE) CC=$(TARGET_CC) -C $(GD_DIR)

$(TARGET_DIR)/$(GD_TARGET_LIBRARY): $(GD_DIR)/$(GD_LIBRARY)
    $(MAKE) CC=$(TARGET_CC) -C $(GD_DIR) install

gd: uclibc libpng $(TARGET_DIR)/$(GD_TARGET_LIBRARY)

gd-source: $(DL_DIR)/$(GD_SOURCE)

gd-clean:
    rm $(TARGET_DIR)lib/libgd.la

    -$(MAKE) -C $(GD_DIR) clean

gd-dirclean:
    rm -rf $(GD_DIR)

#############################################################
#
# Toplevel Makefile options
#
#############################################################
ifeq ($(strip $(BR2_PACKAGE_GD)),y)
    TARGETS+=gd
$(warning BR2_PACKAGE_GD was selected in Config.in)
else
$(warning BR2_PACKAGE_GD was NOT selected in Config.in)
endif



On 9/26/06, Dave Hylands <dhylands@gmail.com> wrote:
Hi Steve,

On 9/26/06, Steve Sakoman <sakoman@gmail.com> wrote:
> Hmmm . . .
>
> Looks like I can get "make menuconfig" to pick up the new package by adding
> the package to Config.in in the packages directory.   Now, however, make
> doesn't attempt to build the new package!  Is there yet another file to be
> modified?

The bottom of the .mk file should contain something like this. Make
sure that the BR2_PACKAGE_XXX option matches exactly what you put in
the Config.in

For debugging purposes, I've added a couple of warnings and an else,
which you can remove. Also make sure that the target added to TARGETS
matches your target further up in the makefile.

#############################################################
#
# Toplevel Makefile options
#
#############################################################
ifeq ($(strip $(BR2_PACKAGE_GREP)),y)
TARGETS+=grep
$(warning BR2_PACKAGE_GREP was selected in Config.in)
else
$(warning BR2_PACKAGE_GREP was NOT selected in Config.in)
endif

--
Dave Hylands
Vancouver, BC, Canada
http://www.DaveHylands.com/

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
gumstix-users mailing list
gumstix-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gumstix-users