Changeset 24528
- Timestamp:
- 03/22/08 17:05:03 (8 months ago)
- Location:
- haiku/trunk
- Files:
-
- 2 added
- 8 modified
-
build/jam/BeOSRules (modified) (1 diff)
-
build/jam/BuildSetup (modified) (4 diffs)
-
build/jam/HaikuImage (modified) (1 diff)
-
build/jam/ImageRules (modified) (4 diffs)
-
build/jam/MainBuildRules (modified) (3 diffs)
-
build/jam/OverriddenJamRules (modified) (1 diff)
-
build/scripts/build_haiku_image (modified) (5 diffs)
-
build/scripts/rm_attrs (added)
-
src/tools/Jamfile (modified) (2 diffs)
-
src/tools/rm_attrs.cpp (added)
Legend:
- Unmodified
- Added
- Removed
-
haiku/trunk/build/jam/BeOSRules
r22412 r24528 263 263 $(HOST_ADD_BUILD_COMPATIBILITY_LIB_DIR) 264 264 if [ \\"$(deleteAttributeFile1)\\" = "true" ]; then 265 rm -f$(1)265 $(RM) $(1) 266 266 fi 267 267 $(2[1]) -O -o "$(1)" "$(2[2-])" -
haiku/trunk/build/jam/BuildSetup
r24413 r24528 528 528 HOST_BUILD_COMPATIBILITY_LIB_DIR = [ FDirName $(HOST_OBJECT_BASE_DIR) lib ] ; 529 529 530 # For the generic attributes emulation: Target rm_attrs -- rm replacement that 531 # also removes the attributes. 532 HOST_RM_ATTRS_TARGET = ; 533 530 534 if $(HOST_PLATFORM_BEOS_COMPATIBLE) { 531 535 HOST_LIBSTDC++ = stdc++.r4 ; 532 536 HOST_LIBROOT = root ; 537 HOST_STATIC_LIBROOT = $(HOST_LIBROOT) ; 533 538 HOST_LIBBE = be ; 534 539 HOST_ADD_BUILD_COMPATIBILITY_LIB_DIR = ; … … 537 542 HOST_LIBSTDC++ = stdc++ ; 538 543 HOST_LIBROOT = libroot_build.so ; 544 HOST_STATIC_LIBROOT = libroot_build.a ; 539 545 HOST_LIBBE = libbe_build.so ; 540 546 HOST_ADD_BUILD_COMPATIBILITY_LIB_DIR … … 557 563 if $(HOST_PLATFORM) = freebsd { 558 564 HOST_LIBROOT += /usr/lib/libgnuregex.so ; 565 HOST_STATIC_LIBROOT += /usr/lib/libgnuregex.so ; 559 566 } else if $(HOST_PLATFORM) = darwin { 560 567 HOST_LIBROOT += /opt/local/lib/libgnuregex.dylib ; 568 HOST_STATIC_LIBROOT += /opt/local/lib/libgnuregex.dylib ; 561 569 } 562 570 … … 581 589 if $(HAIKU_HOST_USE_XATTR) = 1 { 582 590 HOST_DEFINES += HAIKU_HOST_USE_XATTR ; 591 } else { 592 # Otherwise the generic attribute emulation is used, which uses a 593 # directory per file to store its attribute. We need to redefine RM so 594 # that the attributes are removed as well. We use a wrapper script, which 595 # invokes a build tool. If the build tool hasn't been built yet, the 596 # normal "rm" is used and the attributes are leaked (likely there aren't 597 # any yet). 598 RM = $(HOST_ADD_BUILD_COMPATIBILITY_LIB_DIR) ";" 599 [ FDirName $(HAIKU_TOP) build scripts rm_attrs ] 600 [ FDirName $(HAIKU_OBJECT_DIR) $(HOST_PLATFORM) $(HOST_ARCH) release 601 tools rm_attrs ] -f ; 602 # assumes that rm_attrs is built with debugging disabled 603 HOST_RM_ATTRS_TARGET = <build>rm_attrs ; 583 604 } 584 605 } -
haiku/trunk/build/jam/HaikuImage
r24523 r24528 665 665 AddVariableToScript $(script) : headerDirsToCopy 666 666 : $(HAIKU_INSTALL_HEADER_DIRS) ; 667 if $(HOST_RM_ATTRS_TARGET) { 668 AddTargetVariableToScript $(script) : $(HOST_RM_ATTRS_TARGET) : rmAttrs ; 669 } else { 670 AddVariableToScript $(script) : rmAttrs : rm ; 671 } 672 667 673 668 674 # create the other scripts -
haiku/trunk/build/jam/ImageRules
r24201 r24528 38 38 actions InitScript1 39 39 { 40 rm -f$(1)40 $(RM) $(1) 41 41 echo -n > $(1) 42 42 } … … 679 679 actions BuildVMWareImage1 680 680 { 681 rm -f$(1)681 $(RM) $(1) 682 682 $(2[1]) -h 64k -i$(IMAGE_SIZE)M $(1) && 683 683 cat $(2[2]) >> $(1) … … 858 858 actions BuildFloppyBootImage1 859 859 { 860 rm -f$(<)860 $(RM) $(<) 861 861 # make an empty image 862 862 dd if=/dev/zero of=$(<) bs=1k count=1440 … … 883 883 actions BuildCDBootImage1 884 884 { 885 rm -f$(<)885 $(RM) $(<) 886 886 mkisofs -b $(BOOTIMG) -r -J -V bootimg -o $(<) $(>[1]) $(>[2-]) 887 887 } -
haiku/trunk/build/jam/MainBuildRules
r23370 r24528 558 558 # add the build libroot 559 559 if ! $(HOST_PLATFORM_BEOS_COMPATIBLE) { 560 Depends $(target) : $(HOST_LIBROOT) ; 561 NEEDLIBS on $(target) += $(HOST_LIBROOT) ; 560 local libroot = [ on $(target) return $(HOST_LIBROOT) ] ; 561 Depends $(target) : $(libroot) ; 562 NEEDLIBS on $(target) += $(libroot) ; 562 563 } 563 564 } … … 636 637 } 637 638 638 rule BuildPlatformStaticLibrary 639 rule BuildPlatformStaticLibrary lib : sources : otherObjects 639 640 { 640 641 # BuildPlatformStaticLibrary <lib> : <sources> ; 641 642 # Creates a static library from sources. 642 # <lib>: The library.643 # <lib>: The static library to be built. 643 644 # <sources>: List of source files. 644 645 local lib = $(1) ;646 local sources = $(2) ; 645 # <otherObjects>: List of additional object files. 646 # 647 647 648 local objects = [ FGristFiles $(sources:S=$(SUFOBJ)) ] ; 648 649 … … 656 657 } 657 658 658 StaticLibrary $(lib) : $(sources) ;659 } 660 659 StaticLibrary $(lib) : $(sources) : $(otherObjects) ; 660 } 661 -
haiku/trunk/build/jam/OverriddenJamRules
r20352 r24528 38 38 MimeSet $(1) ; 39 39 SetVersion $(1) ; 40 41 # If the generic attribute emulation is enabled, make sure the tool to 42 # remove the attributes is built first. 43 if $(HOST_RM_ATTRS_TARGET) { 44 Depends $(1) : $(HOST_RM_ATTRS_TARGET) ; 45 } 40 46 } 41 47 } -
haiku/trunk/build/scripts/build_haiku_image
r24368 r24528 22 22 # resattr 23 23 # rc 24 # rmAttrs 24 25 # unzip 25 26 # vmdkheader … … 60 61 61 62 62 # attribute-safe rm -rf63 # This makes sure there are no leftover attribute file before removing each file64 attrrmrf()65 {66 test -e "$1" || return67 if [ -d "$outputDir/attributes" ]; then68 # test for gnu stat, else fallback to the bsd one.69 statFormatOpt="-c"70 stat -c '%i' . >/dev/null 2>&1 || statFormatOpt="-f"71 find "$1" -print0 | xargs -0 stat $statFormatOpt %i | awk "{ print \"$outputDir/attributes/\" \$1 }" | xargs rm -rf72 fi73 rm -rf "$1"74 }75 76 63 unzipFile() 77 64 { … … 84 71 if [ $isImage ]; then 85 72 unzipDir=$tmpDir/unzip 86 attrrmrf "$unzipDir"73 $rmAttrs -rf "$unzipDir" 87 74 mkdir -p "$unzipDir" 88 75 … … 90 77 $cp -r "${sPrefix}$unzipDir/." "${tPrefix}$targetUnzipDir" 91 78 92 attrrmrf "$unzipDir"79 $rmAttrs -rf "$unzipDir" 93 80 else 94 81 $unzip -q -o -d "${tPrefix}$targetUnzipDir" "${sPrefix}$zipFile" … … 193 180 194 181 # cleanup tmp dir 195 attrrmrf $mimeTmpDir182 $rmAttrs -rf $mimeTmpDir 196 183 fi # ! updateOnly 197 184 -
haiku/trunk/src/tools/Jamfile
r24446 r24528 12 12 <build>mimeset 13 13 <build>mkindex 14 <build>rm_attrs_tmp 14 15 <build>rmattr 15 16 <build>settype … … 57 58 BuildPlatformMain <build>mkindex : mkindex.cpp : $(HOST_LIBBE) ; 58 59 60 # We want rm_attrs to be self-contained, so we link against the static libroot. 61 HOST_LIBROOT on <build>rm_attrs_tmp = $(HOST_STATIC_LIBROOT) ; 62 BuildPlatformMain <build>rm_attrs_tmp : rm_attrs.cpp 63 : $(HOST_LIBSUPC++) $(HOST_LIBSTDC++) ; 64 MakeLocateDebug <build>rm_attrs ; 65 File <build>rm_attrs : <build>rm_attrs_tmp ; 66 MODE on <build>rm_attrs = 755 ; 67 59 68 BuildPlatformMain <build>rmattr : rmattr.cpp : $(HOST_LIBBE) ; 60 69
