annotate Makefile @ 264:01aa6a0e1c9e

new macro SHORT_PKG_VERSION which assists in creating download URLs
author Volker Grabsch <vog@notjusthosting.com>
date Sun, 01 Mar 2009 16:18:46 +0100
parents 3221273ea6cb
children a91ec84e4206
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
123
9fedbab70063 improved coding style
Volker Grabsch <vog@notjusthosting.com>
parents: 122
diff changeset
1 # MinGW cross compiling environment
9fedbab70063 improved coding style
Volker Grabsch <vog@notjusthosting.com>
parents: 122
diff changeset
2 # see doc/README for further information
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
114
771b6c26008d completely rewritten from scratch as Makefile
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
5 TARGET := i386-mingw32msvc
771b6c26008d completely rewritten from scratch as Makefile
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
6 SOURCEFORGE_MIRROR := kent.dl.sourceforge.net
771b6c26008d completely rewritten from scratch as Makefile
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
7
212
33e534010f9f increased version number to 2.3
Volker Grabsch <vog@notjusthosting.com>
parents: 210
diff changeset
8 VERSION := 2.3
114
771b6c26008d completely rewritten from scratch as Makefile
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
9 PREFIX := $(PWD)/usr
771b6c26008d completely rewritten from scratch as Makefile
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
10 PKG_DIR := $(PWD)/pkg
771b6c26008d completely rewritten from scratch as Makefile
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
11 TMP_DIR = $(PWD)/tmp-$(1)
251
f3fcee0067eb improved portability of the Makefile by avoiding $(lastword ...)
Volker Grabsch <vog@notjusthosting.com>
parents: 226
diff changeset
12 TOP_DIR := $(patsubst %/,%,$(dir $(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST))))
121
15e0ab5c4df0 bugfix: add $(PREFIX)/bin to the PATH
Volker Grabsch <vog@notjusthosting.com>
parents: 120
diff changeset
13 PATH := $(PREFIX)/bin:$(PATH)
184
5823fd0f68e6 add 'SHELL=bash' hints where necessary, so it works on systems where /bin/sh isn't a Bash
Volker Grabsch <vog@notjusthosting.com>
parents: 183
diff changeset
14 SHELL := bash
114
771b6c26008d completely rewritten from scratch as Makefile
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
15 SED := $(shell gsed --version >/dev/null 2>&1 && echo g)sed
771b6c26008d completely rewritten from scratch as Makefile
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
16
264
01aa6a0e1c9e new macro SHORT_PKG_VERSION which assists in creating download URLs
Volker Grabsch <vog@notjusthosting.com>
parents: 259
diff changeset
17 SHORT_PKG_VERSION = \
01aa6a0e1c9e new macro SHORT_PKG_VERSION which assists in creating download URLs
Volker Grabsch <vog@notjusthosting.com>
parents: 259
diff changeset
18 $(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
19
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
20 PKG_RULES := $(patsubst $(TOP_DIR)/src/%.mk,%,$(wildcard $(TOP_DIR)/src/*.mk))
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
21 include $(TOP_DIR)/src/*.mk
114
771b6c26008d completely rewritten from scratch as Makefile
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
22
120
4edf6a519683 improved coding style
Volker Grabsch <vog@notjusthosting.com>
parents: 119
diff changeset
23 CHECK_ARCHIVE = \
144
aafad5b5de5f bugfix: support the .tgz archive extension in addition to .tar.gz
Volker Grabsch <vog@notjusthosting.com>
parents: 135
diff changeset
24 $(if $(filter %.tgz, $(1)),tar tfz '$(1)' >/dev/null 2>&1, \
114
771b6c26008d completely rewritten from scratch as Makefile
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
25 $(if $(filter %.tar.gz, $(1)),tar tfz '$(1)' >/dev/null 2>&1, \
771b6c26008d completely rewritten from scratch as Makefile
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
26 $(if $(filter %.tar.bz2,$(1)),tar tfj '$(1)' >/dev/null 2>&1, \
771b6c26008d completely rewritten from scratch as Makefile
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
27 $(if $(filter %.zip, $(1)),unzip -t '$(1)' >/dev/null 2>&1, \
144
aafad5b5de5f bugfix: support the .tgz archive extension in addition to .tar.gz
Volker Grabsch <vog@notjusthosting.com>
parents: 135
diff changeset
28 $(error Unknown archive format: $(1))))))
114
771b6c26008d completely rewritten from scratch as Makefile
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
29
120
4edf6a519683 improved coding style
Volker Grabsch <vog@notjusthosting.com>
parents: 119
diff changeset
30 UNPACK_ARCHIVE = \
144
aafad5b5de5f bugfix: support the .tgz archive extension in addition to .tar.gz
Volker Grabsch <vog@notjusthosting.com>
parents: 135
diff changeset
31 $(if $(filter %.tgz, $(1)),tar xvzf '$(1)', \
114
771b6c26008d completely rewritten from scratch as Makefile
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
32 $(if $(filter %.tar.gz, $(1)),tar xvzf '$(1)', \
771b6c26008d completely rewritten from scratch as Makefile
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
33 $(if $(filter %.tar.bz2,$(1)),tar xvjf '$(1)', \
771b6c26008d completely rewritten from scratch as Makefile
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
34 $(if $(filter %.zip, $(1)),unzip '$(1)', \
144
aafad5b5de5f bugfix: support the .tgz archive extension in addition to .tar.gz
Volker Grabsch <vog@notjusthosting.com>
parents: 135
diff changeset
35 $(error Unknown archive format: $(1))))))
114
771b6c26008d completely rewritten from scratch as Makefile
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
36
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
37 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
38 $(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
39
114
771b6c26008d completely rewritten from scratch as Makefile
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
40 DOWNLOAD = \
771b6c26008d completely rewritten from scratch as Makefile
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
41 $(if $(2),wget -t 3 -c '$(1)' || wget -c '$(2)',wget -c '$(1)')
771b6c26008d completely rewritten from scratch as Makefile
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
42
771b6c26008d completely rewritten from scratch as Makefile
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
43 .PHONY: all
771b6c26008d completely rewritten from scratch as Makefile
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
44 all: $(PKG_RULES)
771b6c26008d completely rewritten from scratch as Makefile
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
45
771b6c26008d completely rewritten from scratch as Makefile
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
46 define PKG_RULE
771b6c26008d completely rewritten from scratch as Makefile
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
47 .PHONY: $(1)
172
0d528839039a rename installation markers from 'installed.*' to 'installed-*' to avoid weird file extensions
Volker Grabsch <vog@notjusthosting.com>
parents: 144
diff changeset
48 $(1): $(PREFIX)/installed-$(1)
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
49 $(PREFIX)/installed-$(1): $(TOP_DIR)/src/$(1).mk $(addprefix $(PREFIX)/installed-,$($(1)_DEPS))
134
d24e76675835 bugfix: use -d instead of -z to check for a directory
Volker Grabsch <vog@notjusthosting.com>
parents: 131
diff changeset
50 [ -d '$(PREFIX)' ] || mkdir -p '$(PREFIX)'
d24e76675835 bugfix: use -d instead of -z to check for a directory
Volker Grabsch <vog@notjusthosting.com>
parents: 131
diff changeset
51 [ -d '$(PKG_DIR)' ] || mkdir -p '$(PKG_DIR)'
114
771b6c26008d completely rewritten from scratch as Makefile
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
52 cd '$(PKG_DIR)' && ( \
120
4edf6a519683 improved coding style
Volker Grabsch <vog@notjusthosting.com>
parents: 119
diff changeset
53 $(call CHECK_ARCHIVE,$($(1)_FILE)) || \
114
771b6c26008d completely rewritten from scratch as Makefile
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
54 $(call DOWNLOAD,$($(1)_URL),$($(1)_URL_2)) )
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
55 $(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
56 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
57 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
58 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
59 cd '$(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
60 $$(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
61 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
62 ,)
114
771b6c26008d completely rewritten from scratch as Makefile
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
63 touch '$$@'
771b6c26008d completely rewritten from scratch as Makefile
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
64 endef
771b6c26008d completely rewritten from scratch as Makefile
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
65 $(foreach PKG,$(PKG_RULES),$(eval $(call PKG_RULE,$(PKG),$(call TMP_DIR,$(PKG)))))
771b6c26008d completely rewritten from scratch as Makefile
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
66
122
daa21345aa2a implemented 'make strip'
Volker Grabsch <vog@notjusthosting.com>
parents: 121
diff changeset
67 .PHONY: strip
daa21345aa2a implemented 'make strip'
Volker Grabsch <vog@notjusthosting.com>
parents: 121
diff changeset
68 strip:
daa21345aa2a implemented 'make strip'
Volker Grabsch <vog@notjusthosting.com>
parents: 121
diff changeset
69 rm -rf \
256
f14c13297108 improved quoting
Volker Grabsch <vog@notjusthosting.com>
parents: 255
diff changeset
70 '$(PREFIX)/include' \
f14c13297108 improved quoting
Volker Grabsch <vog@notjusthosting.com>
parents: 255
diff changeset
71 '$(PREFIX)/info' \
f14c13297108 improved quoting
Volker Grabsch <vog@notjusthosting.com>
parents: 255
diff changeset
72 '$(PREFIX)/lib/libiberty.a' \
f14c13297108 improved quoting
Volker Grabsch <vog@notjusthosting.com>
parents: 255
diff changeset
73 '$(PREFIX)/man' \
f14c13297108 improved quoting
Volker Grabsch <vog@notjusthosting.com>
parents: 255
diff changeset
74 '$(PREFIX)/share' \
259
3221273ea6cb remove also the etc/ directory on "make strip"
Volker Grabsch <vog@notjusthosting.com>
parents: 256
diff changeset
75 '$(PREFIX)/$(TARGET)/etc' \
256
f14c13297108 improved quoting
Volker Grabsch <vog@notjusthosting.com>
parents: 255
diff changeset
76 '$(PREFIX)/$(TARGET)/doc' \
f14c13297108 improved quoting
Volker Grabsch <vog@notjusthosting.com>
parents: 255
diff changeset
77 '$(PREFIX)/$(TARGET)/info' \
f14c13297108 improved quoting
Volker Grabsch <vog@notjusthosting.com>
parents: 255
diff changeset
78 '$(PREFIX)/$(TARGET)/lib'/*.def \
f14c13297108 improved quoting
Volker Grabsch <vog@notjusthosting.com>
parents: 255
diff changeset
79 '$(PREFIX)/$(TARGET)/man' \
f14c13297108 improved quoting
Volker Grabsch <vog@notjusthosting.com>
parents: 255
diff changeset
80 '$(PREFIX)/$(TARGET)/sbin' \
f14c13297108 improved quoting
Volker Grabsch <vog@notjusthosting.com>
parents: 255
diff changeset
81 '$(PREFIX)/$(TARGET)/share'
122
daa21345aa2a implemented 'make strip'
Volker Grabsch <vog@notjusthosting.com>
parents: 121
diff changeset
82 -strip -s \
256
f14c13297108 improved quoting
Volker Grabsch <vog@notjusthosting.com>
parents: 255
diff changeset
83 '$(PREFIX)/bin'/* \
f14c13297108 improved quoting
Volker Grabsch <vog@notjusthosting.com>
parents: 255
diff changeset
84 '$(PREFIX)/libexec/gcc/$(TARGET)'/*/* \
f14c13297108 improved quoting
Volker Grabsch <vog@notjusthosting.com>
parents: 255
diff changeset
85 '$(PREFIX)/$(TARGET)/bin'/*
122
daa21345aa2a implemented 'make strip'
Volker Grabsch <vog@notjusthosting.com>
parents: 121
diff changeset
86 -$(TARGET)-strip -g \
256
f14c13297108 improved quoting
Volker Grabsch <vog@notjusthosting.com>
parents: 255
diff changeset
87 '$(PREFIX)/lib/gcc/$(TARGET)'/*/*.a \
f14c13297108 improved quoting
Volker Grabsch <vog@notjusthosting.com>
parents: 255
diff changeset
88 '$(PREFIX)/lib/gcc/$(TARGET)'/*/*.o \
f14c13297108 improved quoting
Volker Grabsch <vog@notjusthosting.com>
parents: 255
diff changeset
89 '$(PREFIX)/$(TARGET)/lib'/*.a \
f14c13297108 improved quoting
Volker Grabsch <vog@notjusthosting.com>
parents: 255
diff changeset
90 '$(PREFIX)/$(TARGET)/lib'/*.o
122
daa21345aa2a implemented 'make strip'
Volker Grabsch <vog@notjusthosting.com>
parents: 121
diff changeset
91
119
ff34f15ec142 improved coding style
Volker Grabsch <vog@notjusthosting.com>
parents: 114
diff changeset
92 .PHONY: clean
ff34f15ec142 improved coding style
Volker Grabsch <vog@notjusthosting.com>
parents: 114
diff changeset
93 clean:
ff34f15ec142 improved coding style
Volker Grabsch <vog@notjusthosting.com>
parents: 114
diff changeset
94 rm -rf $(call TMP_DIR,*) $(PREFIX)/*
ff34f15ec142 improved coding style
Volker Grabsch <vog@notjusthosting.com>
parents: 114
diff changeset
95
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
96 .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
97 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
98 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
99 $(filter-out \
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
100 $(foreach PKG,$(PKG_RULES),$(PKG_DIR)/$($(PKG)_FILE)), \
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
101 $(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
102
119
ff34f15ec142 improved coding style
Volker Grabsch <vog@notjusthosting.com>
parents: 114
diff changeset
103 .PHONY: update
114
771b6c26008d completely rewritten from scratch as Makefile
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
104 define UPDATE
130
d7e4464a369d show status information during 'make update'
Volker Grabsch <vog@notjusthosting.com>
parents: 123
diff changeset
105 $(if $(2), \
d7e4464a369d show status information during 'make update'
Volker Grabsch <vog@notjusthosting.com>
parents: 123
diff changeset
106 $(info $(1): $(2)) \
210
32a6b0a4bf5a on "make update" touch only the *.mk files which have a new version
Volker Grabsch <vog@notjusthosting.com>
parents: 209
diff changeset
107 $(if $(filter $(2),$($(1)_VERSION)), \
32a6b0a4bf5a on "make update" touch only the *.mk files which have a new version
Volker Grabsch <vog@notjusthosting.com>
parents: 209
diff changeset
108 , \
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
109 $(SED) 's/^\([^ ]*_VERSION *:=\).*/\1 $(2)/' -i '$(TOP_DIR)/src/$(1).mk'), \
130
d7e4464a369d show status information during 'make update'
Volker Grabsch <vog@notjusthosting.com>
parents: 123
diff changeset
110 $(error Unable to update version number: $(1)))
114
771b6c26008d completely rewritten from scratch as Makefile
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
111
771b6c26008d completely rewritten from scratch as Makefile
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
112 endef
771b6c26008d completely rewritten from scratch as Makefile
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
113 update:
771b6c26008d completely rewritten from scratch as Makefile
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
114 $(foreach PKG,$(PKG_RULES),$(call UPDATE,$(PKG),$(shell $($(PKG)_UPDATE))))
771b6c26008d completely rewritten from scratch as Makefile
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
115
771b6c26008d completely rewritten from scratch as Makefile
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
116 .PHONY: dist
771b6c26008d completely rewritten from scratch as Makefile
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
117 dist:
771b6c26008d completely rewritten from scratch as Makefile
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
118 rm -rf 'mingw_cross_env-$(VERSION)'
771b6c26008d completely rewritten from scratch as Makefile
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
119 mkdir 'mingw_cross_env-$(VERSION)'
771b6c26008d completely rewritten from scratch as Makefile
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
120 mkdir 'mingw_cross_env-$(VERSION)/doc'
771b6c26008d completely rewritten from scratch as Makefile
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
121 mkdir 'mingw_cross_env-$(VERSION)/src'
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
122 (cd '$(TOP_DIR)' && hg log -v --style changelog) >'mingw_cross_env-$(VERSION)/doc/ChangeLog'
114
771b6c26008d completely rewritten from scratch as Makefile
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
123 ( \
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
124 $(SED) -n '1,/^List/ { s/^\( Version:\).*/\1 $(VERSION)/; p }' '$(TOP_DIR)/doc/README' && \
114
771b6c26008d completely rewritten from scratch as Makefile
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
125 echo '================' && \
771b6c26008d completely rewritten from scratch as Makefile
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
126 echo && \
771b6c26008d completely rewritten from scratch as Makefile
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
127 ($(foreach PKG,$(PKG_RULES),echo '$(PKG)' '$($(PKG)_VERSION)';)) | \
771b6c26008d completely rewritten from scratch as Makefile
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
128 awk '{ printf " %-12s %s\n", $$1, $$2 }' && \
771b6c26008d completely rewritten from scratch as Makefile
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
129 echo && \
771b6c26008d completely rewritten from scratch as Makefile
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
130 echo && \
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
131 $(SED) -n '/^Copyright/,$$ p' '$(TOP_DIR)/doc/README' \
114
771b6c26008d completely rewritten from scratch as Makefile
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
132 ) >'mingw_cross_env-$(VERSION)/doc/README'
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
133 cp -p '$(TOP_DIR)/Makefile' 'mingw_cross_env-$(VERSION)/'
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
134 cp -p '$(TOP_DIR)/src'/*.mk 'mingw_cross_env-$(VERSION)/src/'
114
771b6c26008d completely rewritten from scratch as Makefile
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
135 tar cvf - 'mingw_cross_env-$(VERSION)' | gzip -9 >'mingw_cross_env-$(VERSION).tar.gz'
771b6c26008d completely rewritten from scratch as Makefile
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
136 rm -rf 'mingw_cross_env-$(VERSION)'
771b6c26008d completely rewritten from scratch as Makefile
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
137