Mercurial > hg > vamp-build-and-test
comparison SCRIPTS/process.sh @ 114:6015c2048c3f
Use friendlier names in packages (e.g. win32 rather than mingw32)
author | Chris Cannam |
---|---|
date | Wed, 09 Sep 2015 10:24:16 +0100 |
parents | dcbcbbc20109 |
children | fdfd5e9f8a77 4d3bba3c0fe7 08f7d7cdf1df |
comparison
equal
deleted
inserted
replaced
113:b107ed308636 | 114:6015c2048c3f |
---|---|
62 platform_arg="$platform_native" | 62 platform_arg="$platform_native" |
63 fi | 63 fi |
64 | 64 |
65 platform= | 65 platform= |
66 platform_defines=("UNUSED_=") # Avoid passing empty arg to make as if target | 66 platform_defines=("UNUSED_=") # Avoid passing empty arg to make as if target |
67 pubtag= | |
67 bits=32 | 68 bits=32 |
68 altbits= | 69 altbits= |
69 toolprefix= | 70 toolprefix= |
70 pluginext= | 71 pluginext= |
71 hostwrapper= | 72 hostwrapper= |
76 sep=":" | 77 sep=":" |
77 | 78 |
78 case "$platform_arg" in | 79 case "$platform_arg" in |
79 linux32) | 80 linux32) |
80 platform=linux | 81 platform=linux |
82 pubtag=linux32 | |
81 if [ "$platform_native" = "linux64" ]; then | 83 if [ "$platform_native" = "linux64" ]; then |
82 toolprefix=x86_64-unknown-linux-gnu- | 84 toolprefix=x86_64-unknown-linux-gnu- |
83 platform_defines=("CXX=${toolprefix}g++ -m32" "CC=${toolprefix}gcc -m32" "LD=${toolprefix}g++ -m32") | 85 platform_defines=("CXX=${toolprefix}g++ -m32" "CC=${toolprefix}gcc -m32" "LD=${toolprefix}g++ -m32") |
84 fi | 86 fi |
85 pluginext=.so | 87 pluginext=.so |
87 identpattern='ELF 32' | 89 identpattern='ELF 32' |
88 ;; | 90 ;; |
89 linux64) | 91 linux64) |
90 platform=linux | 92 platform=linux |
91 bits=64 | 93 bits=64 |
94 pubtag=linux64 | |
92 pluginext=.so | 95 pluginext=.so |
93 valgrind=valgrind | 96 valgrind=valgrind |
94 identpattern='ELF 64' | 97 identpattern='ELF 64' |
95 ;; | 98 ;; |
96 mingw32) | 99 mingw32) |
97 platform=mingw | 100 platform=mingw |
101 pubtag=win32 | |
98 toolprefix=i686-w64-mingw32- | 102 toolprefix=i686-w64-mingw32- |
99 pluginext=.dll | 103 pluginext=.dll |
100 hostwrapper=wine | 104 hostwrapper=wine |
101 hostext=.exe | 105 hostext=.exe |
102 identpattern='PE32.*386.*Windows' | 106 identpattern='PE32.*386.*Windows' |
103 sep=";" | 107 sep=";" |
104 ;; | 108 ;; |
105 mingw64) | 109 mingw64) |
106 platform=mingw | 110 platform=mingw |
107 bits=64 | 111 bits=64 |
112 pubtag=win64 | |
108 altbits=32 # We can usually use a mingw32 Makefile if toolprefix is OK | 113 altbits=32 # We can usually use a mingw32 Makefile if toolprefix is OK |
109 toolprefix=x86_64-w64-mingw32- | 114 toolprefix=x86_64-w64-mingw32- |
110 pluginext=.dll | 115 pluginext=.dll |
111 hostwrapper=wine | 116 hostwrapper=wine |
112 hostext=.exe | 117 hostext=.exe |
113 identpattern='PE32.*x86-64.*Windows' | 118 identpattern='PE32.*x86-64.*Windows' |
114 sep=";" | 119 sep=";" |
115 ;; | 120 ;; |
116 osx32) | 121 osx32) |
117 platform=osx | 122 platform=osx |
123 pubtag=osx32 | |
118 pluginext=.dylib | 124 pluginext=.dylib |
119 archflags="-arch i386" | 125 archflags="-arch i386" |
120 identpattern='Mach-O .*i386' | 126 identpattern='Mach-O .*i386' |
121 ;; | 127 ;; |
122 osx64) | 128 osx64) |
123 platform=osx | 129 platform=osx |
124 bits=64 | 130 bits=64 |
131 pubtag=osx | |
125 pluginext=.dylib | 132 pluginext=.dylib |
126 # This is a difficult choice for various reasons... have to ponder | 133 # This is a difficult choice for various reasons... have to ponder |
127 archflags="-mmacosx-version-min=10.7 -arch x86_64 -arch i386 -stdlib=libc++" | 134 archflags="-mmacosx-version-min=10.7 -arch x86_64 -arch i386 -stdlib=libc++" |
128 identpattern='Mach-O 64-bit .*x86_64' | 135 identpattern='Mach-O 64-bit .*x86_64' |
129 ;; | 136 ;; |
135 shift | 142 shift |
136 | 143 |
137 if [ -z "$platform" ]; then | 144 if [ -z "$platform" ]; then |
138 usage | 145 usage |
139 else | 146 else |
140 echo "(Platform is $platform, $bits bits)" | 147 echo "(Platform is $platform, $bits bits, package platform tag $pubtag)" |
141 fi | 148 fi |
142 | 149 |
143 if [ -z "$pluginext" ]; then | 150 if [ -z "$pluginext" ]; then |
144 echo "Internal error: pluginext not set for platform $platform" 1>&2 | 151 echo "Internal error: pluginext not set for platform $platform" 1>&2 |
145 exit 2 | 152 exit 2 |
590 } | 597 } |
591 | 598 |
592 package() { | 599 package() { |
593 local dir="$1" | 600 local dir="$1" |
594 local id=$(vcs_id "$dir") | 601 local id=$(vcs_id "$dir") |
595 local pstub="$dir-$platform$bits-$id" | 602 local pstub="$dir-$pubtag-$id" |
596 local pdir="$packagedir/$pstub" | 603 local pdir="$packagedir/$pstub" |
597 mkdir -p "$pdir" | 604 mkdir -p "$pdir" |
598 ( cd "$dir" ; | 605 ( cd "$dir" ; |
599 cp -av \ | 606 cp -av \ |
600 *"$pluginext" \ | 607 *"$pluginext" \ |