Mercurial > mxe-octave
annotate binary-dist-rules.mk @ 3446:f827586fef9c
* binary-dist-rules.mk: don't use $(shell ...) in shell for loop
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Thu, 23 Jan 2014 12:38:21 -0500 |
parents | db18ee645aec |
children | 70b110956a4e |
rev | line source |
---|---|
3431
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
1 |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
2 ifeq ($(STABLE_BUILD),yes) |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
3 OCTAVE_DIST_NAME := octave-$($(OCTAVE_TARGET)_VERSION) |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
4 else |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
5 OCTAVE_DIST_NAME := octave-$(DATE) |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
6 endif |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
7 |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
8 OCTAVE_DIST_DIR := $(TOP_DIR)/dist/$(OCTAVE_DIST_NAME) |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
9 |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
10 OCTAVE_NSI_FILE := $(TOP_DIR)/dist/octave.nsi |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
11 |
3442
ebe73c541a16
allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents:
3435
diff
changeset
|
12 ifeq ($(MXE_WINDOWS_BUILD),yes) |
ebe73c541a16
allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents:
3435
diff
changeset
|
13 WINDOWS_BINARY_DIST_DEPS := \ |
ebe73c541a16
allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents:
3435
diff
changeset
|
14 msys-base \ |
ebe73c541a16
allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents:
3435
diff
changeset
|
15 native-gcc \ |
ebe73c541a16
allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents:
3435
diff
changeset
|
16 native-binutils \ |
ebe73c541a16
allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents:
3435
diff
changeset
|
17 npp |
3431
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
18 endif |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
19 |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
20 BINARY_DIST_DEPS := \ |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
21 $(OCTAVE_TARGET) \ |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
22 octave-forge-packages \ |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
23 units \ |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
24 transfig \ |
3435
9fcc72373e24
build stable-octave package by default
John W. Eaton <jwe@octave.org>
parents:
3433
diff
changeset
|
25 $(WINDOWS_BINARY_DIST_DEPS) |
3431
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
26 |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
27 define delete-dist-directory |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
28 echo "deleting previous dist directory..." |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
29 rm -rf $(TOP_DIR)/dist |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
30 endef |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
31 |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
32 define make-dist-directory |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
33 echo "creating dist directory..." |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
34 mkdir -p $(OCTAVE_DIST_DIR) |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
35 endef |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
36 |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
37 define generate-dist-exclude-list |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
38 echo "generating lists of files to exclude..." |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
39 echo " native files..." |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
40 echo "./$(TARGET)" > $(TOP_DIR)/excluded-native-files |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
41 echo "./bin/$(TARGET)-*.exe" >> $(TOP_DIR)/excluded-native-files |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
42 echo " gcc cross compiler files..." |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
43 cd $(TOP_DIR)/cross-tools/$(HOST_PREFIX) \ |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
44 && find . -type f -o -type l | sed "s,./,," > $(TOP_DIR)/excluded-gcc-files |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
45 endef |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
46 |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
47 define copy-dist-files |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
48 echo "copying files..." |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
49 echo " octave and dependencies..." |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
50 cd $(HOST_PREFIX) \ |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
51 && tar -c -h -X $(TOP_DIR)/excluded-gcc-files -f - . | ( cd $(OCTAVE_DIST_DIR) ; tar xpf - ) |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
52 echo " octaverc file..." |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
53 cp $(TOP_DIR)/build_packages.m $(OCTAVE_DIST_DIR)/src \ |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
54 && cp $(TOP_DIR)/octaverc $(OCTAVE_DIST_DIR)/share/octave/site/m/startup/octaverc |
3442
ebe73c541a16
allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents:
3435
diff
changeset
|
55 echo " build_packages.m..." |
ebe73c541a16
allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents:
3435
diff
changeset
|
56 cp $(TOP_DIR)/build_packages.m $(OCTAVE_DIST_DIR)/src |
ebe73c541a16
allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents:
3435
diff
changeset
|
57 endef |
ebe73c541a16
allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents:
3435
diff
changeset
|
58 |
ebe73c541a16
allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents:
3435
diff
changeset
|
59 ifeq ($(MXE_WINDOWS_BUILD),yes) |
ebe73c541a16
allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents:
3435
diff
changeset
|
60 define copy-windows-dist-files |
3431
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
61 echo " native tools..." |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
62 cd $(TOP_DIR)/native-tools/usr \ |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
63 && tar -c -h -X $(TOP_DIR)/excluded-native-files -f - . | ( cd $(OCTAVE_DIST_DIR) ; tar xpf - ) |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
64 echo " libgcc_s_dw2-1.dll to bin directory" |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
65 cd $(OCTAVE_DIST_DIR) \ |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
66 && cp lib/gcc/i686-pc-mingw32/libgcc_s_dw2-1.dll bin |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
67 echo " msys base files..." |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
68 cd $(TOP_DIR)/msys-base \ |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
69 && tar -c -h -f - . | ( cd $(OCTAVE_DIST_DIR) ; tar xpf - ) |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
70 echo " msys extension files..." |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
71 cd $(TOP_DIR)/msys-extension \ |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
72 && tar -c -h -f - . | ( cd $(OCTAVE_DIST_DIR) ; tar xpf - ) |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
73 echo " notepad++..." |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
74 cd $(TOP_DIR) \ |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
75 && tar -c -h -f - notepad++ | ( cd $(OCTAVE_DIST_DIR) ; tar xpf - ) |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
76 endef |
3442
ebe73c541a16
allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents:
3435
diff
changeset
|
77 endif |
3431
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
78 |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
79 define make-dist-files-writable |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
80 echo "making all dist files writable by user..." |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
81 chmod -R u+w $(OCTAVE_DIST_DIR) |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
82 endef |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
83 |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
84 ifeq ($(STRIP_DIST_FILES),yes) |
3442
ebe73c541a16
allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents:
3435
diff
changeset
|
85 ifeq ($(MXE_WINDOWS_BUILD),yes) |
ebe73c541a16
allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents:
3435
diff
changeset
|
86 define strip-dist-files |
ebe73c541a16
allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents:
3435
diff
changeset
|
87 echo "stripping files..." |
3446
f827586fef9c
* binary-dist-rules.mk: don't use $(shell ...) in shell for loop
John W. Eaton <jwe@octave.org>
parents:
3444
diff
changeset
|
88 for f in `find $(OCTAVE_DIST_DIR) -name '*.dll' -o -name '*.exe'`; do \ |
3442
ebe73c541a16
allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents:
3435
diff
changeset
|
89 $(MXE_STRIP) $$f; \ |
ebe73c541a16
allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents:
3435
diff
changeset
|
90 done |
ebe73c541a16
allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents:
3435
diff
changeset
|
91 endef |
ebe73c541a16
allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents:
3435
diff
changeset
|
92 else |
ebe73c541a16
allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents:
3435
diff
changeset
|
93 define strip-dist-files |
ebe73c541a16
allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents:
3435
diff
changeset
|
94 echo "stripping files..." |
3446
f827586fef9c
* binary-dist-rules.mk: don't use $(shell ...) in shell for loop
John W. Eaton <jwe@octave.org>
parents:
3444
diff
changeset
|
95 for f in `find $(OCTAVE_DIST_DIR) -type f -a -perm /a+x`; do \ |
3442
ebe73c541a16
allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents:
3435
diff
changeset
|
96 case "`file $$f`" in \ |
ebe73c541a16
allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents:
3435
diff
changeset
|
97 *script*) \ |
ebe73c541a16
allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents:
3435
diff
changeset
|
98 ;; \ |
ebe73c541a16
allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents:
3435
diff
changeset
|
99 *executable* | *archive* | *"shared object"*) \ |
ebe73c541a16
allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents:
3435
diff
changeset
|
100 $(MXE_STRIP) $$f; \ |
ebe73c541a16
allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents:
3435
diff
changeset
|
101 ;; \ |
ebe73c541a16
allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents:
3435
diff
changeset
|
102 esac; \ |
ebe73c541a16
allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents:
3435
diff
changeset
|
103 done |
ebe73c541a16
allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents:
3435
diff
changeset
|
104 endef |
ebe73c541a16
allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents:
3435
diff
changeset
|
105 endif |
ebe73c541a16
allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents:
3435
diff
changeset
|
106 else |
ebe73c541a16
allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents:
3435
diff
changeset
|
107 define strip-dist-files |
ebe73c541a16
allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents:
3435
diff
changeset
|
108 echo "not stripping files..." |
ebe73c541a16
allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents:
3435
diff
changeset
|
109 endef |
ebe73c541a16
allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents:
3435
diff
changeset
|
110 endif |
ebe73c541a16
allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents:
3435
diff
changeset
|
111 |
ebe73c541a16
allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents:
3435
diff
changeset
|
112 OCTAVE_WRAPPER_SCRIPTS = octave octave-cli octave-config |
ebe73c541a16
allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents:
3435
diff
changeset
|
113 |
ebe73c541a16
allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents:
3435
diff
changeset
|
114 ifeq ($(MXE_SYSTEM), gnu-linux) |
ebe73c541a16
allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents:
3435
diff
changeset
|
115 define install-octave-wrapper-scripts |
ebe73c541a16
allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents:
3435
diff
changeset
|
116 echo "installing octave wrapper scripts..." |
ebe73c541a16
allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents:
3435
diff
changeset
|
117 for f in $(OCTAVE_WRAPPER_SCRIPTS); do \ |
ebe73c541a16
allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents:
3435
diff
changeset
|
118 mv $(OCTAVE_DIST_DIR)/bin/$$f-$($(OCTAVE_TARGET)_VERSION) \ |
ebe73c541a16
allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents:
3435
diff
changeset
|
119 $(OCTAVE_DIST_DIR)/bin/$$f-$($(OCTAVE_TARGET)_VERSION).real; \ |
ebe73c541a16
allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents:
3435
diff
changeset
|
120 $(SED) < octave-wrapper.in \ |
ebe73c541a16
allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents:
3435
diff
changeset
|
121 -e "s|@OCTAVE_VERSION@|\"$($(OCTAVE_TARGET)_VERSION)\"|" \ |
ebe73c541a16
allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents:
3435
diff
changeset
|
122 -e "s|@GNUPLOT_MAJOR_MINOR_VERSION@|\"$(shell echo $(gnuplot_VERSION) | $(SED) -e 's/\(^[0-9]+\.[0-9]+\)/\1/')\"|" \ |
ebe73c541a16
allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents:
3435
diff
changeset
|
123 -e "s|@PROGRAM_NAME@|\"$$f\"|" > $$f-t \ |
ebe73c541a16
allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents:
3435
diff
changeset
|
124 && mv $$f-t $(OCTAVE_DIST_DIR)/bin/$$f-$($(OCTAVE_TARGET)_VERSION); \ |
3431
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
125 done |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
126 endef |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
127 else |
3442
ebe73c541a16
allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents:
3435
diff
changeset
|
128 define install-octave-wrapper-scripts |
ebe73c541a16
allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents:
3435
diff
changeset
|
129 echo "no octave wrapper scripts to install for this system..." |
3431
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
130 endef |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
131 endif |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
132 |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
133 .PHONY: binary-dist-files |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
134 binary-dist-files: $(BINARY_DIST_DEPS) |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
135 @$(delete-dist-directory) |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
136 @$(make-dist-directory) |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
137 @$(generate-dist-exclude-list) |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
138 @$(copy-dist-files) |
3442
ebe73c541a16
allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents:
3435
diff
changeset
|
139 @$(copy-windows-dist-files) |
3431
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
140 @$(make-dist-files-writable) |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
141 @$(strip-dist-files) |
3442
ebe73c541a16
allow binary dist to work for gnu-linux target
John W. Eaton <jwe@octave.org>
parents:
3435
diff
changeset
|
142 @$(install-octave-wrapper-scripts) |
3431
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
143 |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
144 define make-installer-file |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
145 echo "generating installer script..." |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
146 ./makeinst-script.sh $(OCTAVE_DIST_DIR) $(OCTAVE_NSI_FILE) |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
147 echo "generating installer..." |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
148 $(TARGET)-makensis $(OCTAVE_NSI_FILE) > $(TOP_DIR)/dist/nsis.log |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
149 echo "deleting installer script..." |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
150 rm -f $(OCTAVE_NSI_FILE) |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
151 endef |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
152 |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
153 $(OCTAVE_DIST_NAME)-installer.exe: nsis binary-dist-files |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
154 @$(make-installer-file) |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
155 |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
156 .PHONY: nsis-installer |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
157 nsis-installer: $(OCTAVE_DIST_NAME)-installer.exe |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
158 |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
159 define make-zip-dist |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
160 echo "generating zip file..." |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
161 cd $(TOP_DIR)/dist \ |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
162 && zip -q -9 -r $(OCTAVE_DIST_NAME).zip $(OCTAVE_DIST_NAME) |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
163 endef |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
164 |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
165 .PHONY: zip-dist |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
166 zip-dist: binary-dist-files |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
167 @$(make-zip-dist) |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
168 |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
169 define make-tar-dist |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
170 echo "generating tar file..." |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
171 cd $(TOP_DIR)/dist \ |
3432
5fc3d674ca3a
Correctly name output of dist-tar with .tgz, not .zip, extension.
Rik <rik@octave.org>
parents:
3431
diff
changeset
|
172 && tar -c -z -f $(OCTAVE_DIST_NAME).tgz $(OCTAVE_DIST_NAME) |
3431
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
173 endef |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
174 |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
175 .PHONY: tar-dist |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
176 tar-dist: binary-dist-files |
a7c772aa106f
Move mk-dist script functionality into Makefile.
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
177 @$(make-tar-dist) |