Changeset 549
- Timestamp:
- May 9, 2019, 10:43:55 PM (6 years ago)
- Location:
- trunk
- Files:
-
- 2 deleted
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Makefile.in
r548 r549 151 151 $(srcsrc)/bignum.c $(srcsrc)/mkhdr.c \ 152 152 $(srcsrc)/samhain_setpwd.c $(srcsrc)/samhain_stealth.c \ 153 $(srcsrc)/encode.c $(srcsrc)/sstrip.c\153 $(srcsrc)/encode.c \ 154 154 $(srcsrc)/trustfile.c $(srcsrc)/exepack.c \ 155 155 $(srcsrc)/exepack_fill.c $(srcsrc)/exepack_mkdata.c \ … … 232 232 #---------------------------------------------------------- 233 233 234 all: $(top_srcdir)/depend.sum $(SETPWD) $(STEGIN) $(SAMHAIN) $(YULECTL) sstrip234 all: $(top_srcdir)/depend.sum $(SETPWD) $(STEGIN) $(SAMHAIN) $(YULECTL) 235 235 236 236 … … 363 363 364 364 CLEANFILES = encode config_xor.h depend-gen \ 365 internal.h sh_MK.h trustfile s strip samhain mkhdr encode cutest \365 internal.h sh_MK.h trustfile samhain mkhdr encode cutest \ 366 366 yule samhain_setpwd samhain_stealth samhainrc yulectl 367 367 … … 515 515 516 516 517 install-program: $(PROGRAMS) sstrip517 install-program: $(PROGRAMS) 518 518 @$(mkinstalldirs) $(DESTDIR)$(sbindir) 519 519 @if test x$(mytmpdir) != x; then \ … … 528 528 $(INSTALL_PROGRAM) $$p $$target; \ 529 529 chmod 0700 $$target; \ 530 echo " ./sstrip $$target"; \531 ./sstrip $$target; \532 530 else \ 533 531 echo " $(INSTALL_SHELL) $$p $$target"; \ … … 840 838 echo $(top_srcdir)/docs/README.gcc_bug >> debian/docs; \ 841 839 echo $(top_srcdir)/docs/README.LZO >> debian/docs; \ 842 echo $(top_srcdir)/docs/README.sstrip >> debian/docs; \843 840 echo $(top_srcdir)/docs/README.UPGRADE >> debian/docs; \ 844 841 echo $(top_srcdir)/docs/README.win2K >> debian/docs; \ … … 860 857 echo " -- $$maintainer `date -R`" >> debian/changelog; \ 861 858 echo >> debian/changelog; \ 862 echo "Local variables:" >> debian/changelog; \863 echo "mode: debian-changelog" >> debian/changelog; \864 echo "End:" >> debian/changelog; \865 859 cp $(top_srcdir)/COPYING debian/copyright; \ 866 860 echo "9" > debian/compat; \ … … 890 884 echo "Priority: optional" >> debian/control; \ 891 885 echo "Maintainer: $$maintainer" >> debian/control; \ 892 echo "Standards-Version: 3.2.1" >> debian/control; \ 886 echo "Build-Depends: debhelper (>> 9)" >> debian/control; \ 887 echo "Standards-Version: 3.9.8" >> debian/control; \ 893 888 echo >> debian/control; \ 894 889 echo "Package: @install_name@" >> debian/control; \ … … 1130 1125 1131 1126 1132 sstrip: $(srcsrc)/sstrip.c Makefile1133 $(BUILD_CC) -I. -o sstrip $(srcsrc)/sstrip.c1134 1135 1127 encode: $(srcsrc)/encode.c Makefile 1136 1128 $(BUILD_CC) -I. -o encode $(srcsrc)/encode.c … … 1259 1251 # prepare the data to be packed 1260 1252 # 1261 exepack.data: $(SAMHAIN) exepack_mkdata sstrip1253 exepack.data: $(SAMHAIN) exepack_mkdata 1262 1254 @echo "cp ./$(SAMHAIN) ./samhain.pk.data"; \ 1263 1255 cp ./$(SAMHAIN) ./samhain.pk.data; \ 1264 1256 echo "strip ./samhain.pk.data"; \ 1265 1257 strip ./samhain.pk.data > /dev/null 2>&1 || echo "... is already stripped"; \ 1266 echo "./sstrip ./samhain.pk.data"; \1267 ./sstrip ./samhain.pk.data > /dev/null 2>&1 || echo "sstrip returned false"; \1268 1258 echo "./exepack_mkdata ./samhain.pk.data ./exepack.data 0"; \ 1269 1259 ./exepack_mkdata ./samhain.pk.data ./exepack.data 0; \ … … 1286 1276 $(LINK) exepack_fill.o minilzo.o 1287 1277 1288 samhain.pk: $(SAMHAIN) exepack exepack_fill sstrip1278 samhain.pk: $(SAMHAIN) exepack exepack_fill 1289 1279 @echo "cp ./$(SAMHAIN) ./samhain.pk.data"; \ 1290 1280 cp ./$(SAMHAIN) ./samhain.pk.data; \ 1291 1281 echo "strip ./samhain.pk.data"; \ 1292 1282 strip ./samhain.pk.data > /dev/null 2>&1 || echo "... is already stripped"; \ 1293 echo "./sstrip ./samhain.pk.data"; \1294 ./sstrip ./samhain.pk.data > /dev/null 2>&1 || echo "sstrip returned false"; \1295 1283 test -f exepack.out && rm exepack.out; \ 1296 1284 echo "./exepack_fill exepack samhain.pk.data exepack.out"; \ … … 1299 1287 echo "strip exepack.out"; \ 1300 1288 strip exepack.out > /dev/null 2>&1 || echo "... is already stripped"; \ 1301 ./sstrip exepack.out > /dev/null 2>&1 || echo "sstrip returned false"; \1302 1289 echo "mv exepack.out samhain.pk"; \ 1303 1290 rm -f samhain.pk; mv exepack.out samhain.pk … … 1673 1660 samhain_stealth.o: $(srcsrc)/samhain_stealth.c Makefile config_xor.h 1674 1661 encode.o: $(srcsrc)/encode.c Makefile 1675 sstrip.o: $(srcsrc)/sstrip.c Makefile config.h1676 1662 trustfile.o: $(srcsrc)/trustfile.c Makefile config_xor.h $(srcinc)/sh_calls.h $(srcinc)/slib.h $(srcinc)/sh_static.h $(srcinc)/sh_pthread.h 1677 1663 exepack.o: $(srcsrc)/exepack.c Makefile config.h $(srcinc)/minilzo.h $(srcinc)/exepack.data -
trunk/config.guess
r481 r549 1 1 #! /bin/sh 2 2 # Attempt to guess a canonical system name. 3 # Copyright 1992-201 4Free Software Foundation, Inc.4 5 timestamp='201 4-03-23'3 # Copyright 1992-2018 Free Software Foundation, Inc. 4 5 timestamp='2018-02-24' 6 6 7 7 # This file is free software; you can redistribute it and/or modify it … … 16 16 # 17 17 # You should have received a copy of the GNU General Public License 18 # along with this program; if not, see <http ://www.gnu.org/licenses/>.18 # along with this program; if not, see <https://www.gnu.org/licenses/>. 19 19 # 20 20 # As a special exception to the GNU General Public License, if you … … 25 25 # of the GNU General Public License, version 3 ("GPLv3"). 26 26 # 27 # Originally written by Per Bothner .27 # Originally written by Per Bothner; maintained since 2000 by Ben Elliston. 28 28 # 29 29 # You can get the latest version of this script from: 30 # http ://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD30 # https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess 31 31 # 32 # Please send patches with a ChangeLog entry to config-patches@gnu.org.32 # Please send patches to <config-patches@gnu.org>. 33 33 34 34 … … 40 40 Output the configuration name of the system \`$me' is run on. 41 41 42 Op eration modes:42 Options: 43 43 -h, --help print this help, then exit 44 44 -t, --time-stamp print date of last modification, then exit … … 51 51 52 52 Originally written by Per Bothner. 53 Copyright 1992-201 4Free Software Foundation, Inc.53 Copyright 1992-2018 Free Software Foundation, Inc. 54 54 55 55 This is free software; see the source for copying conditions. There is NO … … 108 108 tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; 109 109 case $CC_FOR_BUILD,$HOST_CC,$CC in 110 ,,) echo "int x;" > $dummy.c;110 ,,) echo "int x;" > "$dummy.c" ; 111 111 for c in cc gcc c89 c99 ; do 112 if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then112 if ($c -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then 113 113 CC_FOR_BUILD="$c"; break ; 114 114 fi ; … … 133 133 UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown 134 134 135 case "$ {UNAME_SYSTEM}" in135 case "$UNAME_SYSTEM" in 136 136 Linux|GNU|GNU/*) 137 137 # If the system lacks a compiler, then just pick glibc. … … 139 139 LIBC=gnu 140 140 141 eval $set_cc_for_build142 cat <<-EOF > $dummy.c141 eval "$set_cc_for_build" 142 cat <<-EOF > "$dummy.c" 143 143 #include <features.h> 144 144 #if defined(__UCLIBC__) … … 150 150 #endif 151 151 EOF 152 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'` 152 eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`" 153 154 # If ldd exists, use it to detect musl libc. 155 if command -v ldd >/dev/null && \ 156 ldd --version 2>&1 | grep -q ^musl 157 then 158 LIBC=musl 159 fi 153 160 ;; 154 161 esac … … 156 163 # Note: order is significant - the case branches are not exclusive. 157 164 158 case "$ {UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in165 case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in 159 166 *:NetBSD:*:*) 160 167 # NetBSD (nbsd) targets should (where applicable) match one or … … 169 176 # portion of the name. We always set it to "unknown". 170 177 sysctl="sysctl -n hw.machine_arch" 171 UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ 172 /usr/sbin/$sysctl 2>/dev/null || echo unknown)` 173 case "${UNAME_MACHINE_ARCH}" in 178 UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \ 179 "/sbin/$sysctl" 2>/dev/null || \ 180 "/usr/sbin/$sysctl" 2>/dev/null || \ 181 echo unknown)` 182 case "$UNAME_MACHINE_ARCH" in 174 183 armeb) machine=armeb-unknown ;; 175 184 arm*) machine=arm-unknown ;; … … 177 186 sh3eb) machine=sh-unknown ;; 178 187 sh5el) machine=sh5le-unknown ;; 179 *) machine=${UNAME_MACHINE_ARCH}-unknown ;; 188 earmv*) 189 arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'` 190 endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'` 191 machine="${arch}${endian}"-unknown 192 ;; 193 *) machine="$UNAME_MACHINE_ARCH"-unknown ;; 180 194 esac 181 195 # The Operating System including object format, if it has switched 182 # to ELF recently, or will in the future. 183 case "${UNAME_MACHINE_ARCH}" in 196 # to ELF recently (or will in the future) and ABI. 197 case "$UNAME_MACHINE_ARCH" in 198 earm*) 199 os=netbsdelf 200 ;; 184 201 arm*|i386|m68k|ns32k|sh3*|sparc|vax) 185 eval $set_cc_for_build202 eval "$set_cc_for_build" 186 203 if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ 187 204 | grep -q __ELF__ … … 198 215 ;; 199 216 esac 217 # Determine ABI tags. 218 case "$UNAME_MACHINE_ARCH" in 219 earm*) 220 expr='s/^earmv[0-9]/-eabi/;s/eb$//' 221 abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"` 222 ;; 223 esac 200 224 # The OS release 201 225 # Debian GNU/NetBSD machines have a different userland, and … … 203 227 # kernel version information, so it can be replaced with a 204 228 # suitable tag, in the style of linux-gnu. 205 case "$ {UNAME_VERSION}" in229 case "$UNAME_VERSION" in 206 230 Debian*) 207 231 release='-gnu' 208 232 ;; 209 233 *) 210 release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`234 release=`echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2` 211 235 ;; 212 236 esac … … 214 238 # contains redundant information, the shorter form: 215 239 # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. 216 echo "$ {machine}-${os}${release}"240 echo "$machine-${os}${release}${abi}" 217 241 exit ;; 218 242 *:Bitrig:*:*) 219 243 UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` 220 echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE}244 echo "$UNAME_MACHINE_ARCH"-unknown-bitrig"$UNAME_RELEASE" 221 245 exit ;; 222 246 *:OpenBSD:*:*) 223 247 UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` 224 echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} 248 echo "$UNAME_MACHINE_ARCH"-unknown-openbsd"$UNAME_RELEASE" 249 exit ;; 250 *:LibertyBSD:*:*) 251 UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'` 252 echo "$UNAME_MACHINE_ARCH"-unknown-libertybsd"$UNAME_RELEASE" 253 exit ;; 254 *:MidnightBSD:*:*) 255 echo "$UNAME_MACHINE"-unknown-midnightbsd"$UNAME_RELEASE" 225 256 exit ;; 226 257 *:ekkoBSD:*:*) 227 echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}258 echo "$UNAME_MACHINE"-unknown-ekkobsd"$UNAME_RELEASE" 228 259 exit ;; 229 260 *:SolidBSD:*:*) 230 echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}261 echo "$UNAME_MACHINE"-unknown-solidbsd"$UNAME_RELEASE" 231 262 exit ;; 232 263 macppc:MirBSD:*:*) 233 echo powerpc-unknown-mirbsd ${UNAME_RELEASE}264 echo powerpc-unknown-mirbsd"$UNAME_RELEASE" 234 265 exit ;; 235 266 *:MirBSD:*:*) 236 echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} 237 exit ;; 267 echo "$UNAME_MACHINE"-unknown-mirbsd"$UNAME_RELEASE" 268 exit ;; 269 *:Sortix:*:*) 270 echo "$UNAME_MACHINE"-unknown-sortix 271 exit ;; 272 *:Redox:*:*) 273 echo "$UNAME_MACHINE"-unknown-redox 274 exit ;; 275 mips:OSF1:*.*) 276 echo mips-dec-osf1 277 exit ;; 238 278 alpha:OSF1:*:*) 239 279 case $UNAME_RELEASE in … … 252 292 case "$ALPHA_CPU_TYPE" in 253 293 "EV4 (21064)") 254 UNAME_MACHINE= "alpha";;294 UNAME_MACHINE=alpha ;; 255 295 "EV4.5 (21064)") 256 UNAME_MACHINE= "alpha";;296 UNAME_MACHINE=alpha ;; 257 297 "LCA4 (21066/21068)") 258 UNAME_MACHINE= "alpha";;298 UNAME_MACHINE=alpha ;; 259 299 "EV5 (21164)") 260 UNAME_MACHINE= "alphaev5";;300 UNAME_MACHINE=alphaev5 ;; 261 301 "EV5.6 (21164A)") 262 UNAME_MACHINE= "alphaev56";;302 UNAME_MACHINE=alphaev56 ;; 263 303 "EV5.6 (21164PC)") 264 UNAME_MACHINE= "alphapca56";;304 UNAME_MACHINE=alphapca56 ;; 265 305 "EV5.7 (21164PC)") 266 UNAME_MACHINE= "alphapca57";;306 UNAME_MACHINE=alphapca57 ;; 267 307 "EV6 (21264)") 268 UNAME_MACHINE= "alphaev6";;308 UNAME_MACHINE=alphaev6 ;; 269 309 "EV6.7 (21264A)") 270 UNAME_MACHINE= "alphaev67";;310 UNAME_MACHINE=alphaev67 ;; 271 311 "EV6.8CB (21264C)") 272 UNAME_MACHINE= "alphaev68";;312 UNAME_MACHINE=alphaev68 ;; 273 313 "EV6.8AL (21264B)") 274 UNAME_MACHINE= "alphaev68";;314 UNAME_MACHINE=alphaev68 ;; 275 315 "EV6.8CX (21264D)") 276 UNAME_MACHINE= "alphaev68";;316 UNAME_MACHINE=alphaev68 ;; 277 317 "EV6.9A (21264/EV69A)") 278 UNAME_MACHINE= "alphaev69";;318 UNAME_MACHINE=alphaev69 ;; 279 319 "EV7 (21364)") 280 UNAME_MACHINE= "alphaev7";;320 UNAME_MACHINE=alphaev7 ;; 281 321 "EV7.9 (21364A)") 282 UNAME_MACHINE= "alphaev79";;322 UNAME_MACHINE=alphaev79 ;; 283 323 esac 284 324 # A Pn.n version is a patched version. … … 287 327 # A Xn.n version is an unreleased experimental baselevel. 288 328 # 1.2 uses "1.2" for uname -r. 289 echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`329 echo "$UNAME_MACHINE"-dec-osf"`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`" 290 330 # Reset EXIT trap before exiting to avoid spurious non-zero exit code. 291 331 exitcode=$? 292 332 trap '' 0 293 333 exit $exitcode ;; 294 Alpha\ *:Windows_NT*:*)295 # How do we know it's Interix rather than the generic POSIX subsystem?296 # Should we change UNAME_MACHINE based on the output of uname instead297 # of the specific Alpha model?298 echo alpha-pc-interix299 exit ;;300 21064:Windows_NT:50:3)301 echo alpha-dec-winnt3.5302 exit ;;303 334 Amiga*:UNIX_System_V:4.0:*) 304 335 echo m68k-unknown-sysv4 305 336 exit ;; 306 337 *:[Aa]miga[Oo][Ss]:*:*) 307 echo ${UNAME_MACHINE}-unknown-amigaos338 echo "$UNAME_MACHINE"-unknown-amigaos 308 339 exit ;; 309 340 *:[Mm]orph[Oo][Ss]:*:*) 310 echo ${UNAME_MACHINE}-unknown-morphos341 echo "$UNAME_MACHINE"-unknown-morphos 311 342 exit ;; 312 343 *:OS/390:*:*) … … 320 351 exit ;; 321 352 arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) 322 echo arm-acorn-riscix ${UNAME_RELEASE}353 echo arm-acorn-riscix"$UNAME_RELEASE" 323 354 exit ;; 324 355 arm*:riscos:*:*|arm*:RISCOS:*:*) … … 347 378 esac ;; 348 379 s390x:SunOS:*:*) 349 echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`380 echo "$UNAME_MACHINE"-ibm-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`" 350 381 exit ;; 351 382 sun4H:SunOS:5.*:*) 352 echo sparc-hal-solaris2 `echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`383 echo sparc-hal-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" 353 384 exit ;; 354 385 sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) 355 echo sparc-sun-solaris2 `echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`386 echo sparc-sun-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`" 356 387 exit ;; 357 388 i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) 358 echo i386-pc-auroraux ${UNAME_RELEASE}389 echo i386-pc-auroraux"$UNAME_RELEASE" 359 390 exit ;; 360 391 i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) 361 eval $set_cc_for_build362 SUN_ARCH= "i386"392 eval "$set_cc_for_build" 393 SUN_ARCH=i386 363 394 # If there is a compiler, see if it is configured for 64-bit objects. 364 395 # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. 365 396 # This test works for both compilers. 366 if [ "$CC_FOR_BUILD" != 'no_compiler_found']; then397 if [ "$CC_FOR_BUILD" != no_compiler_found ]; then 367 398 if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ 368 (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \399 (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ 369 400 grep IS_64BIT_ARCH >/dev/null 370 401 then 371 SUN_ARCH= "x86_64"402 SUN_ARCH=x86_64 372 403 fi 373 404 fi 374 echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`405 echo "$SUN_ARCH"-pc-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" 375 406 exit ;; 376 407 sun4*:SunOS:6*:*) … … 378 409 # SunOS6. Hard to guess exactly what SunOS6 will be like, but 379 410 # it's likely to be more like Solaris than SunOS4. 380 echo sparc-sun-solaris3 `echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`411 echo sparc-sun-solaris3"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" 381 412 exit ;; 382 413 sun4*:SunOS:*:*) … … 387 418 esac 388 419 # Japanese Language versions have a version number like `4.1.3-JL'. 389 echo sparc-sun-sunos `echo ${UNAME_RELEASE}|sed -e 's/-/_/'`420 echo sparc-sun-sunos"`echo "$UNAME_RELEASE"|sed -e 's/-/_/'`" 390 421 exit ;; 391 422 sun3*:SunOS:*:*) 392 echo m68k-sun-sunos ${UNAME_RELEASE}423 echo m68k-sun-sunos"$UNAME_RELEASE" 393 424 exit ;; 394 425 sun*:*:4.2BSD:*) 395 426 UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` 396 test "x$ {UNAME_RELEASE}" = "x"&& UNAME_RELEASE=3427 test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3 397 428 case "`/bin/arch`" in 398 429 sun3) 399 echo m68k-sun-sunos ${UNAME_RELEASE}430 echo m68k-sun-sunos"$UNAME_RELEASE" 400 431 ;; 401 432 sun4) 402 echo sparc-sun-sunos ${UNAME_RELEASE}433 echo sparc-sun-sunos"$UNAME_RELEASE" 403 434 ;; 404 435 esac 405 436 exit ;; 406 437 aushp:SunOS:*:*) 407 echo sparc-auspex-sunos ${UNAME_RELEASE}438 echo sparc-auspex-sunos"$UNAME_RELEASE" 408 439 exit ;; 409 440 # The situation for MiNT is a little confusing. The machine name … … 416 447 # be no problem. 417 448 atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) 418 echo m68k-atari-mint ${UNAME_RELEASE}449 echo m68k-atari-mint"$UNAME_RELEASE" 419 450 exit ;; 420 451 atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) 421 echo m68k-atari-mint ${UNAME_RELEASE}452 echo m68k-atari-mint"$UNAME_RELEASE" 422 453 exit ;; 423 454 *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) 424 echo m68k-atari-mint ${UNAME_RELEASE}455 echo m68k-atari-mint"$UNAME_RELEASE" 425 456 exit ;; 426 457 milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) 427 echo m68k-milan-mint ${UNAME_RELEASE}458 echo m68k-milan-mint"$UNAME_RELEASE" 428 459 exit ;; 429 460 hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) 430 echo m68k-hades-mint ${UNAME_RELEASE}461 echo m68k-hades-mint"$UNAME_RELEASE" 431 462 exit ;; 432 463 *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) 433 echo m68k-unknown-mint ${UNAME_RELEASE}464 echo m68k-unknown-mint"$UNAME_RELEASE" 434 465 exit ;; 435 466 m68k:machten:*:*) 436 echo m68k-apple-machten ${UNAME_RELEASE}467 echo m68k-apple-machten"$UNAME_RELEASE" 437 468 exit ;; 438 469 powerpc:machten:*:*) 439 echo powerpc-apple-machten ${UNAME_RELEASE}470 echo powerpc-apple-machten"$UNAME_RELEASE" 440 471 exit ;; 441 472 RISC*:Mach:*:*) … … 443 474 exit ;; 444 475 RISC*:ULTRIX:*:*) 445 echo mips-dec-ultrix ${UNAME_RELEASE}476 echo mips-dec-ultrix"$UNAME_RELEASE" 446 477 exit ;; 447 478 VAX*:ULTRIX*:*:*) 448 echo vax-dec-ultrix ${UNAME_RELEASE}479 echo vax-dec-ultrix"$UNAME_RELEASE" 449 480 exit ;; 450 481 2020:CLIX:*:* | 2430:CLIX:*:*) 451 echo clipper-intergraph-clix ${UNAME_RELEASE}482 echo clipper-intergraph-clix"$UNAME_RELEASE" 452 483 exit ;; 453 484 mips:*:*:UMIPS | mips:*:*:RISCos) 454 eval $set_cc_for_build455 sed 's/^ //' << EOF > $dummy.c485 eval "$set_cc_for_build" 486 sed 's/^ //' << EOF > "$dummy.c" 456 487 #ifdef __cplusplus 457 488 #include <stdio.h> /* for printf() prototype */ … … 462 493 #if defined (host_mips) && defined (MIPSEB) 463 494 #if defined (SYSTYPE_SYSV) 464 printf ("mips-mips-riscos%ssysv\ n", argv[1]); exit (0);495 printf ("mips-mips-riscos%ssysv\\n", argv[1]); exit (0); 465 496 #endif 466 497 #if defined (SYSTYPE_SVR4) 467 printf ("mips-mips-riscos%ssvr4\ n", argv[1]); exit (0);498 printf ("mips-mips-riscos%ssvr4\\n", argv[1]); exit (0); 468 499 #endif 469 500 #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) 470 printf ("mips-mips-riscos%sbsd\ n", argv[1]); exit (0);501 printf ("mips-mips-riscos%sbsd\\n", argv[1]); exit (0); 471 502 #endif 472 503 #endif … … 474 505 } 475 506 EOF 476 $CC_FOR_BUILD -o $dummy $dummy.c&&477 dummyarg=`echo "$ {UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&478 SYSTEM_NAME=` $dummy $dummyarg` &&507 $CC_FOR_BUILD -o "$dummy" "$dummy.c" && 508 dummyarg=`echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p'` && 509 SYSTEM_NAME=`"$dummy" "$dummyarg"` && 479 510 { echo "$SYSTEM_NAME"; exit; } 480 echo mips-mips-riscos ${UNAME_RELEASE}511 echo mips-mips-riscos"$UNAME_RELEASE" 481 512 exit ;; 482 513 Motorola:PowerMAX_OS:*:*) … … 504 535 # DG/UX returns AViiON for all architectures 505 536 UNAME_PROCESSOR=`/usr/bin/uname -p` 506 if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR= mc88110 ]537 if [ "$UNAME_PROCESSOR" = mc88100 ] || [ "$UNAME_PROCESSOR" = mc88110 ] 507 538 then 508 if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \509 [ ${TARGET_BINARY_INTERFACE}x = x ]539 if [ "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx ] || \ 540 [ "$TARGET_BINARY_INTERFACE"x = x ] 510 541 then 511 echo m88k-dg-dgux ${UNAME_RELEASE}542 echo m88k-dg-dgux"$UNAME_RELEASE" 512 543 else 513 echo m88k-dg-dguxbcs ${UNAME_RELEASE}544 echo m88k-dg-dguxbcs"$UNAME_RELEASE" 514 545 fi 515 546 else 516 echo i586-dg-dgux ${UNAME_RELEASE}547 echo i586-dg-dgux"$UNAME_RELEASE" 517 548 fi 518 549 exit ;; … … 531 562 exit ;; 532 563 *:IRIX*:*:*) 533 echo mips-sgi-irix `echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`564 echo mips-sgi-irix"`echo "$UNAME_RELEASE"|sed -e 's/-/_/g'`" 534 565 exit ;; 535 566 ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. … … 543 574 IBM_REV=`/usr/bin/oslevel` 544 575 else 545 IBM_REV= ${UNAME_VERSION}.${UNAME_RELEASE}546 fi 547 echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}576 IBM_REV="$UNAME_VERSION.$UNAME_RELEASE" 577 fi 578 echo "$UNAME_MACHINE"-ibm-aix"$IBM_REV" 548 579 exit ;; 549 580 *:AIX:2:3) 550 581 if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then 551 eval $set_cc_for_build552 sed 's/^ //' << EOF > $dummy.c582 eval "$set_cc_for_build" 583 sed 's/^ //' << EOF > "$dummy.c" 553 584 #include <sys/systemcfg.h> 554 585 … … 561 592 } 562 593 EOF 563 if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`594 if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` 564 595 then 565 596 echo "$SYSTEM_NAME" … … 575 606 *:AIX:*:[4567]) 576 607 IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` 577 if /usr/sbin/lsattr -El ${IBM_CPU_ID}| grep ' POWER' >/dev/null 2>&1; then608 if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then 578 609 IBM_ARCH=rs6000 579 610 else 580 611 IBM_ARCH=powerpc 581 612 fi 582 if [ -x /usr/bin/oslevel ] ; then 583 IBM_REV=`/usr/bin/oslevel` 613 if [ -x /usr/bin/lslpp ] ; then 614 IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | 615 awk -F: '{ print $3 }' | sed s/[0-9]*$/0/` 584 616 else 585 IBM_REV= ${UNAME_VERSION}.${UNAME_RELEASE}586 fi 587 echo ${IBM_ARCH}-ibm-aix${IBM_REV}617 IBM_REV="$UNAME_VERSION.$UNAME_RELEASE" 618 fi 619 echo "$IBM_ARCH"-ibm-aix"$IBM_REV" 588 620 exit ;; 589 621 *:AIX:*:*) 590 622 echo rs6000-ibm-aix 591 623 exit ;; 592 ibmrt:4.4BSD:*|romp-ibm: BSD:*)624 ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*) 593 625 echo romp-ibm-bsd4.4 594 626 exit ;; 595 627 ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and 596 echo romp-ibm-bsd ${UNAME_RELEASE}# 4.3 with uname added to628 echo romp-ibm-bsd"$UNAME_RELEASE" # 4.3 with uname added to 597 629 exit ;; # report: romp-ibm BSD 4.3 598 630 *:BOSX:*:*) … … 609 641 exit ;; 610 642 9000/[34678]??:HP-UX:*:*) 611 HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`612 case "$ {UNAME_MACHINE}" in613 9000/31? 614 9000/[34]?? 643 HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'` 644 case "$UNAME_MACHINE" in 645 9000/31?) HP_ARCH=m68000 ;; 646 9000/[34]??) HP_ARCH=m68k ;; 615 647 9000/[678][0-9][0-9]) 616 648 if [ -x /usr/bin/getconf ]; then 617 649 sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` 618 650 sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` 619 case "$ {sc_cpu_version}" in620 523) HP_ARCH= "hppa1.0";; # CPU_PA_RISC1_0621 528) HP_ARCH= "hppa1.1";; # CPU_PA_RISC1_1651 case "$sc_cpu_version" in 652 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0 653 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1 622 654 532) # CPU_PA_RISC2_0 623 case "$ {sc_kernel_bits}" in624 32) HP_ARCH= "hppa2.0n";;625 64) HP_ARCH= "hppa2.0w";;626 '') HP_ARCH= "hppa2.0";; # HP-UX 10.20655 case "$sc_kernel_bits" in 656 32) HP_ARCH=hppa2.0n ;; 657 64) HP_ARCH=hppa2.0w ;; 658 '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20 627 659 esac ;; 628 660 esac 629 661 fi 630 if [ "$ {HP_ARCH}" = "" ]; then631 eval $set_cc_for_build632 sed 's/^ //' << EOF > $dummy.c662 if [ "$HP_ARCH" = "" ]; then 663 eval "$set_cc_for_build" 664 sed 's/^ //' << EOF > "$dummy.c" 633 665 634 666 #define _HPUX_SOURCE … … 663 695 } 664 696 EOF 665 (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`697 (CCOPTS="" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && HP_ARCH=`"$dummy"` 666 698 test -z "$HP_ARCH" && HP_ARCH=hppa 667 699 fi ;; 668 700 esac 669 if [ ${HP_ARCH} = "hppa2.0w"]701 if [ "$HP_ARCH" = hppa2.0w ] 670 702 then 671 eval $set_cc_for_build703 eval "$set_cc_for_build" 672 704 673 705 # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating … … 680 712 # => hppa64-hp-hpux11.23 681 713 682 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |714 if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | 683 715 grep -q __LP64__ 684 716 then 685 HP_ARCH= "hppa2.0w"717 HP_ARCH=hppa2.0w 686 718 else 687 HP_ARCH= "hppa64"719 HP_ARCH=hppa64 688 720 fi 689 721 fi 690 echo ${HP_ARCH}-hp-hpux${HPUX_REV}722 echo "$HP_ARCH"-hp-hpux"$HPUX_REV" 691 723 exit ;; 692 724 ia64:HP-UX:*:*) 693 HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`694 echo ia64-hp-hpux ${HPUX_REV}725 HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'` 726 echo ia64-hp-hpux"$HPUX_REV" 695 727 exit ;; 696 728 3050*:HI-UX:*:*) 697 eval $set_cc_for_build698 sed 's/^ //' << EOF > $dummy.c729 eval "$set_cc_for_build" 730 sed 's/^ //' << EOF > "$dummy.c" 699 731 #include <unistd.h> 700 732 int … … 721 753 } 722 754 EOF 723 $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&755 $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` && 724 756 { echo "$SYSTEM_NAME"; exit; } 725 757 echo unknown-hitachi-hiuxwe2 726 758 exit ;; 727 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* 759 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*) 728 760 echo hppa1.1-hp-bsd 729 761 exit ;; … … 734 766 echo hppa1.0-hp-mpeix 735 767 exit ;; 736 hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* 768 hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*) 737 769 echo hppa1.1-hp-osf 738 770 exit ;; … … 742 774 i*86:OSF1:*:*) 743 775 if [ -x /usr/sbin/sysversion ] ; then 744 echo ${UNAME_MACHINE}-unknown-osf1mk776 echo "$UNAME_MACHINE"-unknown-osf1mk 745 777 else 746 echo ${UNAME_MACHINE}-unknown-osf1778 echo "$UNAME_MACHINE"-unknown-osf1 747 779 fi 748 780 exit ;; … … 769 801 exit ;; 770 802 CRAY*Y-MP:*:*:*) 771 echo ymp-cray-unicos ${UNAME_RELEASE}| sed -e 's/\.[^.]*$/.X/'803 echo ymp-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' 772 804 exit ;; 773 805 CRAY*[A-Z]90:*:*:*) 774 echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE}\806 echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \ 775 807 | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ 776 808 -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ … … 778 810 exit ;; 779 811 CRAY*TS:*:*:*) 780 echo t90-cray-unicos ${UNAME_RELEASE}| sed -e 's/\.[^.]*$/.X/'812 echo t90-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' 781 813 exit ;; 782 814 CRAY*T3E:*:*:*) 783 echo alphaev5-cray-unicosmk ${UNAME_RELEASE}| sed -e 's/\.[^.]*$/.X/'815 echo alphaev5-cray-unicosmk"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' 784 816 exit ;; 785 817 CRAY*SV1:*:*:*) 786 echo sv1-cray-unicos ${UNAME_RELEASE}| sed -e 's/\.[^.]*$/.X/'818 echo sv1-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' 787 819 exit ;; 788 820 *:UNICOS/mp:*:*) 789 echo craynv-cray-unicosmp ${UNAME_RELEASE}| sed -e 's/\.[^.]*$/.X/'821 echo craynv-cray-unicosmp"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' 790 822 exit ;; 791 823 F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) 792 FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`793 FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'| sed -e 's/\///'`794 FUJITSU_REL=`echo ${UNAME_RELEASE}| sed -e 's/ /_/'`824 FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` 825 FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` 826 FUJITSU_REL=`echo "$UNAME_RELEASE" | sed -e 's/ /_/'` 795 827 echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" 796 828 exit ;; 797 829 5000:UNIX_System_V:4.*:*) 798 FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'| sed -e 's/\///'`799 FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'| sed -e 's/ /_/'`830 FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` 831 FUJITSU_REL=`echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'` 800 832 echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" 801 833 exit ;; 802 834 i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) 803 echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}835 echo "$UNAME_MACHINE"-pc-bsdi"$UNAME_RELEASE" 804 836 exit ;; 805 837 sparc*:BSD/OS:*:*) 806 echo sparc-unknown-bsdi ${UNAME_RELEASE}838 echo sparc-unknown-bsdi"$UNAME_RELEASE" 807 839 exit ;; 808 840 *:BSD/OS:*:*) 809 echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}841 echo "$UNAME_MACHINE"-unknown-bsdi"$UNAME_RELEASE" 810 842 exit ;; 811 843 *:FreeBSD:*:*) 812 844 UNAME_PROCESSOR=`/usr/bin/uname -p` 813 case ${UNAME_PROCESSOR}in845 case "$UNAME_PROCESSOR" in 814 846 amd64) 815 echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`;;816 *)817 echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`;;847 UNAME_PROCESSOR=x86_64 ;; 848 i386) 849 UNAME_PROCESSOR=i586 ;; 818 850 esac 851 echo "$UNAME_PROCESSOR"-unknown-freebsd"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`" 819 852 exit ;; 820 853 i*:CYGWIN*:*) 821 echo ${UNAME_MACHINE}-pc-cygwin854 echo "$UNAME_MACHINE"-pc-cygwin 822 855 exit ;; 823 856 *:MINGW64*:*) 824 echo ${UNAME_MACHINE}-pc-mingw64857 echo "$UNAME_MACHINE"-pc-mingw64 825 858 exit ;; 826 859 *:MINGW*:*) 827 echo ${UNAME_MACHINE}-pc-mingw32860 echo "$UNAME_MACHINE"-pc-mingw32 828 861 exit ;; 829 862 *:MSYS*:*) 830 echo ${UNAME_MACHINE}-pc-msys 831 exit ;; 832 i*:windows32*:*) 833 # uname -m includes "-pc" on this system. 834 echo ${UNAME_MACHINE}-mingw32 863 echo "$UNAME_MACHINE"-pc-msys 835 864 exit ;; 836 865 i*:PW*:*) 837 echo ${UNAME_MACHINE}-pc-pw32866 echo "$UNAME_MACHINE"-pc-pw32 838 867 exit ;; 839 868 *:Interix*:*) 840 case ${UNAME_MACHINE}in869 case "$UNAME_MACHINE" in 841 870 x86) 842 echo i586-pc-interix ${UNAME_RELEASE}871 echo i586-pc-interix"$UNAME_RELEASE" 843 872 exit ;; 844 873 authenticamd | genuineintel | EM64T) 845 echo x86_64-unknown-interix ${UNAME_RELEASE}874 echo x86_64-unknown-interix"$UNAME_RELEASE" 846 875 exit ;; 847 876 IA64) 848 echo ia64-unknown-interix ${UNAME_RELEASE}877 echo ia64-unknown-interix"$UNAME_RELEASE" 849 878 exit ;; 850 879 esac ;; 851 [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)852 echo i${UNAME_MACHINE}-pc-mks853 exit ;;854 8664:Windows_NT:*)855 echo x86_64-pc-mks856 exit ;;857 i*:Windows_NT*:* | Pentium*:Windows_NT*:*)858 # How do we know it's Interix rather than the generic POSIX subsystem?859 # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we860 # UNAME_MACHINE based on the output of uname instead of i386?861 echo i586-pc-interix862 exit ;;863 880 i*:UWIN*:*) 864 echo ${UNAME_MACHINE}-pc-uwin881 echo "$UNAME_MACHINE"-pc-uwin 865 882 exit ;; 866 883 amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) 867 884 echo x86_64-unknown-cygwin 868 885 exit ;; 869 p*:CYGWIN*:*)870 echo powerpcle-unknown-cygwin871 exit ;;872 886 prep*:SunOS:5.*:*) 873 echo powerpcle-unknown-solaris2 `echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`887 echo powerpcle-unknown-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" 874 888 exit ;; 875 889 *:GNU:*:*) 876 890 # the GNU system 877 echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`891 echo "`echo "$UNAME_MACHINE"|sed -e 's,[-/].*$,,'`-unknown-$LIBC`echo "$UNAME_RELEASE"|sed -e 's,/.*$,,'`" 878 892 exit ;; 879 893 *:GNU/*:*:*) 880 894 # other systems with GNU libc and userland 881 echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}895 echo "$UNAME_MACHINE-unknown-`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`-$LIBC" 882 896 exit ;; 883 897 i*86:Minix:*:*) 884 echo ${UNAME_MACHINE}-pc-minix898 echo "$UNAME_MACHINE"-pc-minix 885 899 exit ;; 886 900 aarch64:Linux:*:*) 887 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}901 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" 888 902 exit ;; 889 903 aarch64_be:Linux:*:*) 890 904 UNAME_MACHINE=aarch64_be 891 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}905 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" 892 906 exit ;; 893 907 alpha:Linux:*:*) … … 902 916 esac 903 917 objdump --private-headers /bin/sh | grep -q ld.so.1 904 if test "$?" = 0 ; then LIBC= "gnulibc1"; fi905 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}918 if test "$?" = 0 ; then LIBC=gnulibc1 ; fi 919 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" 906 920 exit ;; 907 921 arc:Linux:*:* | arceb:Linux:*:*) 908 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}922 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" 909 923 exit ;; 910 924 arm*:Linux:*:*) 911 eval $set_cc_for_build925 eval "$set_cc_for_build" 912 926 if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ 913 927 | grep -q __ARM_EABI__ 914 928 then 915 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}929 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" 916 930 else 917 931 if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ 918 932 | grep -q __ARM_PCS_VFP 919 933 then 920 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi934 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabi 921 935 else 922 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf936 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabihf 923 937 fi 924 938 fi 925 939 exit ;; 926 940 avr32*:Linux:*:*) 927 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}941 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" 928 942 exit ;; 929 943 cris:Linux:*:*) 930 echo ${UNAME_MACHINE}-axis-linux-${LIBC}944 echo "$UNAME_MACHINE"-axis-linux-"$LIBC" 931 945 exit ;; 932 946 crisv32:Linux:*:*) 933 echo ${UNAME_MACHINE}-axis-linux-${LIBC} 947 echo "$UNAME_MACHINE"-axis-linux-"$LIBC" 948 exit ;; 949 e2k:Linux:*:*) 950 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" 934 951 exit ;; 935 952 frv:Linux:*:*) 936 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}953 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" 937 954 exit ;; 938 955 hexagon:Linux:*:*) 939 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}956 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" 940 957 exit ;; 941 958 i*86:Linux:*:*) 942 echo ${UNAME_MACHINE}-pc-linux-${LIBC}959 echo "$UNAME_MACHINE"-pc-linux-"$LIBC" 943 960 exit ;; 944 961 ia64:Linux:*:*) 945 echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 962 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" 963 exit ;; 964 k1om:Linux:*:*) 965 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" 946 966 exit ;; 947 967 m32r*:Linux:*:*) 948 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}968 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" 949 969 exit ;; 950 970 m68*:Linux:*:*) 951 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}971 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" 952 972 exit ;; 953 973 mips:Linux:*:* | mips64:Linux:*:*) 954 eval $set_cc_for_build955 sed 's/^ //' << EOF > $dummy.c974 eval "$set_cc_for_build" 975 sed 's/^ //' << EOF > "$dummy.c" 956 976 #undef CPU 957 977 #undef ${UNAME_MACHINE} … … 967 987 #endif 968 988 EOF 969 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`970 test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }989 eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU'`" 990 test "x$CPU" != x && { echo "$CPU-unknown-linux-$LIBC"; exit; } 971 991 ;; 992 mips64el:Linux:*:*) 993 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" 994 exit ;; 972 995 openrisc*:Linux:*:*) 973 echo or1k-unknown-linux- ${LIBC}996 echo or1k-unknown-linux-"$LIBC" 974 997 exit ;; 975 998 or32:Linux:*:* | or1k*:Linux:*:*) 976 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}999 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" 977 1000 exit ;; 978 1001 padre:Linux:*:*) 979 echo sparc-unknown-linux- ${LIBC}1002 echo sparc-unknown-linux-"$LIBC" 980 1003 exit ;; 981 1004 parisc64:Linux:*:* | hppa64:Linux:*:*) 982 echo hppa64-unknown-linux- ${LIBC}1005 echo hppa64-unknown-linux-"$LIBC" 983 1006 exit ;; 984 1007 parisc:Linux:*:* | hppa:Linux:*:*) 985 1008 # Look for CPU level 986 1009 case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in 987 PA7*) echo hppa1.1-unknown-linux- ${LIBC};;988 PA8*) echo hppa2.0-unknown-linux- ${LIBC};;989 *) echo hppa-unknown-linux- ${LIBC};;1010 PA7*) echo hppa1.1-unknown-linux-"$LIBC" ;; 1011 PA8*) echo hppa2.0-unknown-linux-"$LIBC" ;; 1012 *) echo hppa-unknown-linux-"$LIBC" ;; 990 1013 esac 991 1014 exit ;; 992 1015 ppc64:Linux:*:*) 993 echo powerpc64-unknown-linux- ${LIBC}1016 echo powerpc64-unknown-linux-"$LIBC" 994 1017 exit ;; 995 1018 ppc:Linux:*:*) 996 echo powerpc-unknown-linux- ${LIBC}1019 echo powerpc-unknown-linux-"$LIBC" 997 1020 exit ;; 998 1021 ppc64le:Linux:*:*) 999 echo powerpc64le-unknown-linux- ${LIBC}1022 echo powerpc64le-unknown-linux-"$LIBC" 1000 1023 exit ;; 1001 1024 ppcle:Linux:*:*) 1002 echo powerpcle-unknown-linux-${LIBC} 1025 echo powerpcle-unknown-linux-"$LIBC" 1026 exit ;; 1027 riscv32:Linux:*:* | riscv64:Linux:*:*) 1028 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" 1003 1029 exit ;; 1004 1030 s390:Linux:*:* | s390x:Linux:*:*) 1005 echo ${UNAME_MACHINE}-ibm-linux-${LIBC}1031 echo "$UNAME_MACHINE"-ibm-linux-"$LIBC" 1006 1032 exit ;; 1007 1033 sh64*:Linux:*:*) 1008 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}1034 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" 1009 1035 exit ;; 1010 1036 sh*:Linux:*:*) 1011 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}1037 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" 1012 1038 exit ;; 1013 1039 sparc:Linux:*:* | sparc64:Linux:*:*) 1014 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}1040 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" 1015 1041 exit ;; 1016 1042 tile*:Linux:*:*) 1017 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}1043 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" 1018 1044 exit ;; 1019 1045 vax:Linux:*:*) 1020 echo ${UNAME_MACHINE}-dec-linux-${LIBC}1046 echo "$UNAME_MACHINE"-dec-linux-"$LIBC" 1021 1047 exit ;; 1022 1048 x86_64:Linux:*:*) 1023 echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 1049 if objdump -f /bin/sh | grep -q elf32-x86-64; then 1050 echo "$UNAME_MACHINE"-pc-linux-"$LIBC"x32 1051 else 1052 echo "$UNAME_MACHINE"-pc-linux-"$LIBC" 1053 fi 1024 1054 exit ;; 1025 1055 xtensa*:Linux:*:*) 1026 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}1056 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" 1027 1057 exit ;; 1028 1058 i*86:DYNIX/ptx:4*:*) … … 1038 1068 # I just have to hope. -- rms. 1039 1069 # Use sysv4.2uw... so that sysv4* matches it. 1040 echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}1070 echo "$UNAME_MACHINE"-pc-sysv4.2uw"$UNAME_VERSION" 1041 1071 exit ;; 1042 1072 i*86:OS/2:*:*) 1043 1073 # If we were able to find `uname', then EMX Unix compatibility 1044 1074 # is probably installed. 1045 echo ${UNAME_MACHINE}-pc-os2-emx1075 echo "$UNAME_MACHINE"-pc-os2-emx 1046 1076 exit ;; 1047 1077 i*86:XTS-300:*:STOP) 1048 echo ${UNAME_MACHINE}-unknown-stop1078 echo "$UNAME_MACHINE"-unknown-stop 1049 1079 exit ;; 1050 1080 i*86:atheos:*:*) 1051 echo ${UNAME_MACHINE}-unknown-atheos1081 echo "$UNAME_MACHINE"-unknown-atheos 1052 1082 exit ;; 1053 1083 i*86:syllable:*:*) 1054 echo ${UNAME_MACHINE}-pc-syllable1084 echo "$UNAME_MACHINE"-pc-syllable 1055 1085 exit ;; 1056 1086 i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) 1057 echo i386-unknown-lynxos ${UNAME_RELEASE}1087 echo i386-unknown-lynxos"$UNAME_RELEASE" 1058 1088 exit ;; 1059 1089 i*86:*DOS:*:*) 1060 echo ${UNAME_MACHINE}-pc-msdosdjgpp1061 exit ;; 1062 i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)1063 UNAME_REL=`echo ${UNAME_RELEASE}| sed 's/\/MP$//'`1090 echo "$UNAME_MACHINE"-pc-msdosdjgpp 1091 exit ;; 1092 i*86:*:4.*:*) 1093 UNAME_REL=`echo "$UNAME_RELEASE" | sed 's/\/MP$//'` 1064 1094 if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then 1065 echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}1095 echo "$UNAME_MACHINE"-univel-sysv"$UNAME_REL" 1066 1096 else 1067 echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}1097 echo "$UNAME_MACHINE"-pc-sysv"$UNAME_REL" 1068 1098 fi 1069 1099 exit ;; … … 1075 1105 *Pent*|*Celeron) UNAME_MACHINE=i686 ;; 1076 1106 esac 1077 echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}1107 echo "$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}{$UNAME_VERSION}" 1078 1108 exit ;; 1079 1109 i*86:*:3.2:*) 1080 1110 if test -f /usr/options/cb.name; then 1081 1111 UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name` 1082 echo ${UNAME_MACHINE}-pc-isc$UNAME_REL1112 echo "$UNAME_MACHINE"-pc-isc"$UNAME_REL" 1083 1113 elif /bin/uname -X 2>/dev/null >/dev/null ; then 1084 1114 UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` … … 1090 1120 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ 1091 1121 && UNAME_MACHINE=i686 1092 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL1122 echo "$UNAME_MACHINE"-pc-sco"$UNAME_REL" 1093 1123 else 1094 echo ${UNAME_MACHINE}-pc-sysv321124 echo "$UNAME_MACHINE"-pc-sysv32 1095 1125 fi 1096 1126 exit ;; … … 1100 1130 # the processor, so we play safe by assuming i586. 1101 1131 # Note: whatever this is, it MUST be the same as what config.sub 1102 # prints for the "djgpp" host, or else GDB configur ywill decide that1132 # prints for the "djgpp" host, or else GDB configure will decide that 1103 1133 # this is a cross-build. 1104 1134 echo i586-pc-msdosdjgpp … … 1112 1142 i860:*:4.*:*) # i860-SVR4 1113 1143 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then 1114 echo i860-stardent-sysv ${UNAME_RELEASE}# Stardent Vistra i860-SVR41144 echo i860-stardent-sysv"$UNAME_RELEASE" # Stardent Vistra i860-SVR4 1115 1145 else # Add other i860-SVR4 vendors below as they are discovered. 1116 echo i860-unknown-sysv ${UNAME_RELEASE}# Unknown i860-SVR41146 echo i860-unknown-sysv"$UNAME_RELEASE" # Unknown i860-SVR4 1117 1147 fi 1118 1148 exit ;; … … 1134 1164 && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` 1135 1165 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ 1136 && { echo i486-ncr-sysv4.3 ${OS_REL}; exit; }1166 && { echo i486-ncr-sysv4.3"$OS_REL"; exit; } 1137 1167 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ 1138 && { echo i586-ncr-sysv4.3 ${OS_REL}; exit; } ;;1168 && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; 1139 1169 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) 1140 1170 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ … … 1145 1175 && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` 1146 1176 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ 1147 && { echo i486-ncr-sysv4.3 ${OS_REL}; exit; }1177 && { echo i486-ncr-sysv4.3"$OS_REL"; exit; } 1148 1178 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ 1149 && { echo i586-ncr-sysv4.3 ${OS_REL}; exit; }1179 && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } 1150 1180 /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ 1151 && { echo i586-ncr-sysv4.3 ${OS_REL}; exit; } ;;1181 && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; 1152 1182 m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) 1153 echo m68k-unknown-lynxos ${UNAME_RELEASE}1183 echo m68k-unknown-lynxos"$UNAME_RELEASE" 1154 1184 exit ;; 1155 1185 mc68030:UNIX_System_V:4.*:*) … … 1157 1187 exit ;; 1158 1188 TSUNAMI:LynxOS:2.*:*) 1159 echo sparc-unknown-lynxos ${UNAME_RELEASE}1189 echo sparc-unknown-lynxos"$UNAME_RELEASE" 1160 1190 exit ;; 1161 1191 rs6000:LynxOS:2.*:*) 1162 echo rs6000-unknown-lynxos ${UNAME_RELEASE}1192 echo rs6000-unknown-lynxos"$UNAME_RELEASE" 1163 1193 exit ;; 1164 1194 PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) 1165 echo powerpc-unknown-lynxos ${UNAME_RELEASE}1195 echo powerpc-unknown-lynxos"$UNAME_RELEASE" 1166 1196 exit ;; 1167 1197 SM[BE]S:UNIX_SV:*:*) 1168 echo mips-dde-sysv ${UNAME_RELEASE}1198 echo mips-dde-sysv"$UNAME_RELEASE" 1169 1199 exit ;; 1170 1200 RM*:ReliantUNIX-*:*:*) … … 1177 1207 if uname -p 2>/dev/null >/dev/null ; then 1178 1208 UNAME_MACHINE=`(uname -p) 2>/dev/null` 1179 echo ${UNAME_MACHINE}-sni-sysv41209 echo "$UNAME_MACHINE"-sni-sysv4 1180 1210 else 1181 1211 echo ns32k-sni-sysv … … 1197 1227 i*86:VOS:*:*) 1198 1228 # From Paul.Green@stratus.com. 1199 echo ${UNAME_MACHINE}-stratus-vos1229 echo "$UNAME_MACHINE"-stratus-vos 1200 1230 exit ;; 1201 1231 *:VOS:*:*) … … 1204 1234 exit ;; 1205 1235 mc68*:A/UX:*:*) 1206 echo m68k-apple-aux ${UNAME_RELEASE}1236 echo m68k-apple-aux"$UNAME_RELEASE" 1207 1237 exit ;; 1208 1238 news*:NEWS-OS:6*:*) … … 1211 1241 R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) 1212 1242 if [ -d /usr/nec ]; then 1213 echo mips-nec-sysv ${UNAME_RELEASE}1243 echo mips-nec-sysv"$UNAME_RELEASE" 1214 1244 else 1215 echo mips-unknown-sysv ${UNAME_RELEASE}1245 echo mips-unknown-sysv"$UNAME_RELEASE" 1216 1246 fi 1217 1247 exit ;; … … 1232 1262 exit ;; 1233 1263 SX-4:SUPER-UX:*:*) 1234 echo sx4-nec-superux ${UNAME_RELEASE}1264 echo sx4-nec-superux"$UNAME_RELEASE" 1235 1265 exit ;; 1236 1266 SX-5:SUPER-UX:*:*) 1237 echo sx5-nec-superux ${UNAME_RELEASE}1267 echo sx5-nec-superux"$UNAME_RELEASE" 1238 1268 exit ;; 1239 1269 SX-6:SUPER-UX:*:*) 1240 echo sx6-nec-superux ${UNAME_RELEASE}1270 echo sx6-nec-superux"$UNAME_RELEASE" 1241 1271 exit ;; 1242 1272 SX-7:SUPER-UX:*:*) 1243 echo sx7-nec-superux ${UNAME_RELEASE}1273 echo sx7-nec-superux"$UNAME_RELEASE" 1244 1274 exit ;; 1245 1275 SX-8:SUPER-UX:*:*) 1246 echo sx8-nec-superux ${UNAME_RELEASE}1276 echo sx8-nec-superux"$UNAME_RELEASE" 1247 1277 exit ;; 1248 1278 SX-8R:SUPER-UX:*:*) 1249 echo sx8r-nec-superux${UNAME_RELEASE} 1279 echo sx8r-nec-superux"$UNAME_RELEASE" 1280 exit ;; 1281 SX-ACE:SUPER-UX:*:*) 1282 echo sxace-nec-superux"$UNAME_RELEASE" 1250 1283 exit ;; 1251 1284 Power*:Rhapsody:*:*) 1252 echo powerpc-apple-rhapsody ${UNAME_RELEASE}1285 echo powerpc-apple-rhapsody"$UNAME_RELEASE" 1253 1286 exit ;; 1254 1287 *:Rhapsody:*:*) 1255 echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}1288 echo "$UNAME_MACHINE"-apple-rhapsody"$UNAME_RELEASE" 1256 1289 exit ;; 1257 1290 *:Darwin:*:*) 1258 1291 UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown 1259 eval $set_cc_for_build1292 eval "$set_cc_for_build" 1260 1293 if test "$UNAME_PROCESSOR" = unknown ; then 1261 1294 UNAME_PROCESSOR=powerpc 1262 1295 fi 1263 if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'`-le 10 ; then1264 if [ "$CC_FOR_BUILD" != 'no_compiler_found']; then1296 if test "`echo "$UNAME_RELEASE" | sed -e 's/\..*//'`" -le 10 ; then 1297 if [ "$CC_FOR_BUILD" != no_compiler_found ]; then 1265 1298 if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ 1266 (CCOPTS=$CC_FOR_BUILD -E - 2>/dev/null) | \1267 grep IS_64BIT_ARCH >/dev/null1299 (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ 1300 grep IS_64BIT_ARCH >/dev/null 1268 1301 then 1269 1302 case $UNAME_PROCESSOR in … … 1271 1304 powerpc) UNAME_PROCESSOR=powerpc64 ;; 1272 1305 esac 1306 fi 1307 # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc 1308 if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \ 1309 (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ 1310 grep IS_PPC >/dev/null 1311 then 1312 UNAME_PROCESSOR=powerpc 1273 1313 fi 1274 1314 fi … … 1282 1322 UNAME_PROCESSOR=x86_64 1283 1323 fi 1284 echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}1324 echo "$UNAME_PROCESSOR"-apple-darwin"$UNAME_RELEASE" 1285 1325 exit ;; 1286 1326 *:procnto*:*:* | *:QNX:[0123456789]*:*) 1287 1327 UNAME_PROCESSOR=`uname -p` 1288 if test "$UNAME_PROCESSOR" = "x86"; then1328 if test "$UNAME_PROCESSOR" = x86; then 1289 1329 UNAME_PROCESSOR=i386 1290 1330 UNAME_MACHINE=pc 1291 1331 fi 1292 echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}1332 echo "$UNAME_PROCESSOR"-"$UNAME_MACHINE"-nto-qnx"$UNAME_RELEASE" 1293 1333 exit ;; 1294 1334 *:QNX:*:4*) 1295 1335 echo i386-pc-qnx 1296 1336 exit ;; 1297 NEO- ?:NONSTOP_KERNEL:*:*)1298 echo neo-tandem-nsk ${UNAME_RELEASE}1337 NEO-*:NONSTOP_KERNEL:*:*) 1338 echo neo-tandem-nsk"$UNAME_RELEASE" 1299 1339 exit ;; 1300 1340 NSE-*:NONSTOP_KERNEL:*:*) 1301 echo nse-tandem-nsk${UNAME_RELEASE} 1302 exit ;; 1303 NSR-?:NONSTOP_KERNEL:*:*) 1304 echo nsr-tandem-nsk${UNAME_RELEASE} 1341 echo nse-tandem-nsk"$UNAME_RELEASE" 1342 exit ;; 1343 NSR-*:NONSTOP_KERNEL:*:*) 1344 echo nsr-tandem-nsk"$UNAME_RELEASE" 1345 exit ;; 1346 NSV-*:NONSTOP_KERNEL:*:*) 1347 echo nsv-tandem-nsk"$UNAME_RELEASE" 1348 exit ;; 1349 NSX-*:NONSTOP_KERNEL:*:*) 1350 echo nsx-tandem-nsk"$UNAME_RELEASE" 1305 1351 exit ;; 1306 1352 *:NonStop-UX:*:*) … … 1311 1357 exit ;; 1312 1358 DS/*:UNIX_System_V:*:*) 1313 echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}1359 echo "$UNAME_MACHINE"-"$UNAME_SYSTEM"-"$UNAME_RELEASE" 1314 1360 exit ;; 1315 1361 *:Plan9:*:*) … … 1317 1363 # is converted to i386 for consistency with other x86 1318 1364 # operating systems. 1319 if test "$cputype" = "386"; then1365 if test "$cputype" = 386; then 1320 1366 UNAME_MACHINE=i386 1321 1367 else 1322 1368 UNAME_MACHINE="$cputype" 1323 1369 fi 1324 echo ${UNAME_MACHINE}-unknown-plan91370 echo "$UNAME_MACHINE"-unknown-plan9 1325 1371 exit ;; 1326 1372 *:TOPS-10:*:*) … … 1343 1389 exit ;; 1344 1390 SEI:*:*:SEIUX) 1345 echo mips-sei-seiux ${UNAME_RELEASE}1391 echo mips-sei-seiux"$UNAME_RELEASE" 1346 1392 exit ;; 1347 1393 *:DragonFly:*:*) 1348 echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`1394 echo "$UNAME_MACHINE"-unknown-dragonfly"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`" 1349 1395 exit ;; 1350 1396 *:*VMS:*:*) 1351 1397 UNAME_MACHINE=`(uname -p) 2>/dev/null` 1352 case "$ {UNAME_MACHINE}" in1398 case "$UNAME_MACHINE" in 1353 1399 A*) echo alpha-dec-vms ; exit ;; 1354 1400 I*) echo ia64-dec-vms ; exit ;; … … 1359 1405 exit ;; 1360 1406 i*86:skyos:*:*) 1361 echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'1407 echo "$UNAME_MACHINE"-pc-skyos"`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'`" 1362 1408 exit ;; 1363 1409 i*86:rdos:*:*) 1364 echo ${UNAME_MACHINE}-pc-rdos1410 echo "$UNAME_MACHINE"-pc-rdos 1365 1411 exit ;; 1366 1412 i*86:AROS:*:*) 1367 echo ${UNAME_MACHINE}-pc-aros1413 echo "$UNAME_MACHINE"-pc-aros 1368 1414 exit ;; 1369 1415 x86_64:VMkernel:*:*) 1370 echo ${UNAME_MACHINE}-unknown-esx 1416 echo "$UNAME_MACHINE"-unknown-esx 1417 exit ;; 1418 amd64:Isilon\ OneFS:*:*) 1419 echo x86_64-unknown-onefs 1371 1420 exit ;; 1372 1421 esac 1373 1422 1423 echo "$0: unable to guess system type" >&2 1424 1425 case "$UNAME_MACHINE:$UNAME_SYSTEM" in 1426 mips:Linux | mips64:Linux) 1427 # If we got here on MIPS GNU/Linux, output extra information. 1428 cat >&2 <<EOF 1429 1430 NOTE: MIPS GNU/Linux systems require a C compiler to fully recognize 1431 the system type. Please install a C compiler and try again. 1432 EOF 1433 ;; 1434 esac 1435 1374 1436 cat >&2 <<EOF 1375 $0: unable to guess system type 1376 1377 This script, last modified $timestamp, has failed to recognize 1378 the operating system you are using. It is advised that you 1379 download the most up to date version of the config scripts from 1380 1381 http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD 1437 1438 This script (version $timestamp), has failed to recognize the 1439 operating system you are using. If your script is old, overwrite *all* 1440 copies of config.guess and config.sub with the latest versions from: 1441 1442 https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess 1382 1443 and 1383 http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD 1384 1385 If the version you run ($0) is already up to date, please 1386 send the following data and any information you think might be 1387 pertinent to <config-patches@gnu.org> in order to provide the needed 1388 information to handle your system. 1444 https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub 1445 1446 If $0 has already been updated, send the following data and any 1447 information you think might be pertinent to config-patches@gnu.org to 1448 provide the necessary information to handle your system. 1389 1449 1390 1450 config.guess timestamp = $timestamp … … 1405 1465 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` 1406 1466 1407 UNAME_MACHINE = ${UNAME_MACHINE}1408 UNAME_RELEASE = ${UNAME_RELEASE}1409 UNAME_SYSTEM = ${UNAME_SYSTEM}1410 UNAME_VERSION = ${UNAME_VERSION}1467 UNAME_MACHINE = "$UNAME_MACHINE" 1468 UNAME_RELEASE = "$UNAME_RELEASE" 1469 UNAME_SYSTEM = "$UNAME_SYSTEM" 1470 UNAME_VERSION = "$UNAME_VERSION" 1411 1471 EOF 1412 1472 … … 1414 1474 1415 1475 # Local variables: 1416 # eval: (add-hook 'write-file- hooks 'time-stamp)1476 # eval: (add-hook 'write-file-functions 'time-stamp) 1417 1477 # time-stamp-start: "timestamp='" 1418 1478 # time-stamp-format: "%:y-%02m-%02d" -
trunk/config.sub
r481 r549 1 1 #! /bin/sh 2 2 # Configuration validation subroutine script. 3 # Copyright 1992-201 4Free Software Foundation, Inc.4 5 timestamp='201 4-09-11'3 # Copyright 1992-2018 Free Software Foundation, Inc. 4 5 timestamp='2018-02-22' 6 6 7 7 # This file is free software; you can redistribute it and/or modify it … … 16 16 # 17 17 # You should have received a copy of the GNU General Public License 18 # along with this program; if not, see <http ://www.gnu.org/licenses/>.18 # along with this program; if not, see <https://www.gnu.org/licenses/>. 19 19 # 20 20 # As a special exception to the GNU General Public License, if you … … 26 26 27 27 28 # Please send patches with a ChangeLog entry to config-patches@gnu.org.28 # Please send patches to <config-patches@gnu.org>. 29 29 # 30 30 # Configuration subroutine to validate and canonicalize a configuration type. … … 34 34 35 35 # You can get the latest version of this script from: 36 # http ://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD36 # https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub 37 37 38 38 # This file is supposed to be the same for all GNU packages … … 54 54 55 55 usage="\ 56 Usage: $0 [OPTION] CPU-MFR-OPSYS 57 $0 [OPTION] ALIAS 56 Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS 58 57 59 58 Canonicalize a configuration name. 60 59 61 Op eration modes:60 Options: 62 61 -h, --help print this help, then exit 63 62 -t, --time-stamp print date of last modification, then exit … … 69 68 GNU config.sub ($timestamp) 70 69 71 Copyright 1992-201 4Free Software Foundation, Inc.70 Copyright 1992-2018 Free Software Foundation, Inc. 72 71 73 72 This is free software; see the source for copying conditions. There is NO … … 96 95 *local*) 97 96 # First pass through any local machine types. 98 echo $197 echo "$1" 99 98 exit ;; 100 99 … … 114 113 # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). 115 114 # Here we must recognize all the valid KERNEL-OS combinations. 116 maybe_os=`echo $1| sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`115 maybe_os=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` 117 116 case $maybe_os in 118 117 nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ 119 118 linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ 120 knetbsd*-gnu* | netbsd*-gnu* | \121 kopensolaris*-gnu* | \119 knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \ 120 kopensolaris*-gnu* | cloudabi*-eabi* | \ 122 121 storm-chaos* | os2-emx* | rtmk-nova*) 123 122 os=-$maybe_os 124 basic_machine=`echo $1| sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`123 basic_machine=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` 125 124 ;; 126 125 android-linux) 127 126 os=-linux-android 128 basic_machine=`echo $1| sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown127 basic_machine=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown 129 128 ;; 130 129 *) 131 basic_machine=`echo $1| sed 's/-[^-]*$//'`132 if [ $basic_machine != $1]133 then os=`echo $1| sed 's/.*-/-/'`130 basic_machine=`echo "$1" | sed 's/-[^-]*$//'` 131 if [ "$basic_machine" != "$1" ] 132 then os=`echo "$1" | sed 's/.*-/-/'` 134 133 else os=; fi 135 134 ;; … … 180 179 -sco6) 181 180 os=-sco5v6 182 basic_machine=`echo $1| sed -e 's/86-.*/86-pc/'`181 basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` 183 182 ;; 184 183 -sco5) 185 184 os=-sco3.2v5 186 basic_machine=`echo $1| sed -e 's/86-.*/86-pc/'`185 basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` 187 186 ;; 188 187 -sco4) 189 188 os=-sco3.2v4 190 basic_machine=`echo $1| sed -e 's/86-.*/86-pc/'`189 basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` 191 190 ;; 192 191 -sco3.2.[4-9]*) 193 192 os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` 194 basic_machine=`echo $1| sed -e 's/86-.*/86-pc/'`193 basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` 195 194 ;; 196 195 -sco3.2v[4-9]*) 197 196 # Don't forget version if it is 3.2v4 or newer. 198 basic_machine=`echo $1| sed -e 's/86-.*/86-pc/'`197 basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` 199 198 ;; 200 199 -sco5v6*) 201 200 # Don't forget version if it is 3.2v4 or newer. 202 basic_machine=`echo $1| sed -e 's/86-.*/86-pc/'`201 basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` 203 202 ;; 204 203 -sco*) 205 204 os=-sco3.2v2 206 basic_machine=`echo $1| sed -e 's/86-.*/86-pc/'`205 basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` 207 206 ;; 208 207 -udk*) 209 basic_machine=`echo $1| sed -e 's/86-.*/86-pc/'`208 basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` 210 209 ;; 211 210 -isc) 212 211 os=-isc2.2 213 basic_machine=`echo $1| sed -e 's/86-.*/86-pc/'`212 basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` 214 213 ;; 215 214 -clix*) … … 217 216 ;; 218 217 -isc*) 219 basic_machine=`echo $1| sed -e 's/86-.*/86-pc/'`218 basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` 220 219 ;; 221 220 -lynx*178) … … 229 228 ;; 230 229 -ptx*) 231 basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` 232 ;; 233 -windowsnt*) 234 os=`echo $os | sed -e 's/windowsnt/winnt/'` 230 basic_machine=`echo "$1" | sed -e 's/86-.*/86-sequent/'` 235 231 ;; 236 232 -psos*) … … 256 252 | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ 257 253 | avr | avr32 \ 254 | ba \ 258 255 | be32 | be64 \ 259 256 | bfin \ 260 257 | c4x | c8051 | clipper \ 261 258 | d10v | d30v | dlx | dsp16xx \ 262 | e piphany \263 | fido | fr30 | frv \259 | e2k | epiphany \ 260 | fido | fr30 | frv | ft32 \ 264 261 | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ 265 262 | hexagon \ 266 | i370 | i860 | i960 | ia 64 \263 | i370 | i860 | i960 | ia16 | ia64 \ 267 264 | ip2k | iq2000 \ 268 265 | k1om \ … … 300 297 | ns16k | ns32k \ 301 298 | open8 | or1k | or1knd | or32 \ 302 | pdp10 | p dp11 | pj | pjl \299 | pdp10 | pj | pjl \ 303 300 | powerpc | powerpc64 | powerpc64le | powerpcle \ 301 | pru \ 304 302 | pyramid \ 305 303 | riscv32 | riscv64 \ 306 304 | rl78 | rx \ 307 305 | score \ 308 | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[ 34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \306 | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ 309 307 | sh64 | sh64le \ 310 308 | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ … … 314 312 | ubicom32 \ 315 313 | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ 316 | we32k \ 314 | visium \ 315 | wasm32 \ 317 316 | x86 | xc16x | xstormy16 | xtensa \ 318 317 | z8k | z80) … … 328 327 basic_machine=tic6x-unknown 329 328 ;; 329 leon|leon[3-9]) 330 basic_machine=sparc-$basic_machine 331 ;; 330 332 m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip) 331 333 basic_machine=$basic_machine-unknown 332 334 os=-none 333 335 ;; 334 m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)336 m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65) 335 337 ;; 336 338 ms1) … … 361 363 # Object if more than one company name word. 362 364 *-*-*) 363 echo Invalid configuration \` $1\': machine \`$basic_machine\' not recognized 1>&2365 echo Invalid configuration \`"$1"\': machine \`"$basic_machine"\' not recognized 1>&2 364 366 exit 1 365 367 ;; … … 373 375 | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ 374 376 | avr-* | avr32-* \ 377 | ba-* \ 375 378 | be32-* | be64-* \ 376 379 | bfin-* | bs2000-* \ … … 378 381 | c8051-* | clipper-* | craynv-* | cydra-* \ 379 382 | d10v-* | d30v-* | dlx-* \ 380 | e lxsi-* \383 | e2k-* | elxsi-* \ 381 384 | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ 382 385 | h8300-* | h8500-* \ 383 386 | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ 384 387 | hexagon-* \ 385 | i*86-* | i860-* | i960-* | ia 64-* \388 | i*86-* | i860-* | i960-* | ia16-* | ia64-* \ 386 389 | ip2k-* | iq2000-* \ 387 390 | k1om-* \ … … 424 427 | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ 425 428 | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ 429 | pru-* \ 426 430 | pyramid-* \ 431 | riscv32-* | riscv64-* \ 427 432 | rl78-* | romp-* | rs6000-* | rx-* \ 428 433 | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ … … 430 435 | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ 431 436 | sparclite-* \ 432 | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx ?-* \437 | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx*-* \ 433 438 | tahoe-* \ 434 439 | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ … … 438 443 | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ 439 444 | vax-* \ 445 | visium-* \ 446 | wasm32-* \ 440 447 | we32k-* \ 441 448 | x86-* | x86_64-* | xc16x-* | xps100-* \ … … 451 458 # for a CPU type and a company and sometimes even an OS. 452 459 386bsd) 453 basic_machine=i386- unknown460 basic_machine=i386-pc 454 461 os=-bsd 455 462 ;; … … 485 492 ;; 486 493 amd64-*) 487 basic_machine=x86_64-`echo $basic_machine| sed 's/^[^-]*-//'`494 basic_machine=x86_64-`echo "$basic_machine" | sed 's/^[^-]*-//'` 488 495 ;; 489 496 amdahl) … … 514 521 os=-aros 515 522 ;; 523 asmjs) 524 basic_machine=asmjs-unknown 525 ;; 516 526 aux) 517 527 basic_machine=m68k-apple … … 527 537 ;; 528 538 blackfin-*) 529 basic_machine=bfin-`echo $basic_machine| sed 's/^[^-]*-//'`539 basic_machine=bfin-`echo "$basic_machine" | sed 's/^[^-]*-//'` 530 540 os=-linux 531 541 ;; … … 535 545 ;; 536 546 c54x-*) 537 basic_machine=tic54x-`echo $basic_machine| sed 's/^[^-]*-//'`547 basic_machine=tic54x-`echo "$basic_machine" | sed 's/^[^-]*-//'` 538 548 ;; 539 549 c55x-*) 540 basic_machine=tic55x-`echo $basic_machine| sed 's/^[^-]*-//'`550 basic_machine=tic55x-`echo "$basic_machine" | sed 's/^[^-]*-//'` 541 551 ;; 542 552 c6x-*) 543 basic_machine=tic6x-`echo $basic_machine| sed 's/^[^-]*-//'`553 basic_machine=tic6x-`echo "$basic_machine" | sed 's/^[^-]*-//'` 544 554 ;; 545 555 c90) … … 630 640 os=-bosx 631 641 ;; 632 dpx2* | dpx2*-bull)642 dpx2*) 633 643 basic_machine=m68k-bull 634 644 os=-sysv3 645 ;; 646 e500v[12]) 647 basic_machine=powerpc-unknown 648 os=$os"spe" 649 ;; 650 e500v[12]-*) 651 basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'` 652 os=$os"spe" 635 653 ;; 636 654 ebmon29k) … … 723 741 basic_machine=hppa1.0-hp 724 742 ;; 725 hppa-next)726 os=-nextstep3727 ;;728 743 hppaosf) 729 744 basic_machine=hppa1.1-hp … … 738 753 ;; 739 754 i*86v32) 740 basic_machine=`echo $1| sed -e 's/86.*/86-pc/'`755 basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` 741 756 os=-sysv32 742 757 ;; 743 758 i*86v4*) 744 basic_machine=`echo $1| sed -e 's/86.*/86-pc/'`759 basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` 745 760 os=-sysv4 746 761 ;; 747 762 i*86v) 748 basic_machine=`echo $1| sed -e 's/86.*/86-pc/'`763 basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` 749 764 os=-sysv 750 765 ;; 751 766 i*86sol2) 752 basic_machine=`echo $1| sed -e 's/86.*/86-pc/'`767 basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` 753 768 os=-solaris2 754 769 ;; … … 757 772 os=-mach 758 773 ;; 759 i386-vsta |vsta)774 vsta) 760 775 basic_machine=i386-unknown 761 776 os=-vsta … … 775 790 os=-sysv 776 791 ;; 792 leon-*|leon[3-9]-*) 793 basic_machine=sparc-`echo "$basic_machine" | sed 's/-.*//'` 794 ;; 777 795 m68knommu) 778 796 basic_machine=m68k-unknown … … 780 798 ;; 781 799 m68knommu-*) 782 basic_machine=m68k-`echo $basic_machine| sed 's/^[^-]*-//'`800 basic_machine=m68k-`echo "$basic_machine" | sed 's/^[^-]*-//'` 783 801 os=-linux 784 ;;785 m88k-omron*)786 basic_machine=m88k-omron787 802 ;; 788 803 magnum | m3230) … … 817 832 ;; 818 833 mips3*-*) 819 basic_machine=`echo $basic_machine| sed -e 's/mips3/mips64/'`834 basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'` 820 835 ;; 821 836 mips3*) 822 basic_machine=`echo $basic_machine| sed -e 's/mips3/mips64/'`-unknown837 basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'`-unknown 823 838 ;; 824 839 monitor) … … 839 854 ;; 840 855 ms1-*) 841 basic_machine=`echo $basic_machine| sed -e 's/ms1-/mt-/'`856 basic_machine=`echo "$basic_machine" | sed -e 's/ms1-/mt-/'` 842 857 ;; 843 858 msys) … … 881 896 os=-sysv 882 897 ;; 883 next | m*-next 898 next | m*-next) 884 899 basic_machine=m68k-next 885 900 case $os in … … 926 941 basic_machine=nsr-tandem 927 942 ;; 943 nsv-tandem) 944 basic_machine=nsv-tandem 945 ;; 946 nsx-tandem) 947 basic_machine=nsx-tandem 948 ;; 928 949 op50n-* | op60c-*) 929 950 basic_machine=hppa1.1-oki … … 958 979 ;; 959 980 parisc-*) 960 basic_machine=hppa-`echo $basic_machine| sed 's/^[^-]*-//'`981 basic_machine=hppa-`echo "$basic_machine" | sed 's/^[^-]*-//'` 961 982 os=-linux 962 983 ;; … … 974 995 ;; 975 996 pc98-*) 976 basic_machine=i386-`echo $basic_machine| sed 's/^[^-]*-//'`997 basic_machine=i386-`echo "$basic_machine" | sed 's/^[^-]*-//'` 977 998 ;; 978 999 pentium | p5 | k5 | k6 | nexgen | viac3) … … 989 1010 ;; 990 1011 pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) 991 basic_machine=i586-`echo $basic_machine| sed 's/^[^-]*-//'`1012 basic_machine=i586-`echo "$basic_machine" | sed 's/^[^-]*-//'` 992 1013 ;; 993 1014 pentiumpro-* | p6-* | 6x86-* | athlon-*) 994 basic_machine=i686-`echo $basic_machine| sed 's/^[^-]*-//'`1015 basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'` 995 1016 ;; 996 1017 pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) 997 basic_machine=i686-`echo $basic_machine| sed 's/^[^-]*-//'`1018 basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'` 998 1019 ;; 999 1020 pentium4-*) 1000 basic_machine=i786-`echo $basic_machine| sed 's/^[^-]*-//'`1021 basic_machine=i786-`echo "$basic_machine" | sed 's/^[^-]*-//'` 1001 1022 ;; 1002 1023 pn) … … 1008 1029 ;; 1009 1030 ppc-* | ppcbe-*) 1010 basic_machine=powerpc-`echo $basic_machine| sed 's/^[^-]*-//'`1011 ;; 1012 ppcle | powerpclittle | ppc-le | powerpc-little)1031 basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'` 1032 ;; 1033 ppcle | powerpclittle) 1013 1034 basic_machine=powerpcle-unknown 1014 1035 ;; 1015 1036 ppcle-* | powerpclittle-*) 1016 basic_machine=powerpcle-`echo $basic_machine| sed 's/^[^-]*-//'`1037 basic_machine=powerpcle-`echo "$basic_machine" | sed 's/^[^-]*-//'` 1017 1038 ;; 1018 1039 ppc64) basic_machine=powerpc64-unknown 1019 1040 ;; 1020 ppc64-*) basic_machine=powerpc64-`echo $basic_machine| sed 's/^[^-]*-//'`1021 ;; 1022 ppc64le | powerpc64little | ppc64-le | powerpc64-little)1041 ppc64-*) basic_machine=powerpc64-`echo "$basic_machine" | sed 's/^[^-]*-//'` 1042 ;; 1043 ppc64le | powerpc64little) 1023 1044 basic_machine=powerpc64le-unknown 1024 1045 ;; 1025 1046 ppc64le-* | powerpc64little-*) 1026 basic_machine=powerpc64le-`echo $basic_machine| sed 's/^[^-]*-//'`1047 basic_machine=powerpc64le-`echo "$basic_machine" | sed 's/^[^-]*-//'` 1027 1048 ;; 1028 1049 ps2) … … 1078 1099 basic_machine=i386-sequent 1079 1100 ;; 1080 sh)1081 basic_machine=sh-hitachi1082 os=-hms1083 ;;1084 1101 sh5el) 1085 1102 basic_machine=sh5le-unknown 1086 1103 ;; 1087 sh64) 1088 basic_machine=sh64-unknown 1089 ;; 1090 sparclite-wrs | simso-wrs) 1104 simso-wrs) 1091 1105 basic_machine=sparclite-wrs 1092 1106 os=-vxworks … … 1107 1121 ;; 1108 1122 strongarm-* | thumb-*) 1109 basic_machine=arm-`echo $basic_machine| sed 's/^[^-]*-//'`1123 basic_machine=arm-`echo "$basic_machine" | sed 's/^[^-]*-//'` 1110 1124 ;; 1111 1125 sun2) … … 1229 1243 os=-proelf 1230 1244 ;; 1245 x64) 1246 basic_machine=x86_64-pc 1247 ;; 1231 1248 xbox) 1232 1249 basic_machine=i686-pc … … 1237 1254 ;; 1238 1255 xscale-* | xscalee[bl]-*) 1239 basic_machine=`echo $basic_machine| sed 's/^xscale/arm/'`1256 basic_machine=`echo "$basic_machine" | sed 's/^xscale/arm/'` 1240 1257 ;; 1241 1258 ymp) 1242 1259 basic_machine=ymp-cray 1243 1260 os=-unicos 1244 ;;1245 z8k-*-coff)1246 basic_machine=z8k-unknown1247 os=-sim1248 ;;1249 z80-*-coff)1250 basic_machine=z80-unknown1251 os=-sim1252 1261 ;; 1253 1262 none) … … 1279 1288 basic_machine=vax-dec 1280 1289 ;; 1281 pdp10)1282 # there are many clones, so DEC is not a safe bet1283 basic_machine=pdp10-unknown1284 ;;1285 1290 pdp11) 1286 1291 basic_machine=pdp11-dec … … 1292 1297 basic_machine=sh-unknown 1293 1298 ;; 1294 sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)1295 basic_machine=sparc-sun1296 ;;1297 1299 cydra) 1298 1300 basic_machine=cydra-cydrome … … 1314 1316 ;; 1315 1317 *) 1316 echo Invalid configuration \` $1\': machine \`$basic_machine\' not recognized 1>&21318 echo Invalid configuration \`"$1"\': machine \`"$basic_machine"\' not recognized 1>&2 1317 1319 exit 1 1318 1320 ;; … … 1322 1324 case $basic_machine in 1323 1325 *-digital*) 1324 basic_machine=`echo $basic_machine| sed 's/digital.*/dec/'`1326 basic_machine=`echo "$basic_machine" | sed 's/digital.*/dec/'` 1325 1327 ;; 1326 1328 *-commodore*) 1327 basic_machine=`echo $basic_machine| sed 's/commodore.*/cbm/'`1329 basic_machine=`echo "$basic_machine" | sed 's/commodore.*/cbm/'` 1328 1330 ;; 1329 1331 *) … … 1336 1338 then 1337 1339 case $os in 1338 # First match some system type aliases 1339 # that might get confusedwith valid system types.1340 # First match some system type aliases that might get confused 1341 # with valid system types. 1340 1342 # -solaris* is a basic system type, with this one exception. 1341 1343 -auroraux) … … 1348 1350 os=-solaris2 1349 1351 ;; 1350 -svr4*)1351 os=-sysv41352 ;;1353 1352 -unixware*) 1354 1353 os=-sysv4.2uw … … 1357 1356 os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` 1358 1357 ;; 1359 # First accept the basic system types. 1358 # es1800 is here to avoid being matched by es* (a different OS) 1359 -es1800*) 1360 os=-ose 1361 ;; 1362 # Now accept the basic system types. 1360 1363 # The portable systems comes first. 1361 # Each alternative MUST END IN A *,to match a version number.1364 # Each alternative MUST end in a * to match a version number. 1362 1365 # -sysv* is not here because it comes later, after sysvr4. 1363 1366 -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ … … 1366 1369 | -sym* | -kopensolaris* | -plan9* \ 1367 1370 | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ 1368 | -aos* | -aros* \1371 | -aos* | -aros* | -cloudabi* | -sortix* \ 1369 1372 | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ 1370 1373 | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ 1371 | -hiux* | - 386bsd* | -knetbsd* | -mirbsd* | -netbsd* \1372 | -bitrig* | -openbsd* | -solidbsd* \1374 | -hiux* | -knetbsd* | -mirbsd* | -netbsd* \ 1375 | -bitrig* | -openbsd* | -solidbsd* | -libertybsd* \ 1373 1376 | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ 1374 1377 | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ 1375 1378 | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ 1376 1379 | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ 1377 | -chorusos* | -chorusrdb* | -cegcc* \1380 | -chorusos* | -chorusrdb* | -cegcc* | -glidix* \ 1378 1381 | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ 1379 | -mi ngw32* | -mingw64* | -linux-gnu* | -linux-android* \1382 | -midipix* | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ 1380 1383 | -linux-newlib* | -linux-musl* | -linux-uclibc* \ 1381 1384 | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \ 1382 | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened*\1385 | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* \ 1383 1386 | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ 1384 1387 | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ 1385 1388 | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ 1386 | -morphos* | -superux* | -rtmk* | - rtmk-nova* | -windiss* \1389 | -morphos* | -superux* | -rtmk* | -windiss* \ 1387 1390 | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ 1388 | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* | -tirtos*) 1391 | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \ 1392 | -onefs* | -tirtos* | -phoenix* | -fuchsia* | -redox* | -bme* \ 1393 | -midnightbsd*) 1389 1394 # Remember, each alternative MUST END IN *, to match a version number. 1390 1395 ;; … … 1403 1408 os=`echo $os | sed -e 's|nto|nto-qnx|'` 1404 1409 ;; 1405 -sim | - es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \1406 | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku*\1410 -sim | -xray | -os68k* | -v88r* \ 1411 | -windows* | -osx | -abug | -netware* | -os9* \ 1407 1412 | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) 1408 1413 ;; 1409 1414 -mac*) 1410 os=`echo $os| sed -e 's|mac|macos|'`1415 os=`echo "$os" | sed -e 's|mac|macos|'` 1411 1416 ;; 1412 1417 -linux-dietlibc) … … 1417 1422 ;; 1418 1423 -sunos5*) 1419 os=`echo $os| sed -e 's|sunos5|solaris2|'`1424 os=`echo "$os" | sed -e 's|sunos5|solaris2|'` 1420 1425 ;; 1421 1426 -sunos6*) 1422 os=`echo $os| sed -e 's|sunos6|solaris3|'`1427 os=`echo "$os" | sed -e 's|sunos6|solaris3|'` 1423 1428 ;; 1424 1429 -opened*) … … 1431 1436 os=-wince 1432 1437 ;; 1433 -osfrose*)1434 os=-osfrose1435 ;;1436 -osf*)1437 os=-osf1438 ;;1439 1438 -utek*) 1440 1439 os=-bsd … … 1461 1460 os=-rtmk-nova 1462 1461 ;; 1463 -ns2 1462 -ns2) 1464 1463 os=-nextstep2 1465 1464 ;; … … 1483 1482 os=-sysv3 1484 1483 ;; 1485 -svr4 )1484 -svr4*) 1486 1485 os=-sysv4 1487 1486 ;; … … 1498 1497 os=-ose 1499 1498 ;; 1500 -es1800*)1501 os=-ose1502 ;;1503 -xenix)1504 os=-xenix1505 ;;1506 1499 -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) 1507 1500 os=-mint 1508 1501 ;; 1509 -aros*)1510 os=-aros1511 ;;1512 1502 -zvmoe) 1513 1503 os=-zvmoe … … 1516 1506 os=-dicos 1517 1507 ;; 1508 -pikeos*) 1509 # Until real need of OS specific support for 1510 # particular features comes up, bare metal 1511 # configurations are quite functional. 1512 case $basic_machine in 1513 arm*) 1514 os=-eabi 1515 ;; 1516 *) 1517 os=-elf 1518 ;; 1519 esac 1520 ;; 1518 1521 -nacl*) 1522 ;; 1523 -ios) 1519 1524 ;; 1520 1525 -none) … … 1523 1528 # Get rid of the `-' at the beginning of $os. 1524 1529 os=`echo $os | sed 's/[^-]*-//'` 1525 echo Invalid configuration \` $1\': system \`$os\' not recognized 1>&21530 echo Invalid configuration \`"$1"\': system \`"$os"\' not recognized 1>&2 1526 1531 exit 1 1527 1532 ;; … … 1613 1618 os=-sunos4.1.1 1614 1619 ;; 1620 pru-*) 1621 os=-elf 1622 ;; 1615 1623 *-be) 1616 1624 os=-beos 1617 1625 ;; 1618 *-haiku)1619 os=-haiku1620 ;;1621 1626 *-ibm) 1622 1627 os=-aix … … 1658 1663 os=-luna 1659 1664 ;; 1660 *-next 1665 *-next) 1661 1666 os=-nextstep 1662 1667 ;; … … 1672 1677 i370-*) 1673 1678 os=-mvs 1674 ;;1675 *-next)1676 os=-nextstep31677 1679 ;; 1678 1680 *-gould) … … 1785 1787 ;; 1786 1788 esac 1787 basic_machine=`echo $basic_machine| sed "s/unknown/$vendor/"`1789 basic_machine=`echo "$basic_machine" | sed "s/unknown/$vendor/"` 1788 1790 ;; 1789 1791 esac 1790 1792 1791 echo $basic_machine$os1793 echo "$basic_machine$os" 1792 1794 exit 1793 1795 1794 1796 # Local variables: 1795 # eval: (add-hook 'write-file- hooks 'time-stamp)1797 # eval: (add-hook 'write-file-functions 'time-stamp) 1796 1798 # time-stamp-start: "timestamp='" 1797 1799 # time-stamp-format: "%:y-%02m-%02d" -
trunk/docs/Changelog
r544 r549 1 1 4.3.3: 2 * fix broken 'make deb' makefile target 3 * eliminate obsolete 'sstrip' utility 4 * systemd support 5 * fix broken rpm specfile (patch by Franky Van L.) 6 * fix broken mysql init script 2 7 * fix some issues with link-time optimisation (option -flto with 3 8 recent gcc versions) -
trunk/init/samhain.startSystemd.in
r548 r549 2 2 [Unit] 3 3 Description=The @install_name@ Service 4 After=network.target syslog.targetremote-fs.target nss-user-lookup.target4 After=network.target remote-fs.target nss-user-lookup.target 5 5 6 6 [Service] -
trunk/rules.deb-light.in
r531 r549 8 8 # 9 9 10 # Uncomment this to turn on verbose mode.11 #export DH_VERBOSE=112 10 13 # This is the debhelper compatability version to use. 14 export DH_COMPAT=9 11 %: 12 dh $@ --with-autoreconf 15 13 16 package=@install_name@17 14 18 # CAVEAT: including the --enable-base= option is for packages to be 19 # distributed INTERNALLY on your network, NOT for packages 20 # to be distributed to THIRD PARTIES 15 override_dh_clean: 16 [ ! -f Makefile ] || $(MAKE) distclean 17 -rm -f samhainrc.install 18 -rm -f build-stamp build-server-stamp build-client-stamp 19 dh_clean 21 20 22 build: build-stamp 23 build-stamp: 24 dh_testdir 21 override_dh_auto_configure: 25 22 @top_srcdir@/configure @mydefargs@ 26 $(MAKE) 27 echo '#!/bin/sh' > ./sstrip 28 echo 'echo "*** SSTRIP DISABLED ***"' >> ./sstrip23 24 override_dh_auto_build: 25 dh_auto_build 29 26 if ! test x$(PASSWORD) = x; then \ 30 27 if test -f samhain_setpwd; then \ … … 34 31 fi; \ 35 32 fi 36 touch build-stamp37 33 38 clean: 39 dh_testdir 40 dh_testroot 41 rm -f build-stamp 42 -[ -f Makefile ] && $(MAKE) distclean 43 dh_clean 44 45 install: build 46 dh_testdir 47 dh_testroot 48 dh_clean -k 49 dh_installdirs 50 34 override_dh_auto_install: 51 35 $(MAKE) install-light install-boot DESTDIR=`pwd`/debian/@install_name@ 52 # $(MAKE) install-light install-boot DESTDIR=`pwd`/debian/tmp53 54 # However, remove the rc.d links55 -rm -rf `pwd`/debian/tmp/etc/rc?.d56 57 # Remove samhain_stealth for light install58 -rm -f `pwd`/debian/tmp/@sbindir@/@install_name@_stealth59 60 # Build architecture-independent files here.61 binary-indep: build install62 # We have nothing to do by default.63 36 64 37 65 # Build architecture-dependent files here. 66 binary-arch: build install 67 # dh_testversion 68 dh_testdir 69 dh_testroot 70 dh_installdebconf 71 # dh_installdocs 72 dh_installmenu 73 dh_installinit -- defaults 19 74 [ -f debian/@install_name@.postinst.debhelper ] && \ 75 cd debian && \ 76 cat @install_name@.postinst.debhelper | \ 77 sed 's%/etc/init.d/@install_name@ start%:%' > postinst.tmp && \ 78 mv postinst.tmp @install_name@.postinst.debhelper 79 [ -f debian/@install_name@.postinst.debhelper ] && \ 80 cd debian && \ 81 cat @install_name@.postinst.debhelper | \ 82 sed 's%invoke-rc.d @install_name@ start%:%' > postinst.tmp && \ 83 mv postinst.tmp @install_name@.postinst.debhelper 84 [ -f debian/@install_name@.prerm.debhelper ] && \ 85 cd debian && \ 86 cat @install_name@.prerm.debhelper | \ 87 sed 's%/etc/init.d/@install_name@ stop%/etc/init.d/@install_name@ stop || echo service @install_name@ already stopped%' > prerm.tmp && \ 88 mv prerm.tmp @install_name@.prerm.debhelper 89 [ -f debian/@install_name@.prerm.debhelper ] && \ 90 cd debian && \ 91 cat @install_name@.prerm.debhelper | \ 92 sed 's%invoke-rc.d @install_name@ stop%invoke-rc.d @install_name@ stop || echo service @install_name@ already stopped%' > prerm.tmp && \ 93 mv prerm.tmp @install_name@.prerm.debhelper 94 # dh_installmanpages 95 # dh_installchangelogs @top_srcdir@/docs/Changelog 96 dh_link 97 dh_strip 98 dh_compress 38 override_dh_install: 39 # However, remove the rc.d links 40 -rm -rf `pwd`/debian/@install_name@/etc/rc?.d 41 # Remove samhain_stealth for light install 42 -rm -f `pwd`/debian/@install_name@/@sbindir@/@install_name@_stealth 43 # remove samhain_setpwd if not needed 44 if ! test x$(PASSWORD) = x; then \ 45 rm -f `pwd`/debian/@install_name@/@sbindir@/@install_name@_setpwd; \ 46 fi 47 48 override_dh_installdocs: 49 # do nothing 50 51 override_dh_installchangelogs: 52 # do nothing 53 54 override_dh_installman: 55 # do nothing 56 57 override_dh_installinit: 58 dh_installinit --no-start -- defaults 19 59 60 override_dh_usrlocal: 61 # do nothing 62 63 override_dh_fixperms: 99 64 dh_fixperms 100 dh_installdeb 101 dh_shlibdeps 102 dh_gencontrol 103 dh_md5sums 104 dh_builddeb 65 # Fix the permissions 66 chmod o-rX `pwd`/debian/@install_name@/@mydataroot@ \ 67 `pwd`/debian/@install_name@/@myconffile@ 68 if ! test "x@mylogdir@" = "x/var/log"; then \ 69 chmod o-rX `pwd`/debian/@install_name@/@mylogdir@; \ 70 fi 105 71 106 72 107 define checkdir108 test -f debian/rules109 endef110 111 binary: binary-indep binary-arch112 .PHONY: build clean binary-indep binary-arch binary install113 -
trunk/rules.deb.in
r531 r549 8 8 # 9 9 10 # Uncomment this to turn on verbose mode. 11 #export DH_VERBOSE=1 10 %: 11 dh $@ --with-autoreconf 12 12 13 # This is the debhelper compatability version to use. 14 export DH_COMPAT=9 13 override_dh_clean: 14 [ ! -f Makefile ] || $(MAKE) distclean 15 -rm -f samhainrc.install 16 -rm -f build-stamp build-server-stamp build-client-stamp 17 dh_clean 15 18 16 package=@install_name@ 19 override_dh_auto_configure: 20 @top_srcdir@/configure @mydefargs@ 17 21 18 # CAVEAT: including the --enable-base= option is for packages to be 19 # distributed INTERNALLY on your network, NOT for packages 20 # to be distributed to THIRD PARTIES 21 22 build: build-stamp 23 build-stamp: 24 dh_testdir 25 @top_srcdir@/configure @mydefargs@ 26 $(MAKE) 27 echo '#!/bin/sh' > ./sstrip 28 echo 'echo "*** SSTRIP DISABLED ***"' >> ./sstrip 22 override_dh_auto_build: 23 dh_auto_build 29 24 if ! test x$(PASSWORD) = x; then \ 30 25 if test -f samhain_setpwd; then \ … … 34 29 fi; \ 35 30 fi 36 touch build-stamp37 31 38 clean: 39 dh_testdir 40 dh_testroot 41 rm -f build-stamp 42 -[ -f Makefile ] && $(MAKE) distclean 43 dh_clean 44 45 install: build 46 dh_testdir 47 dh_testroot 48 dh_clean -k 49 dh_installdirs 50 51 # Fix the permissions 52 #chmod o-rX `pwd`/debian/tmp/var/log/samhain \ 53 # `pwd`/debian/tmp/var/run/samhain \ 54 # `pwd`/debian/tmp/var/lib/samhain \ 55 # `pwd`/debian/tmp/etc/samhain 56 57 # $(MAKE) install install-boot DESTDIR=`pwd`/debian/tmp 32 override_dh_auto_install: 58 33 $(MAKE) install install-boot DESTDIR=`pwd`/debian/@install_name@ 59 34 35 override_dh_install: 60 36 # However, remove the rc.d links 61 -rm -rf `pwd`/debian/ tmp/etc/rc?.d37 -rm -rf `pwd`/debian/@install_name@/etc/rc?.d 62 38 63 # install -m 755 encode `pwd`/debian/tmp/usr/bin/samhain_encode 64 65 # install -m 644 profiles/debianlinux_i386/samhainrc `pwd`/debian/tmp@myconffile@ 66 # install -m 644 debian/samhain.logrotate `pwd`/debian/tmp/etc/logrotate.d/samhain 67 68 # Build architecture-independent files here. 69 binary-indep: build install 70 # We have nothing to do by default. 71 72 73 # Build architecture-dependent files here. 74 binary-arch: build install 75 # dh_testversion 76 dh_testdir 77 dh_testroot 78 dh_installdebconf 79 dh_installdocs 39 override_dh_installdocs: 40 dh_installdocs 80 41 [ -f debian/@install_name@/usr/share/doc/@install_name@/MANUAL-2_4.html.tar ] && \ 81 42 cd debian/@install_name@/usr/share/doc/@install_name@ && \ 82 43 tar xf MANUAL-2_4.html.tar && mv MANUAL-2_4 manual.html && \ 83 rm -f MANUAL-2_4.html.tar && \ 44 rm -f MANUAL-2_4.html.tar 45 [ -f debian/@install_name@/usr/share/doc/@install_name@/MANUAL-2_4.pdf ] && \ 46 cd debian/@install_name@/usr/share/doc/@install_name@ && \ 84 47 mv MANUAL-2_4.pdf manual.pdf 85 dh_installexamples @top_srcdir@/scripts/example_pager.pl \ 86 @top_srcdir@/scripts/example_sms.pl \ 87 @top_srcdir@/scripts/concat.pl \ 88 @top_srcdir@/scripts/samhain.logrotator \ 89 @top_srcdir@/scripts/samhainadmin.pl \ 90 @top_srcdir@/scripts/check_samhain.pl \ 91 @top_srcdir@/yulerc.template \ 92 @top_srcdir@/samhainrc.linux 93 dh_installmenu 94 dh_installinit -- defaults 19 95 [ -f debian/@install_name@.postinst.debhelper ] && \ 96 cd debian && \ 97 cat @install_name@.postinst.debhelper | \ 98 sed 's%/etc/init.d/@install_name@ start%:%' > postinst.tmp && \ 99 mv postinst.tmp @install_name@.postinst.debhelper 100 [ -f debian/@install_name@.postinst.debhelper ] && \ 101 cd debian && \ 102 cat @install_name@.postinst.debhelper | \ 103 sed 's%invoke-rc.d @install_name@ start%:%' > postinst.tmp && \ 104 mv postinst.tmp @install_name@.postinst.debhelper 105 [ -f debian/@install_name@.prerm.debhelper ] && \ 106 cd debian && \ 107 cat @install_name@.prerm.debhelper | \ 108 sed 's%/etc/init.d/@install_name@ stop%/etc/init.d/@install_name@ stop || echo service @install_name@ already stopped%' > prerm.tmp && \ 109 mv prerm.tmp @install_name@.prerm.debhelper 110 [ -f debian/@install_name@.prerm.debhelper ] && \ 111 cd debian && \ 112 cat @install_name@.prerm.debhelper | \ 113 sed 's%invoke-rc.d @install_name@ stop%invoke-rc.d @install_name@ stop || echo service @install_name@ already stopped%' > prerm.tmp && \ 114 mv prerm.tmp @install_name@.prerm.debhelper 115 # dh_installmanpages 116 dh_installchangelogs @top_srcdir@/docs/Changelog 117 dh_link 118 dh_strip 119 dh_compress 48 49 override_dh_installchangelogs: 50 dh_installchangelogs docs/Changelog 51 52 override_dh_installinit: 53 dh_installinit --no-start -- defaults 19 54 55 override_dh_usrlocal: 56 # do nothing 57 58 override_dh_fixperms: 120 59 dh_fixperms 121 dh_installdeb 122 dh_shlibdeps 123 dh_gencontrol 124 dh_md5sums 125 dh_builddeb 60 # Fix the permissions 61 chmod o-rX `pwd`/debian/@install_name@/@mydataroot@ \ 62 `pwd`/debian/@install_name@/@myconffile@ 63 if ! test "x@mylogdir@" = "x/var/log"; then \ 64 chmod o-rX `pwd`/debian/@install_name@/@mylogdir@; \ 65 fi 126 66 127 128 define checkdir129 test -f debian/rules130 endef131 132 binary: binary-indep binary-arch133 .PHONY: build clean binary-indep binary-arch binary install134
Note:
See TracChangeset
for help on using the changeset viewer.