Mercurial > hg > mxe-octave-anirudha
annotate src/file.mk @ 3236:9d6566d9944e default tip
Added tag GSoC_end for changeset f53543bd5dd6
author | Anirudha Bose <ani07nov@gmail.com> |
---|---|
date | Tue, 24 Sep 2013 16:13:01 +0530 |
parents | 5ef49fb3299d |
children |
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 | 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) |
3048
5ef49fb3299d
treat gcc and binutils as build tools
John W. Eaton <jwe@octave.org>
parents:
3031
diff
changeset
|
10 $(PKG)_DEPS := libgnurx |
2051
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 |
3031
951da75fd09c
improve handling of cross tool prefix
John W. Eaton <jwe@octave.org>
parents:
3014
diff
changeset
|
36 '$(MXE_CC)' \ |
2276
104e9e22453b
package file: reorganise and add test program
Tony Theodore <tonyt@logyst.com>
parents:
2251
diff
changeset
|
37 -W -Wall -Werror -ansi -pedantic \ |
3014
b6c7244a2f66
Use HOST_BINDIR, HOST_LIBDIR, and HOST_INCDIR instead of MXE_BINDIR, MXE_LIBDIR, and MXE_INCDIR. Attempt to use these variables consistently instead of using $(HOST_PREFIX)/bin, $(HOST_PREFIX)/lib, and $(HOST_PREFIX)/include
John W. Eaton <jwe@octave.org>
parents:
3013
diff
changeset
|
38 '$(2).c' -o '$(HOST_BINDIR)/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 |