Mercurial > mxe-octave
annotate Makefile @ 2767:69b720fb1a9f
package libglade: use configure and make options instead of patch and autoconf
author | Tony Theodore <tonyt@logyst.com> |
---|---|
date | Thu, 20 Sep 2012 20:48:22 +1000 |
parents | 569378fc34be |
children | daff1938f6b1 |
rev | line source |
---|---|
2333
f653602a0500
Rebrand to new project name MXE
Volker Grabsch <vog@notjusthosting.com>
parents:
2330
diff
changeset
|
1 # This file is part of MXE. |
2353
99516e73b368
Move doc/index.html -> index.html
Volker Grabsch <vog@notjusthosting.com>
parents:
2350
diff
changeset
|
2 # See index.html for further information. |
123
9fedbab70063
improved coding style
Volker Grabsch <vog@notjusthosting.com>
parents:
122
diff
changeset
|
3 |
206
c82301af7b7f
disable parallel builds by default and document in the README how to enable parallelization
Volker Grabsch <vog@notjusthosting.com>
parents:
197
diff
changeset
|
4 JOBS := 1 |
450
f3563b6817c1
update the target triplet to i686-pc-mingw32
Volker Grabsch <vog@notjusthosting.com>
parents:
448
diff
changeset
|
5 TARGET := i686-pc-mingw32 |
2696
fe58e4975380
replace sourceforge mirror
Mark Brand <mabrand@mabrand.nl>
parents:
2475
diff
changeset
|
6 SOURCEFORGE_MIRROR := freefr.dl.sourceforge.net |
2727
e474975121d6
add tertiary fallback for unavailable package files
Tony Theodore <tonyt@logyst.com>
parents:
2697
diff
changeset
|
7 PKG_MIRROR := s3.amazonaws.com/mxe-pkg |
2730 | 8 PKG_CDN := d1yihgixbnrglp.cloudfront.net |
114
771b6c26008d
completely rewritten from scratch as Makefile
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
9 |
2380
f89dd4c9e49f
Portability fix: Define $(PWD) before $(SHELL)
Volker Grabsch <vog@notjusthosting.com>
parents:
2379
diff
changeset
|
10 PWD := $(shell pwd) |
2369
4f5f4af84b12
Improve order of entries in main Makefile
Volker Grabsch <vog@notjusthosting.com>
parents:
2368
diff
changeset
|
11 SHELL := bash |
2380
f89dd4c9e49f
Portability fix: Define $(PWD) before $(SHELL)
Volker Grabsch <vog@notjusthosting.com>
parents:
2379
diff
changeset
|
12 |
2369
4f5f4af84b12
Improve order of entries in main Makefile
Volker Grabsch <vog@notjusthosting.com>
parents:
2368
diff
changeset
|
13 INSTALL := $(shell ginstall --help >/dev/null 2>&1 && echo g)install |
4f5f4af84b12
Improve order of entries in main Makefile
Volker Grabsch <vog@notjusthosting.com>
parents:
2368
diff
changeset
|
14 LIBTOOL := $(shell glibtool --help >/dev/null 2>&1 && echo g)libtool |
4f5f4af84b12
Improve order of entries in main Makefile
Volker Grabsch <vog@notjusthosting.com>
parents:
2368
diff
changeset
|
15 LIBTOOLIZE := $(shell glibtoolize --help >/dev/null 2>&1 && echo g)libtoolize |
4f5f4af84b12
Improve order of entries in main Makefile
Volker Grabsch <vog@notjusthosting.com>
parents:
2368
diff
changeset
|
16 PATCH := $(shell gpatch --help >/dev/null 2>&1 && echo g)patch |
4f5f4af84b12
Improve order of entries in main Makefile
Volker Grabsch <vog@notjusthosting.com>
parents:
2368
diff
changeset
|
17 SED := $(shell gsed --help >/dev/null 2>&1 && echo g)sed |
2524
422cb29ca669
Makefile: add wget portability variable - $(WGET)
Tony Theodore <tonyt@logyst.com>
parents:
2500
diff
changeset
|
18 WGET := wget --no-check-certificate \ |
422cb29ca669
Makefile: add wget portability variable - $(WGET)
Tony Theodore <tonyt@logyst.com>
parents:
2500
diff
changeset
|
19 --user-agent=$(shell wget --version | \ |
422cb29ca669
Makefile: add wget portability variable - $(WGET)
Tony Theodore <tonyt@logyst.com>
parents:
2500
diff
changeset
|
20 $(SED) -n 's,GNU \(Wget\) \([0-9.]*\).*,\1/\2,p') |
2369
4f5f4af84b12
Improve order of entries in main Makefile
Volker Grabsch <vog@notjusthosting.com>
parents:
2368
diff
changeset
|
21 |
4f5f4af84b12
Improve order of entries in main Makefile
Volker Grabsch <vog@notjusthosting.com>
parents:
2368
diff
changeset
|
22 REQUIREMENTS := autoconf automake bash bison bzip2 cmake flex \ |
4f5f4af84b12
Improve order of entries in main Makefile
Volker Grabsch <vog@notjusthosting.com>
parents:
2368
diff
changeset
|
23 gcc intltoolize $(LIBTOOL) $(LIBTOOLIZE) \ |
4f5f4af84b12
Improve order of entries in main Makefile
Volker Grabsch <vog@notjusthosting.com>
parents:
2368
diff
changeset
|
24 $(MAKE) openssl $(PATCH) $(PERL) pkg-config \ |
4f5f4af84b12
Improve order of entries in main Makefile
Volker Grabsch <vog@notjusthosting.com>
parents:
2368
diff
changeset
|
25 scons $(SED) unzip wget xz yasm |
4f5f4af84b12
Improve order of entries in main Makefile
Volker Grabsch <vog@notjusthosting.com>
parents:
2368
diff
changeset
|
26 |
704
93f1be1d2089
use glibtoolize instead of libtoolize where appropriate (by Tony Theodore)
Volker Grabsch <vog@notjusthosting.com>
parents:
699
diff
changeset
|
27 PREFIX := $(PWD)/usr |
93f1be1d2089
use glibtoolize instead of libtoolize where appropriate (by Tony Theodore)
Volker Grabsch <vog@notjusthosting.com>
parents:
699
diff
changeset
|
28 LOG_DIR := $(PWD)/log |
93f1be1d2089
use glibtoolize instead of libtoolize where appropriate (by Tony Theodore)
Volker Grabsch <vog@notjusthosting.com>
parents:
699
diff
changeset
|
29 TIMESTAMP := $(shell date +%Y%m%d_%H%M%S) |
93f1be1d2089
use glibtoolize instead of libtoolize where appropriate (by Tony Theodore)
Volker Grabsch <vog@notjusthosting.com>
parents:
699
diff
changeset
|
30 PKG_DIR := $(PWD)/pkg |
93f1be1d2089
use glibtoolize instead of libtoolize where appropriate (by Tony Theodore)
Volker Grabsch <vog@notjusthosting.com>
parents:
699
diff
changeset
|
31 TMP_DIR = $(PWD)/tmp-$(1) |
93f1be1d2089
use glibtoolize instead of libtoolize where appropriate (by Tony Theodore)
Volker Grabsch <vog@notjusthosting.com>
parents:
699
diff
changeset
|
32 MAKEFILE := $(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST)) |
93f1be1d2089
use glibtoolize instead of libtoolize where appropriate (by Tony Theodore)
Volker Grabsch <vog@notjusthosting.com>
parents:
699
diff
changeset
|
33 TOP_DIR := $(patsubst %/,%,$(dir $(MAKEFILE))) |
2762 | 34 PKGS := $(shell $(SED) -n 's/^.* id="\([^"]*\)-package">.*$$/\1/p' '$(TOP_DIR)/index.html') |
704
93f1be1d2089
use glibtoolize instead of libtoolize where appropriate (by Tony Theodore)
Volker Grabsch <vog@notjusthosting.com>
parents:
699
diff
changeset
|
35 PATH := $(PREFIX)/bin:$(PATH) |
1398
c6aaf7d9c746
check most of the requirements in advance
Volker Grabsch <vog@notjusthosting.com>
parents:
1397
diff
changeset
|
36 |
2333
f653602a0500
Rebrand to new project name MXE
Volker Grabsch <vog@notjusthosting.com>
parents:
2330
diff
changeset
|
37 CMAKE_TOOLCHAIN_FILE := $(PREFIX)/$(TARGET)/share/cmake/mxe-conf.cmake |
1663
9577f70222f8
add cmake toolchain file and simplify build rules of relevant packages
Tony Theodore <tonyt@logyst.com>
parents:
1555
diff
changeset
|
38 |
1074
4f4354ddd6ae
really unexport the troublesome environment variables, rather than just setting them to empty strings
Volker Grabsch <vog@notjusthosting.com>
parents:
826
diff
changeset
|
39 # unexport any environment variables that might cause trouble |
1206
686a80e66ce1
add more environment variables to the blacklist: CPATH C_INCLUDE_PATH CPLUS_INCLUDE_PATH OBJC_INCLUDE_PATH LIBRARY_PATH
Volker Grabsch <vog@notjusthosting.com>
parents:
1201
diff
changeset
|
40 unexport AR CC CFLAGS C_INCLUDE_PATH CPATH CPLUS_INCLUDE_PATH CPP |
686a80e66ce1
add more environment variables to the blacklist: CPATH C_INCLUDE_PATH CPLUS_INCLUDE_PATH OBJC_INCLUDE_PATH LIBRARY_PATH
Volker Grabsch <vog@notjusthosting.com>
parents:
1201
diff
changeset
|
41 unexport CPPFLAGS CROSS CXX CXXCPP CXXFLAGS EXEEXT EXTRA_CFLAGS |
686a80e66ce1
add more environment variables to the blacklist: CPATH C_INCLUDE_PATH CPLUS_INCLUDE_PATH OBJC_INCLUDE_PATH LIBRARY_PATH
Volker Grabsch <vog@notjusthosting.com>
parents:
1201
diff
changeset
|
42 unexport EXTRA_LDFLAGS LD LDFLAGS LIBRARY_PATH LIBS NM |
1504
dfa937baa17b
improved pkg-config wrapper and its documentation
Volker Grabsch <vog@notjusthosting.com>
parents:
1466
diff
changeset
|
43 unexport OBJC_INCLUDE_PATH PKG_CONFIG QMAKESPEC RANLIB STRIP |
287
92ac81dea92d
bugfix: unset any environment variables which might cause trouble
Volker Grabsch <vog@notjusthosting.com>
parents:
285
diff
changeset
|
44 |
264
01aa6a0e1c9e
new macro SHORT_PKG_VERSION which assists in creating download URLs
Volker Grabsch <vog@notjusthosting.com>
parents:
259
diff
changeset
|
45 SHORT_PKG_VERSION = \ |
01aa6a0e1c9e
new macro SHORT_PKG_VERSION which assists in creating download URLs
Volker Grabsch <vog@notjusthosting.com>
parents:
259
diff
changeset
|
46 $(word 1,$(subst ., ,$($(1)_VERSION))).$(word 2,$(subst ., ,$($(1)_VERSION))) |
01aa6a0e1c9e
new macro SHORT_PKG_VERSION which assists in creating download URLs
Volker Grabsch <vog@notjusthosting.com>
parents:
259
diff
changeset
|
47 |
120
4edf6a519683
improved coding style
Volker Grabsch <vog@notjusthosting.com>
parents:
119
diff
changeset
|
48 UNPACK_ARCHIVE = \ |
1101
28abe875c217
improved coding style
Volker Grabsch <vog@notjusthosting.com>
parents:
1095
diff
changeset
|
49 $(if $(filter %.tgz, $(1)),tar xzf '$(1)', \ |
28abe875c217
improved coding style
Volker Grabsch <vog@notjusthosting.com>
parents:
1095
diff
changeset
|
50 $(if $(filter %.tar.gz, $(1)),tar xzf '$(1)', \ |
28abe875c217
improved coding style
Volker Grabsch <vog@notjusthosting.com>
parents:
1095
diff
changeset
|
51 $(if $(filter %.tar.bz2, $(1)),tar xjf '$(1)', \ |
1136
cf87e39ecc2c
improved portability invoking tar with stdin
Mark Brand <mabrand@mabrand.nl>
parents:
1132
diff
changeset
|
52 $(if $(filter %.tar.lzma,$(1)),xz -dc -F lzma '$(1)' | tar xf -, \ |
1555 | 53 $(if $(filter %.tar.xz,$(1)),xz -dc '$(1)' | tar xf -, \ |
1101
28abe875c217
improved coding style
Volker Grabsch <vog@notjusthosting.com>
parents:
1095
diff
changeset
|
54 $(if $(filter %.zip, $(1)),unzip -q '$(1)', \ |
1555 | 55 $(error Unknown archive format: $(1)))))))) |
114
771b6c26008d
completely rewritten from scratch as Makefile
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
56 |
215
898425550c29
new macro UNPACK_PKG_ARCHIVE for build rules (This is useful in connection with download-only packages)
Volker Grabsch <vog@notjusthosting.com>
parents:
214
diff
changeset
|
57 UNPACK_PKG_ARCHIVE = \ |
898425550c29
new macro UNPACK_PKG_ARCHIVE for build rules (This is useful in connection with download-only packages)
Volker Grabsch <vog@notjusthosting.com>
parents:
214
diff
changeset
|
58 $(call UNPACK_ARCHIVE,$(PKG_DIR)/$($(1)_FILE)) |
898425550c29
new macro UNPACK_PKG_ARCHIVE for build rules (This is useful in connection with download-only packages)
Volker Grabsch <vog@notjusthosting.com>
parents:
214
diff
changeset
|
59 |
306
85ffa9259036
validate downloads using SHA-1 checksums
Volker Grabsch <vog@notjusthosting.com>
parents:
305
diff
changeset
|
60 PKG_CHECKSUM = \ |
473
b0cc6cc3c1fc
improved status output
Volker Grabsch <vog@notjusthosting.com>
parents:
461
diff
changeset
|
61 openssl sha1 '$(PKG_DIR)/$($(1)_FILE)' 2>/dev/null | $(SED) -n 's,^.*\([0-9a-f]\{40\}\)$$,\1,p' |
306
85ffa9259036
validate downloads using SHA-1 checksums
Volker Grabsch <vog@notjusthosting.com>
parents:
305
diff
changeset
|
62 |
85ffa9259036
validate downloads using SHA-1 checksums
Volker Grabsch <vog@notjusthosting.com>
parents:
305
diff
changeset
|
63 CHECK_PKG_ARCHIVE = \ |
311
ce0d27e7993f
use "openssl sha1 ..." instead of "sha1sum -b ..."
Volker Grabsch <vog@notjusthosting.com>
parents:
310
diff
changeset
|
64 [ '$($(1)_CHECKSUM)' == "`$$(call PKG_CHECKSUM,$(1))`" ] |
306
85ffa9259036
validate downloads using SHA-1 checksums
Volker Grabsch <vog@notjusthosting.com>
parents:
305
diff
changeset
|
65 |
85ffa9259036
validate downloads using SHA-1 checksums
Volker Grabsch <vog@notjusthosting.com>
parents:
305
diff
changeset
|
66 DOWNLOAD_PKG_ARCHIVE = \ |
1159
782fbc148784
improved coding style
Volker Grabsch <vog@notjusthosting.com>
parents:
1136
diff
changeset
|
67 mkdir -p '$(PKG_DIR)' && \ |
306
85ffa9259036
validate downloads using SHA-1 checksums
Volker Grabsch <vog@notjusthosting.com>
parents:
305
diff
changeset
|
68 $(if $($(1)_URL_2), \ |
2730 | 69 ( $(WGET) -T 30 -t 3 -O- '$($(1)_URL)' || \ |
70 $(WGET) -O- '$($(1)_URL_2)' || \ | |
71 $(WGET) -O- '$(PKG_MIRROR)/$($(1)_FILE)' || \ | |
72 $(WGET) -O- '$(PKG_CDN)/$($(1)_FILE)' ), \ | |
73 ( $(WGET) -O- '$($(1)_URL)' || \ | |
74 $(WGET) -O- '$(PKG_MIRROR)/$($(1)_FILE)' || \ | |
75 $(WGET) -O- '$(PKG_CDN)/$($(1)_FILE)' )) \ | |
1438
698e4de6d9a6
implemented $(PKG)_FIX_GZIP for GitWeb snapshots and similar issues
Volker Grabsch <vog@notjusthosting.com>
parents:
1437
diff
changeset
|
76 $(if $($(1)_FIX_GZIP), \ |
698e4de6d9a6
implemented $(PKG)_FIX_GZIP for GitWeb snapshots and similar issues
Volker Grabsch <vog@notjusthosting.com>
parents:
1437
diff
changeset
|
77 | gzip -d | gzip -9n, \ |
698e4de6d9a6
implemented $(PKG)_FIX_GZIP for GitWeb snapshots and similar issues
Volker Grabsch <vog@notjusthosting.com>
parents:
1437
diff
changeset
|
78 ) \ |
2729
6c492e126140
cleanup after failed download
Tony Theodore <tonyt@logyst.com>
parents:
2728
diff
changeset
|
79 > '$(PKG_DIR)/$($(1)_FILE)' || rm -f '$(PKG_DIR)/$($(1)_FILE)' |
306
85ffa9259036
validate downloads using SHA-1 checksums
Volker Grabsch <vog@notjusthosting.com>
parents:
305
diff
changeset
|
80 |
2500
8db5a297f243
Add support for a local settings file settings.mk
Volker Grabsch <vog@notjusthosting.com>
parents:
2475
diff
changeset
|
81 ifeq ($(IGNORE_SETTINGS),yes) |
8db5a297f243
Add support for a local settings file settings.mk
Volker Grabsch <vog@notjusthosting.com>
parents:
2475
diff
changeset
|
82 $(info [ignore settings.mk]) |
8db5a297f243
Add support for a local settings file settings.mk
Volker Grabsch <vog@notjusthosting.com>
parents:
2475
diff
changeset
|
83 else ifeq ($(wildcard $(PWD)/settings.mk),$(PWD)/settings.mk) |
8db5a297f243
Add support for a local settings file settings.mk
Volker Grabsch <vog@notjusthosting.com>
parents:
2475
diff
changeset
|
84 include $(PWD)/settings.mk |
8db5a297f243
Add support for a local settings file settings.mk
Volker Grabsch <vog@notjusthosting.com>
parents:
2475
diff
changeset
|
85 else |
8db5a297f243
Add support for a local settings file settings.mk
Volker Grabsch <vog@notjusthosting.com>
parents:
2475
diff
changeset
|
86 $(info [create settings.mk]) |
8db5a297f243
Add support for a local settings file settings.mk
Volker Grabsch <vog@notjusthosting.com>
parents:
2475
diff
changeset
|
87 $(shell { \ |
8db5a297f243
Add support for a local settings file settings.mk
Volker Grabsch <vog@notjusthosting.com>
parents:
2475
diff
changeset
|
88 echo '#JOBS = $(JOBS)'; \ |
8db5a297f243
Add support for a local settings file settings.mk
Volker Grabsch <vog@notjusthosting.com>
parents:
2475
diff
changeset
|
89 echo '#PKGS ='; \ |
8db5a297f243
Add support for a local settings file settings.mk
Volker Grabsch <vog@notjusthosting.com>
parents:
2475
diff
changeset
|
90 } >'$(PWD)/settings.mk') |
8db5a297f243
Add support for a local settings file settings.mk
Volker Grabsch <vog@notjusthosting.com>
parents:
2475
diff
changeset
|
91 endif |
8db5a297f243
Add support for a local settings file settings.mk
Volker Grabsch <vog@notjusthosting.com>
parents:
2475
diff
changeset
|
92 |
114
771b6c26008d
completely rewritten from scratch as Makefile
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
93 .PHONY: all |
403
825505ea3855
improved variable naming in the Makefile
Volker Grabsch <vog@notjusthosting.com>
parents:
401
diff
changeset
|
94 all: $(PKGS) |
114
771b6c26008d
completely rewritten from scratch as Makefile
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
95 |
1398
c6aaf7d9c746
check most of the requirements in advance
Volker Grabsch <vog@notjusthosting.com>
parents:
1397
diff
changeset
|
96 .PHONY: check-requirements |
c6aaf7d9c746
check most of the requirements in advance
Volker Grabsch <vog@notjusthosting.com>
parents:
1397
diff
changeset
|
97 define CHECK_REQUIREMENT |
c6aaf7d9c746
check most of the requirements in advance
Volker Grabsch <vog@notjusthosting.com>
parents:
1397
diff
changeset
|
98 @if ! $(1) --help &>/dev/null; then \ |
c6aaf7d9c746
check most of the requirements in advance
Volker Grabsch <vog@notjusthosting.com>
parents:
1397
diff
changeset
|
99 echo; \ |
c6aaf7d9c746
check most of the requirements in advance
Volker Grabsch <vog@notjusthosting.com>
parents:
1397
diff
changeset
|
100 echo 'Missing requirement: $(1)'; \ |
c6aaf7d9c746
check most of the requirements in advance
Volker Grabsch <vog@notjusthosting.com>
parents:
1397
diff
changeset
|
101 echo; \ |
2353
99516e73b368
Move doc/index.html -> index.html
Volker Grabsch <vog@notjusthosting.com>
parents:
2350
diff
changeset
|
102 echo 'Please have a look at "index.html" to ensure'; \ |
1398
c6aaf7d9c746
check most of the requirements in advance
Volker Grabsch <vog@notjusthosting.com>
parents:
1397
diff
changeset
|
103 echo 'that your system meets all requirements.'; \ |
c6aaf7d9c746
check most of the requirements in advance
Volker Grabsch <vog@notjusthosting.com>
parents:
1397
diff
changeset
|
104 echo; \ |
c6aaf7d9c746
check most of the requirements in advance
Volker Grabsch <vog@notjusthosting.com>
parents:
1397
diff
changeset
|
105 exit 1; \ |
c6aaf7d9c746
check most of the requirements in advance
Volker Grabsch <vog@notjusthosting.com>
parents:
1397
diff
changeset
|
106 fi |
c6aaf7d9c746
check most of the requirements in advance
Volker Grabsch <vog@notjusthosting.com>
parents:
1397
diff
changeset
|
107 |
c6aaf7d9c746
check most of the requirements in advance
Volker Grabsch <vog@notjusthosting.com>
parents:
1397
diff
changeset
|
108 endef |
2287
e9eed43704a2
Check for required versions of Autoconf and Automake
Volker Grabsch <vog@notjusthosting.com>
parents:
2153
diff
changeset
|
109 define CHECK_REQUIREMENT_VERSION |
e9eed43704a2
Check for required versions of Autoconf and Automake
Volker Grabsch <vog@notjusthosting.com>
parents:
2153
diff
changeset
|
110 @if ! $(1) --version | head -1 | grep ' \($(2)\)$$' >/dev/null; then \ |
e9eed43704a2
Check for required versions of Autoconf and Automake
Volker Grabsch <vog@notjusthosting.com>
parents:
2153
diff
changeset
|
111 echo; \ |
e9eed43704a2
Check for required versions of Autoconf and Automake
Volker Grabsch <vog@notjusthosting.com>
parents:
2153
diff
changeset
|
112 echo 'Wrong version of requirement: $(1)'; \ |
e9eed43704a2
Check for required versions of Autoconf and Automake
Volker Grabsch <vog@notjusthosting.com>
parents:
2153
diff
changeset
|
113 echo; \ |
2353
99516e73b368
Move doc/index.html -> index.html
Volker Grabsch <vog@notjusthosting.com>
parents:
2350
diff
changeset
|
114 echo 'Please have a look at "index.html" to ensure'; \ |
2287
e9eed43704a2
Check for required versions of Autoconf and Automake
Volker Grabsch <vog@notjusthosting.com>
parents:
2153
diff
changeset
|
115 echo 'that your system meets all requirements.'; \ |
e9eed43704a2
Check for required versions of Autoconf and Automake
Volker Grabsch <vog@notjusthosting.com>
parents:
2153
diff
changeset
|
116 echo; \ |
e9eed43704a2
Check for required versions of Autoconf and Automake
Volker Grabsch <vog@notjusthosting.com>
parents:
2153
diff
changeset
|
117 exit 1; \ |
e9eed43704a2
Check for required versions of Autoconf and Automake
Volker Grabsch <vog@notjusthosting.com>
parents:
2153
diff
changeset
|
118 fi |
e9eed43704a2
Check for required versions of Autoconf and Automake
Volker Grabsch <vog@notjusthosting.com>
parents:
2153
diff
changeset
|
119 |
e9eed43704a2
Check for required versions of Autoconf and Automake
Volker Grabsch <vog@notjusthosting.com>
parents:
2153
diff
changeset
|
120 endef |
1403
90d846d2b3c9
check requirements only at the first time and after each change to the main Makefile (which possibly changed the list of requirements)
Volker Grabsch <vog@notjusthosting.com>
parents:
1399
diff
changeset
|
121 check-requirements: $(PREFIX)/installed/check-requirements |
90d846d2b3c9
check requirements only at the first time and after each change to the main Makefile (which possibly changed the list of requirements)
Volker Grabsch <vog@notjusthosting.com>
parents:
1399
diff
changeset
|
122 $(PREFIX)/installed/check-requirements: $(MAKEFILE) |
1398
c6aaf7d9c746
check most of the requirements in advance
Volker Grabsch <vog@notjusthosting.com>
parents:
1397
diff
changeset
|
123 @echo '[check requirements]' |
c6aaf7d9c746
check most of the requirements in advance
Volker Grabsch <vog@notjusthosting.com>
parents:
1397
diff
changeset
|
124 $(foreach REQUIREMENT,$(REQUIREMENTS),$(call CHECK_REQUIREMENT,$(REQUIREMENT))) |
2287
e9eed43704a2
Check for required versions of Autoconf and Automake
Volker Grabsch <vog@notjusthosting.com>
parents:
2153
diff
changeset
|
125 $(call CHECK_REQUIREMENT_VERSION,autoconf,2\.6[4-9]\|2\.[7-9][0-9]) |
2475
9e60296cb20d
Bugfix in "make check-requirements" to work with Automake 1.12
Volker Grabsch <vog@notjusthosting.com>
parents:
2411
diff
changeset
|
126 $(call CHECK_REQUIREMENT_VERSION,automake,1\.[1-9][0-9]\(\.[0-9]\+\)\?) |
1403
90d846d2b3c9
check requirements only at the first time and after each change to the main Makefile (which possibly changed the list of requirements)
Volker Grabsch <vog@notjusthosting.com>
parents:
1399
diff
changeset
|
127 @[ -d '$(PREFIX)/installed' ] || mkdir -p '$(PREFIX)/installed' |
90d846d2b3c9
check requirements only at the first time and after each change to the main Makefile (which possibly changed the list of requirements)
Volker Grabsch <vog@notjusthosting.com>
parents:
1399
diff
changeset
|
128 @touch '$@' |
1398
c6aaf7d9c746
check most of the requirements in advance
Volker Grabsch <vog@notjusthosting.com>
parents:
1397
diff
changeset
|
129 |
2350
2691d175df4e
Improve performance of loading main Makefile
Volker Grabsch <vog@notjusthosting.com>
parents:
2349
diff
changeset
|
130 define newline |
2691d175df4e
Improve performance of loading main Makefile
Volker Grabsch <vog@notjusthosting.com>
parents:
2349
diff
changeset
|
131 |
2691d175df4e
Improve performance of loading main Makefile
Volker Grabsch <vog@notjusthosting.com>
parents:
2349
diff
changeset
|
132 |
2349
f48c5b085a38
Move $(PKG)_VERSION and $(PKG)_WEBSITE from src/*.mk into doc/index.html
Volker Grabsch <vog@notjusthosting.com>
parents:
2348
diff
changeset
|
133 endef |
2350
2691d175df4e
Improve performance of loading main Makefile
Volker Grabsch <vog@notjusthosting.com>
parents:
2349
diff
changeset
|
134 $(eval $(subst #,$(newline),$(shell \ |
2691d175df4e
Improve performance of loading main Makefile
Volker Grabsch <vog@notjusthosting.com>
parents:
2349
diff
changeset
|
135 $(SED) -n \ |
2359
1726cefccf0c
Fix trailing space after version number
Volker Grabsch <vog@notjusthosting.com>
parents:
2357
diff
changeset
|
136 's/^.* id="\([A-Za-z0-9_+-]*\)-version">\([^<]*\)<.*$$/\1_VERSION := \2#/p' \ |
2353
99516e73b368
Move doc/index.html -> index.html
Volker Grabsch <vog@notjusthosting.com>
parents:
2350
diff
changeset
|
137 '$(TOP_DIR)/index.html' \ |
2350
2691d175df4e
Improve performance of loading main Makefile
Volker Grabsch <vog@notjusthosting.com>
parents:
2349
diff
changeset
|
138 ))) |
2349
f48c5b085a38
Move $(PKG)_VERSION and $(PKG)_WEBSITE from src/*.mk into doc/index.html
Volker Grabsch <vog@notjusthosting.com>
parents:
2348
diff
changeset
|
139 |
2375
2023ebb23822
Load only *.mk files of packages mentioned in index.html
Volker Grabsch <vog@notjusthosting.com>
parents:
2370
diff
changeset
|
140 include $(patsubst %,$(TOP_DIR)/src/%.mk,$(PKGS)) |
2346
8746e2f1c758
Improve coding style
Volker Grabsch <vog@notjusthosting.com>
parents:
2345
diff
changeset
|
141 |
394
bb2b329f85d3
new command "make download"
Volker Grabsch <vog@notjusthosting.com>
parents:
392
diff
changeset
|
142 .PHONY: download |
403
825505ea3855
improved variable naming in the Makefile
Volker Grabsch <vog@notjusthosting.com>
parents:
401
diff
changeset
|
143 download: $(addprefix download-,$(PKGS)) |
394
bb2b329f85d3
new command "make download"
Volker Grabsch <vog@notjusthosting.com>
parents:
392
diff
changeset
|
144 |
114
771b6c26008d
completely rewritten from scratch as Makefile
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
145 define PKG_RULE |
394
bb2b329f85d3
new command "make download"
Volker Grabsch <vog@notjusthosting.com>
parents:
392
diff
changeset
|
146 .PHONY: download-$(1) |
429
2fa394d22e1d
bugfix and simplification of "make download"
Volker Grabsch <vog@notjusthosting.com>
parents:
428
diff
changeset
|
147 download-$(1): $(addprefix download-,$($(1)_DEPS)) |
310
5c5e254fa32b
bugfix in handling checksums
Volker Grabsch <vog@notjusthosting.com>
parents:
306
diff
changeset
|
148 if ! $(call CHECK_PKG_ARCHIVE,$(1)); then \ |
5c5e254fa32b
bugfix in handling checksums
Volker Grabsch <vog@notjusthosting.com>
parents:
306
diff
changeset
|
149 $(call DOWNLOAD_PKG_ARCHIVE,$(1)); \ |
5c5e254fa32b
bugfix in handling checksums
Volker Grabsch <vog@notjusthosting.com>
parents:
306
diff
changeset
|
150 $(call CHECK_PKG_ARCHIVE,$(1)) || { echo 'Wrong checksum!'; exit 1; }; \ |
430
5d2c64680021
improved coding style
Volker Grabsch <vog@notjusthosting.com>
parents:
429
diff
changeset
|
151 fi |
394
bb2b329f85d3
new command "make download"
Volker Grabsch <vog@notjusthosting.com>
parents:
392
diff
changeset
|
152 |
bb2b329f85d3
new command "make download"
Volker Grabsch <vog@notjusthosting.com>
parents:
392
diff
changeset
|
153 .PHONY: $(1) |
593
e3fa9c5468a5
put installation markers into a separate sub directory usr/installed/
Volker Grabsch <vog@notjusthosting.com>
parents:
592
diff
changeset
|
154 $(1): $(PREFIX)/installed/$(1) |
1399
6b28a4f27b8c
bugfix in the integration of "make check-requirements"
Volker Grabsch <vog@notjusthosting.com>
parents:
1398
diff
changeset
|
155 $(PREFIX)/installed/$(1): $(TOP_DIR)/src/$(1).mk \ |
394
bb2b329f85d3
new command "make download"
Volker Grabsch <vog@notjusthosting.com>
parents:
392
diff
changeset
|
156 $(wildcard $(TOP_DIR)/src/$(1)-*.patch) \ |
778
f8c2ff4cf740
bugfix: add test scripts as dependency files, and put them into the distribution tarball
Volker Grabsch <vog@notjusthosting.com>
parents:
738
diff
changeset
|
157 $(wildcard $(TOP_DIR)/src/$(1)-test*) \ |
1399
6b28a4f27b8c
bugfix in the integration of "make check-requirements"
Volker Grabsch <vog@notjusthosting.com>
parents:
1398
diff
changeset
|
158 $(addprefix $(PREFIX)/installed/,$($(1)_DEPS)) \ |
6b28a4f27b8c
bugfix in the integration of "make check-requirements"
Volker Grabsch <vog@notjusthosting.com>
parents:
1398
diff
changeset
|
159 | check-requirements |
604
95aeaeacaf9c
improved layout of the log/ directory
Volker Grabsch <vog@notjusthosting.com>
parents:
596
diff
changeset
|
160 @[ -d '$(LOG_DIR)/$(TIMESTAMP)' ] || mkdir -p '$(LOG_DIR)/$(TIMESTAMP)' |
431
e77981de8c92
highlevel output of the download/build process, put also download actions into the log file
Volker Grabsch <vog@notjusthosting.com>
parents:
430
diff
changeset
|
161 @if ! $(call CHECK_PKG_ARCHIVE,$(1)); then \ |
e77981de8c92
highlevel output of the download/build process, put also download actions into the log file
Volker Grabsch <vog@notjusthosting.com>
parents:
430
diff
changeset
|
162 echo '[download] $(1)'; \ |
1396
296b81e392cf
portability fix for MSYS
Volker Grabsch <vog@notjusthosting.com>
parents:
1296
diff
changeset
|
163 ($(call DOWNLOAD_PKG_ARCHIVE,$(1))) &> '$(LOG_DIR)/$(TIMESTAMP)/$(1)-download'; \ |
1397
b33871ee26a3
improved coding style: make use of the "-f" option of "ln"
Volker Grabsch <vog@notjusthosting.com>
parents:
1396
diff
changeset
|
164 ln -sf '$(TIMESTAMP)/$(1)-download' '$(LOG_DIR)/$(1)-download'; \ |
431
e77981de8c92
highlevel output of the download/build process, put also download actions into the log file
Volker Grabsch <vog@notjusthosting.com>
parents:
430
diff
changeset
|
165 if ! $(call CHECK_PKG_ARCHIVE,$(1)); then \ |
e77981de8c92
highlevel output of the download/build process, put also download actions into the log file
Volker Grabsch <vog@notjusthosting.com>
parents:
430
diff
changeset
|
166 echo; \ |
e77981de8c92
highlevel output of the download/build process, put also download actions into the log file
Volker Grabsch <vog@notjusthosting.com>
parents:
430
diff
changeset
|
167 echo 'Wrong checksum of package $(1)!'; \ |
e77981de8c92
highlevel output of the download/build process, put also download actions into the log file
Volker Grabsch <vog@notjusthosting.com>
parents:
430
diff
changeset
|
168 echo '------------------------------------------------------------'; \ |
595
f4b50cf506c6
keep separate download logs in log/PKG-download
Volker Grabsch <vog@notjusthosting.com>
parents:
594
diff
changeset
|
169 tail -n 10 '$(LOG_DIR)/$(1)-download' | $(SED) -n '/./p'; \ |
431
e77981de8c92
highlevel output of the download/build process, put also download actions into the log file
Volker Grabsch <vog@notjusthosting.com>
parents:
430
diff
changeset
|
170 echo '------------------------------------------------------------'; \ |
595
f4b50cf506c6
keep separate download logs in log/PKG-download
Volker Grabsch <vog@notjusthosting.com>
parents:
594
diff
changeset
|
171 echo '[log] $(LOG_DIR)/$(1)-download'; \ |
431
e77981de8c92
highlevel output of the download/build process, put also download actions into the log file
Volker Grabsch <vog@notjusthosting.com>
parents:
430
diff
changeset
|
172 echo; \ |
e77981de8c92
highlevel output of the download/build process, put also download actions into the log file
Volker Grabsch <vog@notjusthosting.com>
parents:
430
diff
changeset
|
173 exit 1; \ |
e77981de8c92
highlevel output of the download/build process, put also download actions into the log file
Volker Grabsch <vog@notjusthosting.com>
parents:
430
diff
changeset
|
174 fi; \ |
430
5d2c64680021
improved coding style
Volker Grabsch <vog@notjusthosting.com>
parents:
429
diff
changeset
|
175 fi |
434
7fdb6628d83a
improved output: don't show "[build]" for download-only packages
Volker Grabsch <vog@notjusthosting.com>
parents:
431
diff
changeset
|
176 $(if $(value $(1)_BUILD), |
7fdb6628d83a
improved output: don't show "[build]" for download-only packages
Volker Grabsch <vog@notjusthosting.com>
parents:
431
diff
changeset
|
177 @echo '[build] $(1)' |
7fdb6628d83a
improved output: don't show "[build]" for download-only packages
Volker Grabsch <vog@notjusthosting.com>
parents:
431
diff
changeset
|
178 ,) |
1396
296b81e392cf
portability fix for MSYS
Volker Grabsch <vog@notjusthosting.com>
parents:
1296
diff
changeset
|
179 @touch '$(LOG_DIR)/$(TIMESTAMP)/$(1)' |
1397
b33871ee26a3
improved coding style: make use of the "-f" option of "ln"
Volker Grabsch <vog@notjusthosting.com>
parents:
1396
diff
changeset
|
180 @ln -sf '$(TIMESTAMP)/$(1)' '$(LOG_DIR)/$(1)' |
1396
296b81e392cf
portability fix for MSYS
Volker Grabsch <vog@notjusthosting.com>
parents:
1296
diff
changeset
|
181 @if ! (time $(MAKE) -f '$(MAKEFILE)' 'build-only-$(1)') &> '$(LOG_DIR)/$(TIMESTAMP)/$(1)'; then \ |
431
e77981de8c92
highlevel output of the download/build process, put also download actions into the log file
Volker Grabsch <vog@notjusthosting.com>
parents:
430
diff
changeset
|
182 echo; \ |
e77981de8c92
highlevel output of the download/build process, put also download actions into the log file
Volker Grabsch <vog@notjusthosting.com>
parents:
430
diff
changeset
|
183 echo 'Failed to build package $(1)!'; \ |
e77981de8c92
highlevel output of the download/build process, put also download actions into the log file
Volker Grabsch <vog@notjusthosting.com>
parents:
430
diff
changeset
|
184 echo '------------------------------------------------------------'; \ |
594
2a325441b1ab
put log files into a separate sub directory log/, separate from usr/, surviving a "make clean"
Volker Grabsch <vog@notjusthosting.com>
parents:
593
diff
changeset
|
185 tail -n 10 '$(LOG_DIR)/$(1)' | $(SED) -n '/./p'; \ |
431
e77981de8c92
highlevel output of the download/build process, put also download actions into the log file
Volker Grabsch <vog@notjusthosting.com>
parents:
430
diff
changeset
|
186 echo '------------------------------------------------------------'; \ |
594
2a325441b1ab
put log files into a separate sub directory log/, separate from usr/, surviving a "make clean"
Volker Grabsch <vog@notjusthosting.com>
parents:
593
diff
changeset
|
187 echo '[log] $(LOG_DIR)/$(1)'; \ |
431
e77981de8c92
highlevel output of the download/build process, put also download actions into the log file
Volker Grabsch <vog@notjusthosting.com>
parents:
430
diff
changeset
|
188 echo; \ |
e77981de8c92
highlevel output of the download/build process, put also download actions into the log file
Volker Grabsch <vog@notjusthosting.com>
parents:
430
diff
changeset
|
189 exit 1; \ |
e77981de8c92
highlevel output of the download/build process, put also download actions into the log file
Volker Grabsch <vog@notjusthosting.com>
parents:
430
diff
changeset
|
190 fi |
435
80c86e6f7ca6
improved coding style
Volker Grabsch <vog@notjusthosting.com>
parents:
434
diff
changeset
|
191 @echo '[done] $(1)' |
428
951e2a6d1e69
create a separate build log file "usr/log-PKG" for each package build
Volker Grabsch <vog@notjusthosting.com>
parents:
427
diff
changeset
|
192 |
951e2a6d1e69
create a separate build log file "usr/log-PKG" for each package build
Volker Grabsch <vog@notjusthosting.com>
parents:
427
diff
changeset
|
193 .PHONY: build-only-$(1) |
951e2a6d1e69
create a separate build log file "usr/log-PKG" for each package build
Volker Grabsch <vog@notjusthosting.com>
parents:
427
diff
changeset
|
194 build-only-$(1): |
214
e1c566cd7a5e
allow packages without a BUILD section (This will be used for download-only packages such as gcc-g++.)
Volker Grabsch <vog@notjusthosting.com>
parents:
213
diff
changeset
|
195 $(if $(value $(1)_BUILD), |
e1c566cd7a5e
allow packages without a BUILD section (This will be used for download-only packages such as gcc-g++.)
Volker Grabsch <vog@notjusthosting.com>
parents:
213
diff
changeset
|
196 rm -rf '$(2)' |
e1c566cd7a5e
allow packages without a BUILD section (This will be used for download-only packages such as gcc-g++.)
Volker Grabsch <vog@notjusthosting.com>
parents:
213
diff
changeset
|
197 mkdir -p '$(2)' |
215
898425550c29
new macro UNPACK_PKG_ARCHIVE for build rules (This is useful in connection with download-only packages)
Volker Grabsch <vog@notjusthosting.com>
parents:
214
diff
changeset
|
198 cd '$(2)' && $(call UNPACK_PKG_ARCHIVE,$(1)) |
214
e1c566cd7a5e
allow packages without a BUILD section (This will be used for download-only packages such as gcc-g++.)
Volker Grabsch <vog@notjusthosting.com>
parents:
213
diff
changeset
|
199 cd '$(2)/$($(1)_SUBDIR)' |
391
8349a6576cac
automatically apply patches "src/PKG-*.patch" which are provided with a "src/PKG.mk" file
Volker Grabsch <vog@notjusthosting.com>
parents:
378
diff
changeset
|
200 $(foreach PKG_PATCH,$(sort $(wildcard $(TOP_DIR)/src/$(1)-*.patch)), |
1132
d4ccfc3cfdd4
bugfix: use GNU Patch under FreeBSD (by Tony Theodore)
Volker Grabsch <vog@notjusthosting.com>
parents:
1101
diff
changeset
|
201 (cd '$(2)/$($(1)_SUBDIR)' && $(PATCH) -p1 -u) < $(PKG_PATCH)) |
657
b1d03b91eb1e
test program for package sdl
Volker Grabsch <vog@notjusthosting.com>
parents:
641
diff
changeset
|
202 $$(call $(1)_BUILD,$(2)/$($(1)_SUBDIR),$(TOP_DIR)/src/$(1)-test) |
1979
9e3cc5c56804
log the total disk usage of the temporary build directory after each successful build
Volker Grabsch <vog@notjusthosting.com>
parents:
1847
diff
changeset
|
203 (du -k -d 0 '$(2)' 2>/dev/null || du -k --max-depth 0 '$(2)') | $(SED) -n 's/^\(\S*\).*/du: \1 KiB/p' |
214
e1c566cd7a5e
allow packages without a BUILD section (This will be used for download-only packages such as gcc-g++.)
Volker Grabsch <vog@notjusthosting.com>
parents:
213
diff
changeset
|
204 rm -rfv '$(2)' |
e1c566cd7a5e
allow packages without a BUILD section (This will be used for download-only packages such as gcc-g++.)
Volker Grabsch <vog@notjusthosting.com>
parents:
213
diff
changeset
|
205 ,) |
593
e3fa9c5468a5
put installation markers into a separate sub directory usr/installed/
Volker Grabsch <vog@notjusthosting.com>
parents:
592
diff
changeset
|
206 [ -d '$(PREFIX)/installed' ] || mkdir -p '$(PREFIX)/installed' |
e3fa9c5468a5
put installation markers into a separate sub directory usr/installed/
Volker Grabsch <vog@notjusthosting.com>
parents:
592
diff
changeset
|
207 touch '$(PREFIX)/installed/$(1)' |
114
771b6c26008d
completely rewritten from scratch as Makefile
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
208 endef |
403
825505ea3855
improved variable naming in the Makefile
Volker Grabsch <vog@notjusthosting.com>
parents:
401
diff
changeset
|
209 $(foreach PKG,$(PKGS),$(eval $(call PKG_RULE,$(PKG),$(call TMP_DIR,$(PKG))))) |
114
771b6c26008d
completely rewritten from scratch as Makefile
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
210 |
119
ff34f15ec142
improved coding style
Volker Grabsch <vog@notjusthosting.com>
parents:
114
diff
changeset
|
211 .PHONY: clean |
ff34f15ec142
improved coding style
Volker Grabsch <vog@notjusthosting.com>
parents:
114
diff
changeset
|
212 clean: |
ff34f15ec142
improved coding style
Volker Grabsch <vog@notjusthosting.com>
parents:
114
diff
changeset
|
213 rm -rf $(call TMP_DIR,*) $(PREFIX)/* |
ff34f15ec142
improved coding style
Volker Grabsch <vog@notjusthosting.com>
parents:
114
diff
changeset
|
214 |
226
c07a36f3ea80
new target "make clean-pkg" to remove all unused package files (handy after a successful "make update")
Volker Grabsch <vog@notjusthosting.com>
parents:
215
diff
changeset
|
215 .PHONY: clean-pkg |
c07a36f3ea80
new target "make clean-pkg" to remove all unused package files (handy after a successful "make update")
Volker Grabsch <vog@notjusthosting.com>
parents:
215
diff
changeset
|
216 clean-pkg: |
c07a36f3ea80
new target "make clean-pkg" to remove all unused package files (handy after a successful "make update")
Volker Grabsch <vog@notjusthosting.com>
parents:
215
diff
changeset
|
217 rm -f $(patsubst %,'%', \ |
c07a36f3ea80
new target "make clean-pkg" to remove all unused package files (handy after a successful "make update")
Volker Grabsch <vog@notjusthosting.com>
parents:
215
diff
changeset
|
218 $(filter-out \ |
403
825505ea3855
improved variable naming in the Makefile
Volker Grabsch <vog@notjusthosting.com>
parents:
401
diff
changeset
|
219 $(foreach PKG,$(PKGS),$(PKG_DIR)/$($(PKG)_FILE)), \ |
226
c07a36f3ea80
new target "make clean-pkg" to remove all unused package files (handy after a successful "make update")
Volker Grabsch <vog@notjusthosting.com>
parents:
215
diff
changeset
|
220 $(wildcard $(PKG_DIR)/*))) |
c07a36f3ea80
new target "make clean-pkg" to remove all unused package files (handy after a successful "make update")
Volker Grabsch <vog@notjusthosting.com>
parents:
215
diff
changeset
|
221 |
119
ff34f15ec142
improved coding style
Volker Grabsch <vog@notjusthosting.com>
parents:
114
diff
changeset
|
222 .PHONY: update |
114
771b6c26008d
completely rewritten from scratch as Makefile
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
223 define UPDATE |
306
85ffa9259036
validate downloads using SHA-1 checksums
Volker Grabsch <vog@notjusthosting.com>
parents:
305
diff
changeset
|
224 $(if $(2), |
448
e9afec55fd6b
improved version recognition, enable the notation of ignored (bad) package versions
Volker Grabsch <vog@notjusthosting.com>
parents:
443
diff
changeset
|
225 $(if $(filter $(2),$($(1)_IGNORE)), |
461
c489fb1015e2
improved output style of "make update" again
Volker Grabsch <vog@notjusthosting.com>
parents:
454
diff
changeset
|
226 $(info IGNORED $(1) $(2)), |
448
e9afec55fd6b
improved version recognition, enable the notation of ignored (bad) package versions
Volker Grabsch <vog@notjusthosting.com>
parents:
443
diff
changeset
|
227 $(if $(filter $(2),$($(1)_VERSION)), |
461
c489fb1015e2
improved output style of "make update" again
Volker Grabsch <vog@notjusthosting.com>
parents:
454
diff
changeset
|
228 $(info . $(1) $(2)), |
477
ffca44340844
improved output of "make update"
Volker Grabsch <vog@notjusthosting.com>
parents:
473
diff
changeset
|
229 $(info NEW $(1) $($(1)_VERSION) --> $(2)) |
2353
99516e73b368
Move doc/index.html -> index.html
Volker Grabsch <vog@notjusthosting.com>
parents:
2350
diff
changeset
|
230 $(SED) -i 's/\( id="$(1)-version"\)>[^<]*/\1>$(2)/' '$(TOP_DIR)/index.html' |
517
80db96994441
improved "make update": revert a package's version number when there were download problem with the new version
Volker Grabsch <vog@notjusthosting.com>
parents:
511
diff
changeset
|
231 $(MAKE) -f '$(MAKEFILE)' 'update-checksum-$(1)' \ |
2353
99516e73b368
Move doc/index.html -> index.html
Volker Grabsch <vog@notjusthosting.com>
parents:
2350
diff
changeset
|
232 || { $(SED) -i 's/\( id="$(1)-version"\)>[^<]*/\1>$($(1)_VERSION)/' '$(TOP_DIR)/index.html'; \ |
519
99a330c048df
bugfix for "make update": avoid silent package update failures
Volker Grabsch <vog@notjusthosting.com>
parents:
517
diff
changeset
|
233 exit 1; })), |
560
185e73877b08
improved error message for "make update"
Volker Grabsch <vog@notjusthosting.com>
parents:
545
diff
changeset
|
234 $(error Unable to update version number of package $(1))) |
114
771b6c26008d
completely rewritten from scratch as Makefile
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
235 |
771b6c26008d
completely rewritten from scratch as Makefile
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
236 endef |
771b6c26008d
completely rewritten from scratch as Makefile
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
237 update: |
403
825505ea3855
improved variable naming in the Makefile
Volker Grabsch <vog@notjusthosting.com>
parents:
401
diff
changeset
|
238 $(foreach PKG,$(PKGS),$(call UPDATE,$(PKG),$(shell $($(PKG)_UPDATE)))) |
114
771b6c26008d
completely rewritten from scratch as Makefile
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
239 |
306
85ffa9259036
validate downloads using SHA-1 checksums
Volker Grabsch <vog@notjusthosting.com>
parents:
305
diff
changeset
|
240 update-checksum-%: |
85ffa9259036
validate downloads using SHA-1 checksums
Volker Grabsch <vog@notjusthosting.com>
parents:
305
diff
changeset
|
241 $(call DOWNLOAD_PKG_ARCHIVE,$*) |
2348
5ada143a0517
Improve coding style
Volker Grabsch <vog@notjusthosting.com>
parents:
2346
diff
changeset
|
242 $(SED) -i 's/^\([^ ]*_CHECKSUM *:=\).*/\1 '"`$(call PKG_CHECKSUM,$*)`"'/' '$(TOP_DIR)/src/$*.mk' |
306
85ffa9259036
validate downloads using SHA-1 checksums
Volker Grabsch <vog@notjusthosting.com>
parents:
305
diff
changeset
|
243 |
2357
5a0c2bf69e55
Add new command "make cleanup-style"
Volker Grabsch <vog@notjusthosting.com>
parents:
2356
diff
changeset
|
244 cleanup-style: |
5a0c2bf69e55
Add new command "make cleanup-style"
Volker Grabsch <vog@notjusthosting.com>
parents:
2356
diff
changeset
|
245 @$(foreach FILE,$(wildcard $(addprefix $(TOP_DIR)/,Makefile index.html CNAME src/*.mk src/*test.* tools/*)),\ |
2368
5e6e989cb349
Improve "make cleanup-style" to touch only files that have to be fixed
Volker Grabsch <vog@notjusthosting.com>
parents:
2359
diff
changeset
|
246 $(SED) ' \ |
2357
5a0c2bf69e55
Add new command "make cleanup-style"
Volker Grabsch <vog@notjusthosting.com>
parents:
2356
diff
changeset
|
247 s/\r//g; \ |
5a0c2bf69e55
Add new command "make cleanup-style"
Volker Grabsch <vog@notjusthosting.com>
parents:
2356
diff
changeset
|
248 s/[ \t]\+$$//; \ |
5a0c2bf69e55
Add new command "make cleanup-style"
Volker Grabsch <vog@notjusthosting.com>
parents:
2356
diff
changeset
|
249 s,^#!/bin/bash$$,#!/usr/bin/env bash,; \ |
5a0c2bf69e55
Add new command "make cleanup-style"
Volker Grabsch <vog@notjusthosting.com>
parents:
2356
diff
changeset
|
250 $(if $(filter %Makefile,$(FILE)),,\ |
5a0c2bf69e55
Add new command "make cleanup-style"
Volker Grabsch <vog@notjusthosting.com>
parents:
2356
diff
changeset
|
251 s/\t/ /g; \ |
5a0c2bf69e55
Add new command "make cleanup-style"
Volker Grabsch <vog@notjusthosting.com>
parents:
2356
diff
changeset
|
252 ) \ |
2368
5e6e989cb349
Improve "make cleanup-style" to touch only files that have to be fixed
Volker Grabsch <vog@notjusthosting.com>
parents:
2359
diff
changeset
|
253 ' < $(FILE) > $(TOP_DIR)/tmp-cleanup-style; \ |
5e6e989cb349
Improve "make cleanup-style" to touch only files that have to be fixed
Volker Grabsch <vog@notjusthosting.com>
parents:
2359
diff
changeset
|
254 diff -u $(FILE) $(TOP_DIR)/tmp-cleanup-style >/dev/null \ |
5e6e989cb349
Improve "make cleanup-style" to touch only files that have to be fixed
Volker Grabsch <vog@notjusthosting.com>
parents:
2359
diff
changeset
|
255 || { echo '[cleanup] $(FILE)'; \ |
5e6e989cb349
Improve "make cleanup-style" to touch only files that have to be fixed
Volker Grabsch <vog@notjusthosting.com>
parents:
2359
diff
changeset
|
256 cp $(TOP_DIR)/tmp-cleanup-style $(FILE); }; \ |
5e6e989cb349
Improve "make cleanup-style" to touch only files that have to be fixed
Volker Grabsch <vog@notjusthosting.com>
parents:
2359
diff
changeset
|
257 rm -f $(TOP_DIR)/tmp-cleanup-style; \ |
2357
5a0c2bf69e55
Add new command "make cleanup-style"
Volker Grabsch <vog@notjusthosting.com>
parents:
2356
diff
changeset
|
258 ) |
5a0c2bf69e55
Add new command "make cleanup-style"
Volker Grabsch <vog@notjusthosting.com>
parents:
2356
diff
changeset
|
259 |