OSDN Git Service

SunOS support fixed with new ffmpeg and x264
[handbrake-jp/handbrake-jp-git.git] / Jamrules
index a82ee7a..490aa87 100644 (file)
--- a/Jamrules
+++ b/Jamrules
@@ -1,97 +1,53 @@
-# Compilers & flags
-CC    = gcc ;
-C++   = g++ ;
-AS    = nasm -f elf ;
-LINK  = g++ ;
-OPTIM = -O3 -funroll-loops ;
+# $Id: Jamrules,v 1.59 2005/11/04 16:06:21 titer Exp $
+#
+# This file is part of the HandBrake source code.
+# Homepage: <http://handbrake.fr/>.
+# It may be used under the terms of the GNU General Public License.
 
-HB_VERSION = 0.6.1 ;
-DEFINES    = HB_$(OS) HB_VERSION=\\\"$(HB_VERSION)\\\" ;
-LANGUAGES  = fr de it pl ru nl es pt ;
+include config.jam ;
 
-NotFile clean-contrib clean-all ;
-Always  clean-contrib ;
-Depends clean-all : clean clean-contrib ;
-
-# _Object: same as Jambase's Object, except
-#  * those aren't cleaned by 'jam clean' (to prevent from deleting
-#    every contrib library by accident)
-#  * it handles *.asm files
-rule _Object
-{
-    MakeLocate $(<) : $(LOCATE_TARGET) ;
-    SEARCH on $(>) = $(SEARCH_SOURCE) ;
-    HDRS on $(<) = $(SEARCH_SOURCE) $(SUBDIRHDRS) $(HDRS) ;
-    HDRRULE on $(>) = HdrRule ;
-    HDRSCAN on $(>) = $(HDRPATTERN) ;
-    HDRSEARCH on $(>) =
-            $(SEARCH_SOURCE:E) $(SUBDIRHDRS) $(HDRS) $(STDHDRS) ;
-    HDRGRIST on $(>) = $(HDRGRIST) ;
-    DEFINES on $(<) += $(DEFINES) ;
-    switch $(>:S)
-    {   
-        case .asm : As $(<) : $(>) ;
-        case .nas : As $(<) : $(>) ;
-        case .c :   Cc $(<) : $(>) ;
-        case .cpp : C++ $(<) : $(>) ;
-    }
-}
-# _Objects: use _Object
-rule _Objects
+if ! $(DEFINES)
 {
-    local _i ;
-    for _i in [ FGristFiles $(<) ]
-    {
-        _Object $(_i:S=$(SUFOBJ)) : $(_i) ;
-        Depends obj : $(_i:S=$(SUFOBJ)) ;
-    }
+    Exit "Please run ./configure first." ;
 }
 
-# Simplified LibraryFromObjects which doesn't clean the target library
-# nor the temporary .o files
-rule _Library
-{
-    local _l _s ;
-    _s = [ FGristFiles $(>:S=$(SUFOBJ)) ] ;
-    _l = $(<:S=$(SUFLIB)) ;
-    _Objects $(>) ;
-    Depends obj : $(_s) ;
-    MakeLocate $(_l) $(_l)($(_s:BS)) : $(LOCATE_TARGET) ;
-    Depends $(_l) : $(_s) ;
-    Archive $(_l) : $(_s) ;
-    if $(RANLIB) { Ranlib $(_l) ; }
-    Depends lib : $(_l) ;
-}
+# This line needs to be manually bumped for each release.
+HB_VERSION  = 0.9.3 ;
 
-# ContribLibrary: library cleaned by 'jam clean-contrib'
-rule ContribLibrary
+# If the user configured with the --snapshot argument,
+# generate  version and build numbers that include
+# the svn revision and are marked as unstable.
+if $(SNAPSHOT) = 1
 {
-    _Library $(<) : $(>) ;
-    Clean clean-contrib : [ FGristFiles $(>:S=$(SUFOBJ)) ] ;
-    Clean clean-contrib : $(<:S=$(SUFLIB)) ;
+HB_VERSION = "svn$(SVN_REV)" ;
+HB_BUILD = "$(BUILD_DATE)01" ;
+APPCAST_URL = "http://handbrake.fr/appcast_unstable.xml" ;
 }
-
-# Library: library cleaned by 'jam clean'
-rule Library
+else
 {
-    _Library $(<) : $(>) ;
-    Clean clean : [ FGristFiles $(>:S=$(SUFOBJ)) ] ;
-    Clean clean : $(<:S=$(SUFLIB)) ;
+HB_BUILD = "$(BUILD_DATE)00" ;
+APPCAST_URL = "http://handbrake.fr/appcast.xml" ;
 }
 
