Mercurial > mxe-octave
annotate Makefile @ 594:2a325441b1ab
put log files into a separate sub directory log/, separate from usr/, surviving a "make clean"
author | Volker Grabsch <vog@notjusthosting.com> |
---|---|
date | Sun, 13 Dec 2009 14:18:03 +0100 |
parents | e3fa9c5468a5 |
children | f4b50cf506c6 |
rev | line source |
---|---|
123
9fedbab70063
improved coding style
Volker Grabsch <vog@notjusthosting.com>
parents:
122
diff
changeset
|
1 # MinGW cross compiling environment |
371
e8f5952f877a
mention doc/index.html in the Makefile
Volker Grabsch <vog@notjusthosting.com>
parents:
364
diff
changeset
|
2 # see doc/index.html or doc/README for further information |
414
d2a6561bcb6d
add a copyright notice and license to each source file
Volker Grabsch <vog@notjusthosting.com>
parents:
412
diff
changeset
|
3 # |
417
c82e9294b774
replace the contact email address with hints to the project mailing list
Volker Grabsch <vog@notjusthosting.com>
parents:
416
diff
changeset
|
4 # Copyright (C) 2009 Volker Grabsch |
414
d2a6561bcb6d
add a copyright notice and license to each source file
Volker Grabsch <vog@notjusthosting.com>
parents:
412
diff
changeset
|
5 # |
d2a6561bcb6d
add a copyright notice and license to each source file
Volker Grabsch <vog@notjusthosting.com>
parents:
412
diff
changeset
|
6 # Permission is hereby granted, free of charge, to any person obtaining |
d2a6561bcb6d
add a copyright notice and license to each source file
Volker Grabsch <vog@notjusthosting.com>
parents:
412
diff
changeset
|
7 # a copy of this software and associated documentation files (the |
d2a6561bcb6d
add a copyright notice and license to each source file
Volker Grabsch <vog@notjusthosting.com>
parents:
412
diff
changeset
|
8 # "Software"), to deal in the Software without restriction, including |
d2a6561bcb6d
add a copyright notice and license to each source file
Volker Grabsch <vog@notjusthosting.com>
parents:
412
diff
changeset
|
9 # without limitation the rights to use, copy, modify, merge, publish, |
d2a6561bcb6d
add a copyright notice and license to each source file
Volker Grabsch <vog@notjusthosting.com>
parents:
412
diff
changeset
|
10 # distribute, sublicense, and/or sell copies of the Software, and to |
d2a6561bcb6d
add a copyright notice and license to each source file
Volker Grabsch <vog@notjusthosting.com>
parents:
412
diff
changeset
|
11 # permit persons to whom the Software is furnished to do so, subject |
d2a6561bcb6d
add a copyright notice and license to each source file
Volker Grabsch <vog@notjusthosting.com>
parents:
412
diff
changeset
|
12 # to the following conditions: |
d2a6561bcb6d
add a copyright notice and license to each source file
Volker Grabsch <vog@notjusthosting.com>
parents:
412
diff
changeset
|
13 # |
d2a6561bcb6d
add a copyright notice and license to each source file
Volker Grabsch <vog@notjusthosting.com>
parents:
412
diff
changeset
|
14 # The above copyright notice and this permission notice shall be |
d2a6561bcb6d
add a copyright notice and license to each source file
Volker Grabsch <vog@notjusthosting.com>
parents:
412
diff
changeset
|
15 # included in all copies or substantial portions of the Software. |
d2a6561bcb6d
add a copyright notice and license to each source file
Volker Grabsch <vog@notjusthosting.com>
parents:
412
diff
changeset
|
16 # |
d2a6561bcb6d
add a copyright notice and license to each source file
Volker Grabsch <vog@notjusthosting.com>
parents:
412
diff
changeset
|
17 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, |
d2a6561bcb6d
add a copyright notice and license to each source file
Volker Grabsch <vog@notjusthosting.com>
parents:
412
diff
changeset
|
18 # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF |
d2a6561bcb6d
add a copyright notice and license to each source file
Volker Grabsch <vog@notjusthosting.com>
parents:
412
diff
changeset
|
19 # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. |
d2a6561bcb6d
add a copyright notice and license to each source file
Volker Grabsch <vog@notjusthosting.com>
parents:
412
diff
changeset
|
20 # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY |
d2a6561bcb6d
add a copyright notice and license to each source file
Volker Grabsch <vog@notjusthosting.com>
parents:
412
diff
changeset
|
21 # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, |
d2a6561bcb6d
add a copyright notice and license to each source file
Volker Grabsch <vog@notjusthosting.com>
parents:
412
diff
changeset
|
22 # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE |
d2a6561bcb6d
add a copyright notice and license to each source file
Volker Grabsch <vog@notjusthosting.com>
parents:
412
diff
changeset
|
23 # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
123
9fedbab70063
improved coding style
Volker Grabsch <vog@notjusthosting.com>
parents:
122
diff
changeset
|
24 |
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
|
25 JOBS := 1 |
450
f3563b6817c1
update the target triplet to i686-pc-mingw32
Volker Grabsch <vog@notjusthosting.com>
parents:
448
diff
changeset
|
26 TARGET := i686-pc-mingw32 |
114
771b6c26008d
completely rewritten from scratch as Makefile
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
27 SOURCEFORGE_MIRROR := kent.dl.sourceforge.net |
771b6c26008d
completely rewritten from scratch as Makefile
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
28 |
502
ccc46e51638d
increased version number to 2.10
Volker Grabsch <vog@notjusthosting.com>
parents:
477
diff
changeset
|
29 VERSION := 2.10 |
306
85ffa9259036
validate downloads using SHA-1 checksums
Volker Grabsch <vog@notjusthosting.com>
parents:
305
diff
changeset
|
30 PREFIX := $(PWD)/usr |
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
|
31 LOG_DIR := $(PWD)/log |
306
85ffa9259036
validate downloads using SHA-1 checksums
Volker Grabsch <vog@notjusthosting.com>
parents:
305
diff
changeset
|
32 PKG_DIR := $(PWD)/pkg |
416
2c560952dba8
let "make dist" put everything into a separate dist/ subdirectory
Volker Grabsch <vog@notjusthosting.com>
parents:
415
diff
changeset
|
33 DIST_DIR := $(PWD)/dist |
306
85ffa9259036
validate downloads using SHA-1 checksums
Volker Grabsch <vog@notjusthosting.com>
parents:
305
diff
changeset
|
34 TMP_DIR = $(PWD)/tmp-$(1) |
85ffa9259036
validate downloads using SHA-1 checksums
Volker Grabsch <vog@notjusthosting.com>
parents:
305
diff
changeset
|
35 MAKEFILE := $(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST)) |
85ffa9259036
validate downloads using SHA-1 checksums
Volker Grabsch <vog@notjusthosting.com>
parents:
305
diff
changeset
|
36 TOP_DIR := $(patsubst %/,%,$(dir $(MAKEFILE))) |
85ffa9259036
validate downloads using SHA-1 checksums
Volker Grabsch <vog@notjusthosting.com>
parents:
305
diff
changeset
|
37 PATH := $(PREFIX)/bin:$(PATH) |
85ffa9259036
validate downloads using SHA-1 checksums
Volker Grabsch <vog@notjusthosting.com>
parents:
305
diff
changeset
|
38 SHELL := bash |
85ffa9259036
validate downloads using SHA-1 checksums
Volker Grabsch <vog@notjusthosting.com>
parents:
305
diff
changeset
|
39 SED := $(shell gsed --help >/dev/null 2>&1 && echo g)sed |
85ffa9259036
validate downloads using SHA-1 checksums
Volker Grabsch <vog@notjusthosting.com>
parents:
305
diff
changeset
|
40 INSTALL := $(shell ginstall --help >/dev/null 2>&1 && echo g)install |
114
771b6c26008d
completely rewritten from scratch as Makefile
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
41 |
287
92ac81dea92d
bugfix: unset any environment variables which might cause trouble
Volker Grabsch <vog@notjusthosting.com>
parents:
285
diff
changeset
|
42 # unset any environment variables which might cause trouble |
92ac81dea92d
bugfix: unset any environment variables which might cause trouble
Volker Grabsch <vog@notjusthosting.com>
parents:
285
diff
changeset
|
43 AR = |
92ac81dea92d
bugfix: unset any environment variables which might cause trouble
Volker Grabsch <vog@notjusthosting.com>
parents:
285
diff
changeset
|
44 CC = |
92ac81dea92d
bugfix: unset any environment variables which might cause trouble
Volker Grabsch <vog@notjusthosting.com>
parents:
285
diff
changeset
|
45 CFLAGS = |
92ac81dea92d
bugfix: unset any environment variables which might cause trouble
Volker Grabsch <vog@notjusthosting.com>
parents:
285
diff
changeset
|
46 CPP = |
92ac81dea92d
bugfix: unset any environment variables which might cause trouble
Volker Grabsch <vog@notjusthosting.com>
parents:
285
diff
changeset
|
47 CPPFLAGS = |
92ac81dea92d
bugfix: unset any environment variables which might cause trouble
Volker Grabsch <vog@notjusthosting.com>
parents:
285
diff
changeset
|
48 CROSS = |
92ac81dea92d
bugfix: unset any environment variables which might cause trouble
Volker Grabsch <vog@notjusthosting.com>
parents:
285
diff
changeset
|
49 CXX = |
92ac81dea92d
bugfix: unset any environment variables which might cause trouble
Volker Grabsch <vog@notjusthosting.com>
parents:
285
diff
changeset
|
50 CXXCPP = |
92ac81dea92d
bugfix: unset any environment variables which might cause trouble
Volker Grabsch <vog@notjusthosting.com>
parents:
285
diff
changeset
|
51 CXXFLAGS = |
92ac81dea92d
bugfix: unset any environment variables which might cause trouble
Volker Grabsch <vog@notjusthosting.com>
parents:
285
diff
changeset
|
52 EXEEXT = |
378
a2b5d6e4d117
bugfix: unset the EXTRA_* environment variables which causes trouble
Volker Grabsch <vog@notjusthosting.com>
parents:
371
diff
changeset
|
53 EXTRA_CFLAGS = |
a2b5d6e4d117
bugfix: unset the EXTRA_* environment variables which causes trouble
Volker Grabsch <vog@notjusthosting.com>
parents:
371
diff
changeset
|
54 EXTRA_LDFLAGS = |
287
92ac81dea92d
bugfix: unset any environment variables which might cause trouble
Volker Grabsch <vog@notjusthosting.com>
parents:
285
diff
changeset
|
55 LD = |
92ac81dea92d
bugfix: unset any environment variables which might cause trouble
Volker Grabsch <vog@notjusthosting.com>
parents:
285
diff
changeset
|
56 LDFLAGS = |
92ac81dea92d
bugfix: unset any environment variables which might cause trouble
Volker Grabsch <vog@notjusthosting.com>
parents:
285
diff
changeset
|
57 LIBS = |
92ac81dea92d
bugfix: unset any environment variables which might cause trouble
Volker Grabsch <vog@notjusthosting.com>
parents:
285
diff
changeset
|
58 NM = |
92ac81dea92d
bugfix: unset any environment variables which might cause trouble
Volker Grabsch <vog@notjusthosting.com>
parents:
285
diff
changeset
|
59 PKG_CONFIG = |
364
b8cd5199077e
bugfix: unset the PKG_CONFIG_PATH environment variable which causes trouble
Volker Grabsch <vog@notjusthosting.com>
parents:
359
diff
changeset
|
60 PKG_CONFIG_PATH = |
287
92ac81dea92d
bugfix: unset any environment variables which might cause trouble
Volker Grabsch <vog@notjusthosting.com>
parents:
285
diff
changeset
|
61 RANLIB = |
92ac81dea92d
bugfix: unset any environment variables which might cause trouble
Volker Grabsch <vog@notjusthosting.com>
parents:
285
diff
changeset
|
62 STRIP = |
92ac81dea92d
bugfix: unset any environment variables which might cause trouble
Volker Grabsch <vog@notjusthosting.com>
parents:
285
diff
changeset
|
63 |
264
01aa6a0e1c9e
new macro SHORT_PKG_VERSION which assists in creating download URLs
Volker Grabsch <vog@notjusthosting.com>
parents:
259
diff
changeset
|
64 SHORT_PKG_VERSION = \ |
01aa6a0e1c9e
new macro SHORT_PKG_VERSION which assists in creating download URLs
Volker Grabsch <vog@notjusthosting.com>
parents:
259
diff
changeset
|
65 $(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
|
66 |
403
825505ea3855
improved variable naming in the Makefile
Volker Grabsch <vog@notjusthosting.com>
parents:
401
diff
changeset
|
67 PKGS := $(sort $(patsubst $(TOP_DIR)/src/%.mk,%,$(wildcard $(TOP_DIR)/src/*.mk))) |
213
faeb91c793f3
find the src/*.mk and doc/ files even when called from another directory, e.g. via "make -f /path/to/mingw_cross_env/Makefile"
Volker Grabsch <vog@notjusthosting.com>
parents:
212
diff
changeset
|
68 include $(TOP_DIR)/src/*.mk |
114
771b6c26008d
completely rewritten from scratch as Makefile
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
69 |
120
4edf6a519683
improved coding style
Volker Grabsch <vog@notjusthosting.com>
parents:
119
diff
changeset
|
70 UNPACK_ARCHIVE = \ |
592
525f5fd5a9ea
unpack source packages quietly to avoid cluttering the log files
Volker Grabsch <vog@notjusthosting.com>
parents:
561
diff
changeset
|
71 $(if $(filter %.tgz, $(1)),tar xzf '$(1)', \ |
525f5fd5a9ea
unpack source packages quietly to avoid cluttering the log files
Volker Grabsch <vog@notjusthosting.com>
parents:
561
diff
changeset
|
72 $(if $(filter %.tar.gz, $(1)),tar xzf '$(1)', \ |
525f5fd5a9ea
unpack source packages quietly to avoid cluttering the log files
Volker Grabsch <vog@notjusthosting.com>
parents:
561
diff
changeset
|
73 $(if $(filter %.tar.bz2,$(1)),tar xjf '$(1)', \ |
525f5fd5a9ea
unpack source packages quietly to avoid cluttering the log files
Volker Grabsch <vog@notjusthosting.com>
parents:
561
diff
changeset
|
74 $(if $(filter %.zip, $(1)),unzip -q '$(1)', \ |
144
aafad5b5de5f
bugfix: support the .tgz archive extension in addition to .tar.gz
Volker Grabsch <vog@notjusthosting.com>
parents:
135
diff
changeset
|
75 $(error Unknown archive format: $(1)))))) |
114
771b6c26008d
completely rewritten from scratch as Makefile
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
76 |
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
|
77 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
|
78 $(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
|
79 |
306
85ffa9259036
validate downloads using SHA-1 checksums
Volker Grabsch <vog@notjusthosting.com>
parents:
305
diff
changeset
|
80 PKG_CHECKSUM = \ |
473
b0cc6cc3c1fc
improved status output
Volker Grabsch <vog@notjusthosting.com>
parents:
461
diff
changeset
|
81 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
|
82 |
85ffa9259036
validate downloads using SHA-1 checksums
Volker Grabsch <vog@notjusthosting.com>
parents:
305
diff
changeset
|
83 CHECK_PKG_ARCHIVE = \ |
311
ce0d27e7993f
use "openssl sha1 ..." instead of "sha1sum -b ..."
Volker Grabsch <vog@notjusthosting.com>
parents:
310
diff
changeset
|
84 [ '$($(1)_CHECKSUM)' == "`$$(call PKG_CHECKSUM,$(1))`" ] |
306
85ffa9259036
validate downloads using SHA-1 checksums
Volker Grabsch <vog@notjusthosting.com>
parents:
305
diff
changeset
|
85 |
85ffa9259036
validate downloads using SHA-1 checksums
Volker Grabsch <vog@notjusthosting.com>
parents:
305
diff
changeset
|
86 DOWNLOAD_PKG_ARCHIVE = \ |
85ffa9259036
validate downloads using SHA-1 checksums
Volker Grabsch <vog@notjusthosting.com>
parents:
305
diff
changeset
|
87 $(if $($(1)_URL_2), \ |
85ffa9259036
validate downloads using SHA-1 checksums
Volker Grabsch <vog@notjusthosting.com>
parents:
305
diff
changeset
|
88 wget -T 30 -t 3 -c -O '$(PKG_DIR)/$($(1)_FILE)' '$($(1)_URL)' \ |
85ffa9259036
validate downloads using SHA-1 checksums
Volker Grabsch <vog@notjusthosting.com>
parents:
305
diff
changeset
|
89 || wget -c -O '$(PKG_DIR)/$($(1)_FILE)' '$($(1)_URL_2)', \ |
85ffa9259036
validate downloads using SHA-1 checksums
Volker Grabsch <vog@notjusthosting.com>
parents:
305
diff
changeset
|
90 wget -c -O '$(PKG_DIR)/$($(1)_FILE)' '$($(1)_URL)') |
85ffa9259036
validate downloads using SHA-1 checksums
Volker Grabsch <vog@notjusthosting.com>
parents:
305
diff
changeset
|
91 |
408
413750a629be
improved version recognition for sourceforge packages
Volker Grabsch <vog@notjusthosting.com>
parents:
406
diff
changeset
|
92 SOURCEFORGE_FILES = \ |
413750a629be
improved version recognition for sourceforge packages
Volker Grabsch <vog@notjusthosting.com>
parents:
406
diff
changeset
|
93 wget -q -O- '$(1)' | \ |
413750a629be
improved version recognition for sourceforge packages
Volker Grabsch <vog@notjusthosting.com>
parents:
406
diff
changeset
|
94 grep 'title="/' | \ |
561
57265b8d92af
adjust the $(SOURCEFORGE_FILES) macro to the new layout of the SourceForge download sites (needed by "make update")
Volker Grabsch <vog@notjusthosting.com>
parents:
560
diff
changeset
|
95 $(SED) -n 's,.*title="\(/[^:]*\).*released on \([0-9-]*\)",\2 \1,p' | \ |
408
413750a629be
improved version recognition for sourceforge packages
Volker Grabsch <vog@notjusthosting.com>
parents:
406
diff
changeset
|
96 sort | \ |
413750a629be
improved version recognition for sourceforge packages
Volker Grabsch <vog@notjusthosting.com>
parents:
406
diff
changeset
|
97 $(SED) 's,^[^ ]* ,,' |
413750a629be
improved version recognition for sourceforge packages
Volker Grabsch <vog@notjusthosting.com>
parents:
406
diff
changeset
|
98 |
114
771b6c26008d
completely rewritten from scratch as Makefile
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
99 .PHONY: all |
403
825505ea3855
improved variable naming in the Makefile
Volker Grabsch <vog@notjusthosting.com>
parents:
401
diff
changeset
|
100 all: $(PKGS) |
114
771b6c26008d
completely rewritten from scratch as Makefile
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
101 |
394
bb2b329f85d3
new command "make download"
Volker Grabsch <vog@notjusthosting.com>
parents:
392
diff
changeset
|
102 .PHONY: download |
403
825505ea3855
improved variable naming in the Makefile
Volker Grabsch <vog@notjusthosting.com>
parents:
401
diff
changeset
|
103 download: $(addprefix download-,$(PKGS)) |
394
bb2b329f85d3
new command "make download"
Volker Grabsch <vog@notjusthosting.com>
parents:
392
diff
changeset
|
104 |
114
771b6c26008d
completely rewritten from scratch as Makefile
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
105 define PKG_RULE |
394
bb2b329f85d3
new command "make download"
Volker Grabsch <vog@notjusthosting.com>
parents:
392
diff
changeset
|
106 .PHONY: download-$(1) |
429
2fa394d22e1d
bugfix and simplification of "make download"
Volker Grabsch <vog@notjusthosting.com>
parents:
428
diff
changeset
|
107 download-$(1): $(addprefix download-,$($(1)_DEPS)) |
134
d24e76675835
bugfix: use -d instead of -z to check for a directory
Volker Grabsch <vog@notjusthosting.com>
parents:
131
diff
changeset
|
108 [ -d '$(PKG_DIR)' ] || mkdir -p '$(PKG_DIR)' |
310
5c5e254fa32b
bugfix in handling checksums
Volker Grabsch <vog@notjusthosting.com>
parents:
306
diff
changeset
|
109 if ! $(call CHECK_PKG_ARCHIVE,$(1)); then \ |
5c5e254fa32b
bugfix in handling checksums
Volker Grabsch <vog@notjusthosting.com>
parents:
306
diff
changeset
|
110 $(call DOWNLOAD_PKG_ARCHIVE,$(1)); \ |
5c5e254fa32b
bugfix in handling checksums
Volker Grabsch <vog@notjusthosting.com>
parents:
306
diff
changeset
|
111 $(call CHECK_PKG_ARCHIVE,$(1)) || { echo 'Wrong checksum!'; exit 1; }; \ |
430
5d2c64680021
improved coding style
Volker Grabsch <vog@notjusthosting.com>
parents:
429
diff
changeset
|
112 fi |
394
bb2b329f85d3
new command "make download"
Volker Grabsch <vog@notjusthosting.com>
parents:
392
diff
changeset
|
113 |
bb2b329f85d3
new command "make download"
Volker Grabsch <vog@notjusthosting.com>
parents:
392
diff
changeset
|
114 .PHONY: $(1) |
593
e3fa9c5468a5
put installation markers into a separate sub directory usr/installed/
Volker Grabsch <vog@notjusthosting.com>
parents:
592
diff
changeset
|
115 $(1): $(PREFIX)/installed/$(1) |
e3fa9c5468a5
put installation markers into a separate sub directory usr/installed/
Volker Grabsch <vog@notjusthosting.com>
parents:
592
diff
changeset
|
116 $(PREFIX)/installed/$(1): $(TOP_DIR)/src/$(1).mk \ |
394
bb2b329f85d3
new command "make download"
Volker Grabsch <vog@notjusthosting.com>
parents:
392
diff
changeset
|
117 $(wildcard $(TOP_DIR)/src/$(1)-*.patch) \ |
593
e3fa9c5468a5
put installation markers into a separate sub directory usr/installed/
Volker Grabsch <vog@notjusthosting.com>
parents:
592
diff
changeset
|
118 $(addprefix $(PREFIX)/installed/,$($(1)_DEPS)) |
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
|
119 @[ -d '$(LOG_DIR)' ] || mkdir -p '$(LOG_DIR)' |
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
|
120 @[ -d '$(PKG_DIR)' ] || mkdir -p '$(PKG_DIR)' |
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
|
121 @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
|
122 echo '[download] $(1)'; \ |
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
|
123 ($(call DOWNLOAD_PKG_ARCHIVE,$(1))) &> '$(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
|
124 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
|
125 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
|
126 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
|
127 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
|
128 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
|
129 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
|
130 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
|
131 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
|
132 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
|
133 fi; \ |
430
5d2c64680021
improved coding style
Volker Grabsch <vog@notjusthosting.com>
parents:
429
diff
changeset
|
134 fi |
434
7fdb6628d83a
improved output: don't show "[build]" for download-only packages
Volker Grabsch <vog@notjusthosting.com>
parents:
431
diff
changeset
|
135 $(if $(value $(1)_BUILD), |
7fdb6628d83a
improved output: don't show "[build]" for download-only packages
Volker Grabsch <vog@notjusthosting.com>
parents:
431
diff
changeset
|
136 @echo '[build] $(1)' |
7fdb6628d83a
improved output: don't show "[build]" for download-only packages
Volker Grabsch <vog@notjusthosting.com>
parents:
431
diff
changeset
|
137 ,) |
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
|
138 @if ! (time $(MAKE) -f '$(MAKEFILE)' 'build-only-$(1)') &> '$(LOG_DIR)/$(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
|
139 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
|
140 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
|
141 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
|
142 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
|
143 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
|
144 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
|
145 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
|
146 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
|
147 fi |
435
80c86e6f7ca6
improved coding style
Volker Grabsch <vog@notjusthosting.com>
parents:
434
diff
changeset
|
148 @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
|
149 |
951e2a6d1e69
create a separate build log file "usr/log-PKG" for each package build
Volker Grabsch <vog@notjusthosting.com>
parents:
427
diff
changeset
|
150 .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
|
151 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
|
152 $(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
|
153 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
|
154 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
|
155 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
|
156 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
|
157 $(foreach PKG_PATCH,$(sort $(wildcard $(TOP_DIR)/src/$(1)-*.patch)), |
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
|
158 (cd '$(2)/$($(1)_SUBDIR)' && patch -p1) < $(PKG_PATCH)) |
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
|
159 $$(call $(1)_BUILD,$(2)/$($(1)_SUBDIR)) |
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
|
160 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
|
161 ,) |
593
e3fa9c5468a5
put installation markers into a separate sub directory usr/installed/
Volker Grabsch <vog@notjusthosting.com>
parents:
592
diff
changeset
|
162 [ -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
|
163 touch '$(PREFIX)/installed/$(1)' |
114
771b6c26008d
completely rewritten from scratch as Makefile
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
164 endef |
403
825505ea3855
improved variable naming in the Makefile
Volker Grabsch <vog@notjusthosting.com>
parents:
401
diff
changeset
|
165 $(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
|
166 |
122
daa21345aa2a
implemented 'make strip'
Volker Grabsch <vog@notjusthosting.com>
parents:
121
diff
changeset
|
167 .PHONY: strip |
daa21345aa2a
implemented 'make strip'
Volker Grabsch <vog@notjusthosting.com>
parents:
121
diff
changeset
|
168 strip: |
daa21345aa2a
implemented 'make strip'
Volker Grabsch <vog@notjusthosting.com>
parents:
121
diff
changeset
|
169 rm -rf \ |
256 | 170 '$(PREFIX)/include' \ |
171 '$(PREFIX)/info' \ | |
172 '$(PREFIX)/lib/libiberty.a' \ | |
173 '$(PREFIX)/man' \ | |
174 '$(PREFIX)/share' \ | |
259
3221273ea6cb
remove also the etc/ directory on "make strip"
Volker Grabsch <vog@notjusthosting.com>
parents:
256
diff
changeset
|
175 '$(PREFIX)/$(TARGET)/etc' \ |
256 | 176 '$(PREFIX)/$(TARGET)/doc' \ |
177 '$(PREFIX)/$(TARGET)/info' \ | |
178 '$(PREFIX)/$(TARGET)/lib'/*.def \ | |
179 '$(PREFIX)/$(TARGET)/man' \ | |
545
5ad2e782d8dd
don't remove usr/i686-pc-mingw32/share/ on "make strip", because this might break NSIS and other packages
Volker Grabsch <vog@notjusthosting.com>
parents:
523
diff
changeset
|
180 '$(PREFIX)/$(TARGET)/sbin' |
299
9f5fdae25d77
portability fix for MacOS X: use more common options for the "strip" command
Volker Grabsch <vog@notjusthosting.com>
parents:
297
diff
changeset
|
181 -strip -Sx \ |
256 | 182 '$(PREFIX)/bin'/* \ |
183 '$(PREFIX)/libexec/gcc/$(TARGET)'/*/* \ | |
184 '$(PREFIX)/$(TARGET)/bin'/* | |
299
9f5fdae25d77
portability fix for MacOS X: use more common options for the "strip" command
Volker Grabsch <vog@notjusthosting.com>
parents:
297
diff
changeset
|
185 -$(TARGET)-strip -S \ |
256 | 186 '$(PREFIX)/lib/gcc/$(TARGET)'/*/*.a \ |
187 '$(PREFIX)/lib/gcc/$(TARGET)'/*/*.o \ | |
188 '$(PREFIX)/$(TARGET)/lib'/*.a \ | |
189 '$(PREFIX)/$(TARGET)/lib'/*.o | |
122
daa21345aa2a
implemented 'make strip'
Volker Grabsch <vog@notjusthosting.com>
parents:
121
diff
changeset
|
190 |
119
ff34f15ec142
improved coding style
Volker Grabsch <vog@notjusthosting.com>
parents:
114
diff
changeset
|
191 .PHONY: clean |
ff34f15ec142
improved coding style
Volker Grabsch <vog@notjusthosting.com>
parents:
114
diff
changeset
|
192 clean: |
ff34f15ec142
improved coding style
Volker Grabsch <vog@notjusthosting.com>
parents:
114
diff
changeset
|
193 rm -rf $(call TMP_DIR,*) $(PREFIX)/* |
ff34f15ec142
improved coding style
Volker Grabsch <vog@notjusthosting.com>
parents:
114
diff
changeset
|
194 |
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
|
195 .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
|
196 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
|
197 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
|
198 $(filter-out \ |
403
825505ea3855
improved variable naming in the Makefile
Volker Grabsch <vog@notjusthosting.com>
parents:
401
diff
changeset
|
199 $(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
|
200 $(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
|
201 |
119
ff34f15ec142
improved coding style
Volker Grabsch <vog@notjusthosting.com>
parents:
114
diff
changeset
|
202 .PHONY: update |
114
771b6c26008d
completely rewritten from scratch as Makefile
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
203 define UPDATE |
306
85ffa9259036
validate downloads using SHA-1 checksums
Volker Grabsch <vog@notjusthosting.com>
parents:
305
diff
changeset
|
204 $(if $(2), |
448
e9afec55fd6b
improved version recognition, enable the notation of ignored (bad) package versions
Volker Grabsch <vog@notjusthosting.com>
parents:
443
diff
changeset
|
205 $(if $(filter $(2),$($(1)_IGNORE)), |
461
c489fb1015e2
improved output style of "make update" again
Volker Grabsch <vog@notjusthosting.com>
parents:
454
diff
changeset
|
206 $(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
|
207 $(if $(filter $(2),$($(1)_VERSION)), |
461
c489fb1015e2
improved output style of "make update" again
Volker Grabsch <vog@notjusthosting.com>
parents:
454
diff
changeset
|
208 $(info . $(1) $(2)), |
477
ffca44340844
improved output of "make update"
Volker Grabsch <vog@notjusthosting.com>
parents:
473
diff
changeset
|
209 $(info NEW $(1) $($(1)_VERSION) --> $(2)) |
448
e9afec55fd6b
improved version recognition, enable the notation of ignored (bad) package versions
Volker Grabsch <vog@notjusthosting.com>
parents:
443
diff
changeset
|
210 $(SED) 's/^\([^ ]*_VERSION *:=\).*/\1 $(2)/' -i '$(TOP_DIR)/src/$(1).mk' |
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
|
211 $(MAKE) -f '$(MAKEFILE)' 'update-checksum-$(1)' \ |
519
99a330c048df
bugfix for "make update": avoid silent package update failures
Volker Grabsch <vog@notjusthosting.com>
parents:
517
diff
changeset
|
212 || { $(SED) 's/^\([^ ]*_VERSION *:=\).*/\1 $($(1)_VERSION)/' -i '$(TOP_DIR)/src/$(1).mk'; \ |
99a330c048df
bugfix for "make update": avoid silent package update failures
Volker Grabsch <vog@notjusthosting.com>
parents:
517
diff
changeset
|
213 exit 1; })), |
560
185e73877b08
improved error message for "make update"
Volker Grabsch <vog@notjusthosting.com>
parents:
545
diff
changeset
|
214 $(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
|
215 |
771b6c26008d
completely rewritten from scratch as Makefile
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
216 endef |
771b6c26008d
completely rewritten from scratch as Makefile
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
217 update: |
403
825505ea3855
improved variable naming in the Makefile
Volker Grabsch <vog@notjusthosting.com>
parents:
401
diff
changeset
|
218 $(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
|
219 |
306
85ffa9259036
validate downloads using SHA-1 checksums
Volker Grabsch <vog@notjusthosting.com>
parents:
305
diff
changeset
|
220 update-checksum-%: |
85ffa9259036
validate downloads using SHA-1 checksums
Volker Grabsch <vog@notjusthosting.com>
parents:
305
diff
changeset
|
221 $(call DOWNLOAD_PKG_ARCHIVE,$*) |
319
9a9cffd8a015
bugfix in the "update-checksum-%" target which is internally used by "make update"
Volker Grabsch <vog@notjusthosting.com>
parents:
316
diff
changeset
|
222 $(SED) 's/^\([^ ]*_CHECKSUM *:=\).*/\1 '"`$(call PKG_CHECKSUM,$*)`"'/' -i '$(TOP_DIR)/src/$*.mk' |
306
85ffa9259036
validate downloads using SHA-1 checksums
Volker Grabsch <vog@notjusthosting.com>
parents:
305
diff
changeset
|
223 |
114
771b6c26008d
completely rewritten from scratch as Makefile
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
224 .PHONY: dist |
771b6c26008d
completely rewritten from scratch as Makefile
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
225 dist: |
427
9605f8f088e4
small bugfix in "make dist"
Volker Grabsch <vog@notjusthosting.com>
parents:
417
diff
changeset
|
226 [ -d '$(DIST_DIR)' ] || mkdir -p '$(DIST_DIR)' |
9605f8f088e4
small bugfix in "make dist"
Volker Grabsch <vog@notjusthosting.com>
parents:
417
diff
changeset
|
227 [ -d '$(DIST_DIR)/web' ] || mkdir '$(DIST_DIR)/web' |
9605f8f088e4
small bugfix in "make dist"
Volker Grabsch <vog@notjusthosting.com>
parents:
417
diff
changeset
|
228 [ -d '$(DIST_DIR)/releases' ] || mkdir '$(DIST_DIR)/releases' |
416
2c560952dba8
let "make dist" put everything into a separate dist/ subdirectory
Volker Grabsch <vog@notjusthosting.com>
parents:
415
diff
changeset
|
229 rm -rf '$(DIST_DIR)/mingw-cross-env-$(VERSION)' |
2c560952dba8
let "make dist" put everything into a separate dist/ subdirectory
Volker Grabsch <vog@notjusthosting.com>
parents:
415
diff
changeset
|
230 mkdir '$(DIST_DIR)/mingw-cross-env-$(VERSION)' |
2c560952dba8
let "make dist" put everything into a separate dist/ subdirectory
Volker Grabsch <vog@notjusthosting.com>
parents:
415
diff
changeset
|
231 mkdir '$(DIST_DIR)/mingw-cross-env-$(VERSION)/doc' |
2c560952dba8
let "make dist" put everything into a separate dist/ subdirectory
Volker Grabsch <vog@notjusthosting.com>
parents:
415
diff
changeset
|
232 mkdir '$(DIST_DIR)/mingw-cross-env-$(VERSION)/src' |
114
771b6c26008d
completely rewritten from scratch as Makefile
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
233 ( \ |
521
804e6d3d4fe1
in the HTML documentation generation of "make dist", orient on ids rather than comments
Volker Grabsch <vog@notjusthosting.com>
parents:
519
diff
changeset
|
234 $(SED) -n '1,/<table id="package-list">/ p' '$(TOP_DIR)/doc/index.html' && \ |
403
825505ea3855
improved variable naming in the Makefile
Volker Grabsch <vog@notjusthosting.com>
parents:
401
diff
changeset
|
235 ($(foreach PKG,$(PKGS), \ |
278
6b9ea2440ba5
merge text documentation and website into an HTML documentation
Volker Grabsch <vog@notjusthosting.com>
parents:
275
diff
changeset
|
236 echo ' <tr><td><a href="$($(PKG)_WEBSITE)">$(PKG)</a></td><td>$($(PKG)_VERSION)</td></tr>';)) && \ |
523
1711ff2b9416
generate the list of authors automatically from the version history
Volker Grabsch <vog@notjusthosting.com>
parents:
521
diff
changeset
|
237 $(SED) -n '/<table id="package-list">/,/<ul id="authors-list">/ p' '$(TOP_DIR)/doc/index.html' | \ |
1711ff2b9416
generate the list of authors automatically from the version history
Volker Grabsch <vog@notjusthosting.com>
parents:
521
diff
changeset
|
238 $(SED) '1d' && \ |
1711ff2b9416
generate the list of authors automatically from the version history
Volker Grabsch <vog@notjusthosting.com>
parents:
521
diff
changeset
|
239 (LC_ALL=C hg log | $(SED) -n 's,^\(user: *\([^<]*\) <.*\|.*(by \([^)]*\)).*\)$$,\2\3,p' | \ |
1711ff2b9416
generate the list of authors automatically from the version history
Volker Grabsch <vog@notjusthosting.com>
parents:
521
diff
changeset
|
240 sort | uniq -c | sort -nr | \ |
1711ff2b9416
generate the list of authors automatically from the version history
Volker Grabsch <vog@notjusthosting.com>
parents:
521
diff
changeset
|
241 $(SED) 's,^ *[0-9]* *\(.*\)$$, <li>\1</li>,') && \ |
1711ff2b9416
generate the list of authors automatically from the version history
Volker Grabsch <vog@notjusthosting.com>
parents:
521
diff
changeset
|
242 $(SED) '1,/<ul id="authors-list">/ d' '$(TOP_DIR)/doc/index.html' \ |
359
e9fbffc4f48a
introduce placeholders for version number and target in the tutorial
Volker Grabsch <vog@notjusthosting.com>
parents:
353
diff
changeset
|
243 ) \ |
e9fbffc4f48a
introduce placeholders for version number and target in the tutorial
Volker Grabsch <vog@notjusthosting.com>
parents:
353
diff
changeset
|
244 | $(SED) 's,\(<span class="version">\)[^<]*\(</span>\),\1$(VERSION)\2,g' \ |
e9fbffc4f48a
introduce placeholders for version number and target in the tutorial
Volker Grabsch <vog@notjusthosting.com>
parents:
353
diff
changeset
|
245 | $(SED) 's,\(<span class="target">\)[^<]*\(</span>\),\1$(TARGET)\2,g' \ |
416
2c560952dba8
let "make dist" put everything into a separate dist/ subdirectory
Volker Grabsch <vog@notjusthosting.com>
parents:
415
diff
changeset
|
246 >'$(DIST_DIR)/mingw-cross-env-$(VERSION)/doc/index.html' |
2c560952dba8
let "make dist" put everything into a separate dist/ subdirectory
Volker Grabsch <vog@notjusthosting.com>
parents:
415
diff
changeset
|
247 cp -p '$(TOP_DIR)/doc'/screenshot-* '$(DIST_DIR)/mingw-cross-env-$(VERSION)/doc/' |
2c560952dba8
let "make dist" put everything into a separate dist/ subdirectory
Volker Grabsch <vog@notjusthosting.com>
parents:
415
diff
changeset
|
248 cp -p '$(DIST_DIR)/mingw-cross-env-$(VERSION)/doc'/* '$(DIST_DIR)/web/' |
523
1711ff2b9416
generate the list of authors automatically from the version history
Volker Grabsch <vog@notjusthosting.com>
parents:
521
diff
changeset
|
249 (cd '$(TOP_DIR)' && LC_ALL=C hg log -v --style changelog) >'$(DIST_DIR)/mingw-cross-env-$(VERSION)/doc/ChangeLog' |
416
2c560952dba8
let "make dist" put everything into a separate dist/ subdirectory
Volker Grabsch <vog@notjusthosting.com>
parents:
415
diff
changeset
|
250 cd '$(DIST_DIR)/mingw-cross-env-$(VERSION)/doc' && lynx -dump -width 75 -nolist -force_html index.html >README |
2c560952dba8
let "make dist" put everything into a separate dist/ subdirectory
Volker Grabsch <vog@notjusthosting.com>
parents:
415
diff
changeset
|
251 cp -p '$(TOP_DIR)/Makefile' '$(DIST_DIR)/mingw-cross-env-$(VERSION)/' |
2c560952dba8
let "make dist" put everything into a separate dist/ subdirectory
Volker Grabsch <vog@notjusthosting.com>
parents:
415
diff
changeset
|
252 cp -p '$(TOP_DIR)/src'/*.mk '$(DIST_DIR)/mingw-cross-env-$(VERSION)/src/' |
2c560952dba8
let "make dist" put everything into a separate dist/ subdirectory
Volker Grabsch <vog@notjusthosting.com>
parents:
415
diff
changeset
|
253 cp -p '$(TOP_DIR)/src'/*.patch '$(DIST_DIR)/mingw-cross-env-$(VERSION)/src/' |
2c560952dba8
let "make dist" put everything into a separate dist/ subdirectory
Volker Grabsch <vog@notjusthosting.com>
parents:
415
diff
changeset
|
254 (cd '$(DIST_DIR)' && tar cvf - 'mingw-cross-env-$(VERSION)' | gzip -9) >'$(DIST_DIR)/releases/mingw-cross-env-$(VERSION).tar.gz' |
2c560952dba8
let "make dist" put everything into a separate dist/ subdirectory
Volker Grabsch <vog@notjusthosting.com>
parents:
415
diff
changeset
|
255 rm -rf '$(DIST_DIR)/mingw-cross-env-$(VERSION)' |
114
771b6c26008d
completely rewritten from scratch as Makefile
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
256 |