view src/mxml.mk @ 1499:9e587ca588dc

remove $($PKG)_SUBDIR) from FILE and URL defintions For now this means a bit of duplication, but if the remaining references to SUBDIR can be dealt with, we should be able to get rid of the SUBDIR defintion altogether.
author Mark Brand <mabrand@mabrand.nl>
date Sun, 12 Dec 2010 01:16:13 +0100
parents 5e1db3421f8e
children bdd96ff13570
line wrap: on
line source

# This file is part of mingw-cross-env.
# See doc/index.html for further information.

# Mini-XML
PKG             := mxml
$(PKG)_IGNORE   :=
$(PKG)_VERSION  := 2.6
$(PKG)_CHECKSUM := df180bd2e3890c97fa8a05dd131f9285468cffe1
$(PKG)_SUBDIR   := $(PKG)-$($(PKG)_VERSION)
$(PKG)_FILE     := $(PKG)-$($(PKG)_VERSION).tar.gz
$(PKG)_WEBSITE  := http://www.minixml.org/
$(PKG)_URL      := http://ftp.easysw.com/pub/$(PKG)/$($(PKG)_VERSION)/$($(PKG)_FILE)
$(PKG)_DEPS     := gcc pthreads

define $(PKG)_UPDATE
    wget -q -O- 'http://ftp.easysw.com/pub/mxml/?C=M;O=D' | \
    $(SED) -n 's,.*<a href="\([0-9][^"]*\)/.*,\1,p' | \
    head -1
endef

define $(PKG)_BUILD
    cd '$(1)' && ./configure \
        --host='$(TARGET)' \
        --disable-shared \
        --prefix='$(PREFIX)/$(TARGET)' \
        --enable-threads
    $(MAKE) -C '$(1)' -j '$(JOBS)' libmxml.a
    $(MAKE) -C '$(1)' -j 1 install-libmxml.a
    $(INSTALL) -d                   '$(PREFIX)/$(TARGET)/include'
    $(INSTALL) -m644 '$(1)/mxml.h'  '$(PREFIX)/$(TARGET)/include/'
    $(INSTALL) -d                   '$(PREFIX)/$(TARGET)/lib/pkgconfig'
    $(INSTALL) -m644 '$(1)/mxml.pc' '$(PREFIX)/$(TARGET)/lib/pkgconfig/'

    '$(TARGET)-gcc' \
        -W -Wall -Werror -ansi -pedantic \
        '$(2).c' -o '$(PREFIX)/$(TARGET)/bin/test-mxml.exe' \
        `'$(TARGET)-pkg-config' mxml --cflags --libs`
endef