-# Build HandBrake.app using Xcode
+DEFINES    += HB_VERSION=\\\"$(HB_VERSION)\\\" HB_BUILD=$(HB_BUILD) ;
+LANGUAGES   = fr de it pl ru nl es pt ja ;
+RM          = rm -rf ;
+
+# Build HandBrake.app using Xcode --
+# Getting the right version and build numbers
+# requires editing the .plist and specifying
+# extra CFLAGs.
 rule OSXApp
 {
     Depends     exe   : $(<) ;
     Depends     $(<)  : $(>) ;
     Clean       clean : $(1) macosx/build ;
-    BuildOSXApp $(<) ;
 }
-actions BuildOSXApp
+actions OSXApp
 {
-    $(RM) $(<) && \
-      ( cd macosx && xcodebuild ) && \
-      cp -r macosx/build/HandBrake.app $(<) && \
+    $(RM) $(<) macosx/build/HandBrake.app && \
+      ( cd macosx && \
+        xcodebuild HB_BUILD="$(HB_BUILD)" HB_VERSION="$(HB_VERSION)" APPCAST_URL="$(APPCAST_URL)" -target libhb -target HandBrake -target HandBrakeCLI ) && \
       for i in $(LANGUAGES) ; do \
         ( cd $(<)/Contents/Resources && \
           cp -r English.lproj $i.lproj && \
@@ -101,10 +57,9 @@ actions BuildOSXApp
 }
 rule OSXPackage 
 {
-    Depends         $(<) : $(>) ;
-    BuildOSXPackage $(<) ;
+    Depends $(<) : $(>) ;
 }   
-actions BuildOSXPackage
+actions OSXPackage
 {                 
     rm -rf $(<) "HandBrake $(HB_VERSION)" && \
       mkdir "HandBrake $(HB_VERSION)" && \
@@ -112,26 +67,35 @@ actions BuildOSXPackage
       cp COPYING "HandBrake $(HB_VERSION)/COPYING.txt" && \
       cp CREDITS "HandBrake $(HB_VERSION)/CREDITS.txt" && \
       cp THANKS "HandBrake $(HB_VERSION)/THANKS.txt" && \
-      ( cd doc && ./genhtml.sh ) && \
-      cp doc/faq.html "HandBrake $(HB_VERSION)/FAQ.html" && \
+      ( echo "[InternetShortcut]" && \
+        echo "URL=http://handbrake.fr/" ) > \
+        "HandBrake $(HB_VERSION)/HandBrake Homepage.url" && \
+      ( echo "[InternetShortcut]" && \
+        echo "URL=http://forum.handbrake,fr/" ) > \
+        "HandBrake $(HB_VERSION)/HandBrake Forums.url" && \
+      ( echo "[InternetShortcut]" && \
+        echo "URL=http://handbrake.fr/?article=development" ) > \
+        "HandBrake $(HB_VERSION)/Contribute.url" && \
       cp -r HandBrake.app "HandBrake $(HB_VERSION)" && \
       zip -9 -r $(<) "HandBrake $(HB_VERSION)" && \
       rm -rf "HandBrake $(HB_VERSION)"
 }
 
-rule SystemLibraries
-{
-    LINKLIBS on [ FAppendSuffix $(<) : $(SUFEXE) ] +=  $(>) ;
-}
-
-# Jambase's ObjectHdrs doesn't seem to work when ObjectHdrs is called
-# several times on a file, and it doesn't works for asm files. Fixed
-# here.
-rule ObjectHdrs
+rule BeOSPackage 
 {
-    local s = [ FGristFiles $(<:S=$(SUFOBJ)) ] ;
-    HDRS   on $(s) += $(>) ;
-    ASHDRS on $(s) += [ FIncludes $(>) ] ;
-    CCHDRS on $(s) += [ FIncludes $(>) ] ;
+    Depends         $(<) : $(>) ;
+    BuildBeOSPackage $(<) ;
+}   
+actions BuildBeOSPackage
+{                 
+    rm -rf $(<) "HandBrake $(HB_VERSION)" && \
+      mkdir "HandBrake $(HB_VERSION)" && \
+      cp AUTHORS "HandBrake $(HB_VERSION)/AUTHORS.txt" && \
+      cp COPYING "HandBrake $(HB_VERSION)/COPYING.txt" && \
+      cp CREDITS "HandBrake $(HB_VERSION)/CREDITS.txt" && \
+      cp THANKS "HandBrake $(HB_VERSION)/THANKS.txt" && \
+      xres -o HandBrake beos/HandBrake.rsrc && \
+      cp HandBrake "HandBrake $(HB_VERSION)" && \
+      zip -9 -r $(<) "HandBrake $(HB_VERSION)" && \
+      rm -rf "HandBrake $(HB_VERSION)"
 }
-