annotate src/file.mk @ 7207:9ed6500e56d3 default tip @

maint: Merge release to default.
author Markus Mützel <markus.muetzel@gmx.de>
date Fri, 17 May 2024 20:16:41 +0200
parents b9d5704ca9c1
children
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 :=
3480
13be64f9f16d move version info from index.html to src/*.mk files
John W. Eaton <jwe@octave.org>
parents: 3048
diff changeset
6 $(PKG)_VERSION := 5.11
2251
f510a2449aaf upgrade package file
Mark Brand <mabrand@mabrand.nl>
parents: 2196
diff changeset
7 $(PKG)_CHECKSUM := df8ffe8759ec8cd85a98dc98e858563ea2555f64
2051
18265b282d7a new packages: file libgnurx lzo
Moritz Bunkus <moritz@bunkus.org>
parents:
diff changeset
8 $(PKG)_SUBDIR := file-$($(PKG)_VERSION)
18265b282d7a new packages: file libgnurx lzo
Moritz Bunkus <moritz@bunkus.org>
parents:
diff changeset
9 $(PKG)_FILE := file-$($(PKG)_VERSION).tar.gz
7190
b9d5704ca9c1 * src/file.mk: use https for update, download
John Donoghue <john.donoghue@ieee.org>
parents: 3480
diff changeset
10 $(PKG)_URL := https://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
11 $(PKG)_DEPS := libgnurx
2051
18265b282d7a new packages: file libgnurx lzo
Moritz Bunkus <moritz@bunkus.org>
parents:
diff changeset
12
18265b282d7a new packages: file libgnurx lzo
Moritz Bunkus <moritz@bunkus.org>
parents:
diff changeset
13 define $(PKG)_UPDATE
7190
b9d5704ca9c1 * src/file.mk: use https for update, download
John Donoghue <john.donoghue@ieee.org>
parents: 3480
diff changeset
14 $(WGET) -q -O- 'https://astron.com/pub/file/' | \
2051
18265b282d7a new packages: file libgnurx lzo
Moritz Bunkus <moritz@bunkus.org>
parents:
diff changeset
15 grep 'file-' | \
18265b282d7a new packages: file libgnurx lzo
Moritz Bunkus <moritz@bunkus.org>
parents:
diff changeset
16 $(SED) -n 's,.*file-\([0-9][^>]*\)\.tar.*,\1,p' | \
18265b282d7a new packages: file libgnurx lzo
Moritz Bunkus <moritz@bunkus.org>
parents:
diff changeset
17 tail -1
18265b282d7a new packages: file libgnurx lzo
Moritz Bunkus <moritz@bunkus.org>
parents:
diff changeset
18 endef
18265b282d7a new packages: file libgnurx lzo
Moritz Bunkus <moritz@bunkus.org>
parents:
diff changeset
19
18265b282d7a new packages: file libgnurx lzo
Moritz Bunkus <moritz@bunkus.org>
parents:
diff changeset
20 define $(PKG)_BUILD
18265b282d7a new packages: file libgnurx lzo
Moritz Bunkus <moritz@bunkus.org>
parents:
diff changeset
21 # "file" needs a runnable version of the "file" utility
18265b282d7a new packages: file libgnurx lzo
Moritz Bunkus <moritz@bunkus.org>
parents:
diff changeset
22 # itself. This must match the source code regarding its
18265b282d7a new packages: file libgnurx lzo
Moritz Bunkus <moritz@bunkus.org>
parents:
diff changeset
23 # version. Therefore we build a native one ourselves first.
18265b282d7a new packages: file libgnurx lzo
Moritz Bunkus <moritz@bunkus.org>
parents:
diff changeset
24
2276
104e9e22453b package file: reorganise and add test program
Tony Theodore <tonyt@logyst.com>
parents: 2251
diff changeset
25 cp -Rp '$(1)' '$(1).native'
104e9e22453b package file: reorganise and add test program
Tony Theodore <tonyt@logyst.com>
parents: 2251
diff changeset
26 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
27 $(ENABLE_SHARED_OR_STATIC)
2276
104e9e22453b package file: reorganise and add test program
Tony Theodore <tonyt@logyst.com>
parents: 2251
diff changeset
28 $(MAKE) -C '$(1).native/src' -j '$(JOBS)' file
2051
18265b282d7a new packages: file libgnurx lzo
Moritz Bunkus <moritz@bunkus.org>
parents:
diff changeset
29
18265b282d7a new packages: file libgnurx lzo
Moritz Bunkus <moritz@bunkus.org>
parents:
diff changeset
30 cd '$(1)' && ./configure \
3013
bcc26ffe9a0f use variable for --host and --build configure arguments
John W. Eaton <jwe@octave.org>
parents: 3012
diff changeset
31 $(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
32 $(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
33 --prefix='$(HOST_PREFIX)'
2276
104e9e22453b package file: reorganise and add test program
Tony Theodore <tonyt@logyst.com>
parents: 2251
diff changeset
34 $(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
35 $(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
36
3031
951da75fd09c improve handling of cross tool prefix
John W. Eaton <jwe@octave.org>
parents: 3014
diff changeset
37 '$(MXE_CC)' \
2276
104e9e22453b package file: reorganise and add test program
Tony Theodore <tonyt@logyst.com>
parents: 2251
diff changeset
38 -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
39 '$(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
40 -lmagic -lgnurx -lshlwapi
2051
18265b282d7a new packages: file libgnurx lzo
Moritz Bunkus <moritz@bunkus.org>
parents:
diff changeset
41 endef