annotate src/file.mk @ 3013:bcc26ffe9a0f

use variable for --host and --build configure arguments
author John W. Eaton <jwe@octave.org>
date Sun, 02 Jun 2013 12:40:32 -0400
parents 100e618349f7
children b6c7244a2f66
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2333
f653602a0500 Rebrand to new project name MXE
Volker Grabsch <vog@notjusthosting.com>
parents: 2276
diff changeset
1 # This file is part of MXE.
2353
99516e73b368 Move doc/index.html -> index.html
Volker Grabsch <vog@notjusthosting.com>
parents: 2349
diff changeset
2 # See index.html for further information.
2051
18265b282d7a new packages: file libgnurx lzo
Moritz Bunkus <moritz@bunkus.org>
parents:
diff changeset
3
18265b282d7a new packages: file libgnurx lzo
Moritz Bunkus <moritz@bunkus.org>
parents:
diff changeset
4 PKG := file
18265b282d7a new packages: file libgnurx lzo
Moritz Bunkus <moritz@bunkus.org>
parents:
diff changeset
5 $(PKG)_IGNORE :=
2251
f510a2449aaf upgrade package file
Mark Brand <mabrand@mabrand.nl>
parents: 2196
diff changeset
6 $(PKG)_CHECKSUM := df8ffe8759ec8cd85a98dc98e858563ea2555f64
2051
18265b282d7a new packages: file libgnurx lzo
Moritz Bunkus <moritz@bunkus.org>
parents:
diff changeset
7 $(PKG)_SUBDIR := file-$($(PKG)_VERSION)
18265b282d7a new packages: file libgnurx lzo
Moritz Bunkus <moritz@bunkus.org>
parents:
diff changeset
8 $(PKG)_FILE := file-$($(PKG)_VERSION).tar.gz
18265b282d7a new packages: file libgnurx lzo
Moritz Bunkus <moritz@bunkus.org>
parents:
diff changeset
9 $(PKG)_URL := ftp://ftp.astron.com/pub/file/$($(PKG)_FILE)
18265b282d7a new packages: file libgnurx lzo
Moritz Bunkus <moritz@bunkus.org>
parents:
diff changeset
10 $(PKG)_DEPS := gcc libgnurx
18265b282d7a new packages: file libgnurx lzo
Moritz Bunkus <moritz@bunkus.org>
parents:
diff changeset
11
18265b282d7a new packages: file libgnurx lzo
Moritz Bunkus <moritz@bunkus.org>
parents:
diff changeset
12 define $(PKG)_UPDATE
2525
4d0f3a9da57e all packages: use $(WGET) portability variable
Tony Theodore <tonyt@logyst.com>
parents: 2365
diff changeset
13 $(WGET) -q -O- 'ftp://ftp.astron.com/pub/file/' | \
2051
18265b282d7a new packages: file libgnurx lzo
Moritz Bunkus <moritz@bunkus.org>
parents:
diff changeset
14 grep 'file-' | \
18265b282d7a new packages: file libgnurx lzo
Moritz Bunkus <moritz@bunkus.org>
parents:
diff changeset
15 $(SED) -n 's,.*file-\([0-9][^>]*\)\.tar.*,\1,p' | \
18265b282d7a new packages: file libgnurx lzo
Moritz Bunkus <moritz@bunkus.org>
parents:
diff changeset
16 tail -1
18265b282d7a new packages: file libgnurx lzo
Moritz Bunkus <moritz@bunkus.org>
parents:
diff changeset
17 endef
18265b282d7a new packages: file libgnurx lzo
Moritz Bunkus <moritz@bunkus.org>
parents:
diff changeset
18
18265b282d7a new packages: file libgnurx lzo
Moritz Bunkus <moritz@bunkus.org>
parents:
diff changeset
19 define $(PKG)_BUILD
18265b282d7a new packages: file libgnurx lzo
Moritz Bunkus <moritz@bunkus.org>
parents:
diff changeset
20 # "file" needs a runnable version of the "file" utility
18265b282d7a new packages: file libgnurx lzo
Moritz Bunkus <moritz@bunkus.org>
parents:
diff changeset
21 # itself. This must match the source code regarding its
18265b282d7a new packages: file libgnurx lzo
Moritz Bunkus <moritz@bunkus.org>
parents:
diff changeset
22 # version. Therefore we build a native one ourselves first.
18265b282d7a new packages: file libgnurx lzo
Moritz Bunkus <moritz@bunkus.org>
parents:
diff changeset
23
2276
104e9e22453b package file: reorganise and add test program
Tony Theodore <tonyt@logyst.com>
parents: 2251
diff changeset
24 cp -Rp '$(1)' '$(1).native'
104e9e22453b package file: reorganise and add test program
Tony Theodore <tonyt@logyst.com>
parents: 2251
diff changeset
25 cd '$(1).native' && ./configure \
2855
47558e958113 Allow static/shared libraries to be configured in top-level Makefile.
John W. Eaton <jwe@octave.org>
parents: 2525
diff changeset
26 $(ENABLE_SHARED_OR_STATIC)
2276
104e9e22453b package file: reorganise and add test program
Tony Theodore <tonyt@logyst.com>
parents: 2251
diff changeset
27 $(MAKE) -C '$(1).native/src' -j '$(JOBS)' file
2051
18265b282d7a new packages: file libgnurx lzo
Moritz Bunkus <moritz@bunkus.org>
parents:
diff changeset
28
18265b282d7a new packages: file libgnurx lzo
Moritz Bunkus <moritz@bunkus.org>
parents:
diff changeset
29 cd '$(1)' && ./configure \
3013
bcc26ffe9a0f use variable for --host and --build configure arguments
John W. Eaton <jwe@octave.org>
parents: 3012
diff changeset
30 $(HOST_AND_BUILD_CONFIGURE_OPTIONS) \
2855
47558e958113 Allow static/shared libraries to be configured in top-level Makefile.
John W. Eaton <jwe@octave.org>
parents: 2525
diff changeset
31 $(ENABLE_SHARED_OR_STATIC) \
3012
100e618349f7 Improve handling of prefix directories by defining HOST_PREFIX and
John W. Eaton <jwe@octave.org>
parents: 2855
diff changeset
32 --prefix='$(HOST_PREFIX)'
2276
104e9e22453b package file: reorganise and add test program
Tony Theodore <tonyt@logyst.com>
parents: 2251
diff changeset
33 $(MAKE) -C '$(1)' -j '$(JOBS)' bin_PROGRAMS= sbin_PROGRAMS= noinst_PROGRAMS= man_MANS= FILE_COMPILE='$(1).native/src/file'
104e9e22453b package file: reorganise and add test program
Tony Theodore <tonyt@logyst.com>
parents: 2251
diff changeset
34 $(MAKE) -C '$(1)' -j 1 install bin_PROGRAMS= sbin_PROGRAMS= noinst_PROGRAMS= man_MANS=
104e9e22453b package file: reorganise and add test program
Tony Theodore <tonyt@logyst.com>
parents: 2251
diff changeset
35
104e9e22453b package file: reorganise and add test program
Tony Theodore <tonyt@logyst.com>
parents: 2251
diff changeset
36 '$(TARGET)-gcc' \
104e9e22453b package file: reorganise and add test program
Tony Theodore <tonyt@logyst.com>
parents: 2251
diff changeset
37 -W -Wall -Werror -ansi -pedantic \
3012
100e618349f7 Improve handling of prefix directories by defining HOST_PREFIX and
John W. Eaton <jwe@octave.org>
parents: 2855
diff changeset
38 '$(2).c' -o '$(HOST_PREFIX)/bin/test-file.exe' \
2276
104e9e22453b package file: reorganise and add test program
Tony Theodore <tonyt@logyst.com>
parents: 2251
diff changeset
39 -lmagic -lgnurx -lshlwapi
2051
18265b282d7a new packages: file libgnurx lzo
Moritz Bunkus <moritz@bunkus.org>
parents:
diff changeset
40 endef