X-Git-Url: http://git.osdn.jp/view?a=blobdiff_plain;f=Jamrules;h=490aa870cf3c56b0c4af53ed32fa9d9bf7774b69;hb=533776bbad20db93fe964bc69975f108b2a30888;hp=4debdea9e7c0b3f6e4fdce8a5635560eeed1235a;hpb=ab1d75ea0c44e6c69e1224c08c01db19baa7c413;p=handbrake-jp%2Fhandbrake-jp-git.git diff --git a/Jamrules b/Jamrules index 4debdea9..490aa870 100644 --- a/Jamrules +++ b/Jamrules @@ -1,134 +1,101 @@ -# Compilers & flags -CC = gcc ; -C++ = g++ ; -CCFLAGS = $(CFLAGS) ; -C++FLAGS = $(CFLAGS) ; -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: . +# It may be used under the terms of the GNU General Public License. -# HandBrake defines -HB_VERSION = 0.6.0 ; -DEFINES = HB_$(OS) HB_VERSION=\\\"$(HB_VERSION)\\\" ; -#DEFINES += HB_NOMMX ; +include config.jam ; -LANGUAGES = fr de it pl ru nl es pt ; - -# OS-specific -if $(OS) = BEOS -{ - CCFLAGS += -Wno-multichar ; - C++FLAGS += -Wno-multichar ; -} -else if $(OS) = LINUX +if ! $(DEFINES) { - LINKLIBS = -lpthread ; -} -else if $(OS) = MACOSX -{ - # To clean HandBrake.app - RM = rm -rf ; + Exit "Please run ./configure first." ; } -# Contrib* rules: mostly the same than Jambase rules, except -# * Targets aren't cleaned by jam clean (to prevent from deleting -# every contrib library by accident) -# * ContribObject handles *.asm files -# * Temporary *.o files aren't removed -rule ContribObject -{ - 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 .C : C++ $(<) : $(>) ; - case .cc : C++ $(<) : $(>) ; - case .cpp : C++ $(<) : $(>) ; - case .f : Fortran $(<) : $(>) ; - case .l : Cc $(<) : $(<:S=.c) ; - Lex $(<:S=.c) : $(>) ; - case .s : As $(<) : $(>) ; - case .y : Cc $(<) : $(<:S=$(YACCGEN)) ; - Yacc $(<:S=$(YACCGEN)) : $(>) ; - case * : UserObject $(<) : $(>) ; - } -} -rule ContribObjects +# This line needs to be manually bumped for each release. +HB_VERSION = 0.9.3 ; + +# 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 { - local _i ; - for _i in [ FGristFiles $(<) ] - { - ContribObject $(_i:S=$(SUFOBJ)) : $(_i) ; - Depends obj : $(_i:S=$(SUFOBJ)) ; - } +HB_VERSION = "svn$(SVN_REV)" ; +HB_BUILD = "$(BUILD_DATE)01" ; +APPCAST_URL = "http://handbrake.fr/appcast_unstable.xml" ; } -rule ContribLibrary +else { - local _l _s ; - _s = [ FGristFiles $(>:S=$(SUFOBJ)) ] ; - _l = $(<:S=$(SUFLIB)) ; - ContribObjects $(>) ; - Depends obj : $(_s) ; - MakeLocate $(_l) $(_l)($(_s:BS)) : $(LOCATE_TARGET) ; - Depends $(_l) : $(_s) ; - Archive $(_l) : $(_s) ; - if $(RANLIB) { Ranlib $(_l) ; } - Depends lib : $(_l) ; +HB_BUILD = "$(BUILD_DATE)00" ; +APPCAST_URL = "http://handbrake.fr/appcast.xml" ; } -# Custom Library rule: same as ContribLibrary, except 'jam clean' -# removes built objects -rule Library -{ - ContribLibrary $(<) : $(>) ; - Clean clean : [ FGristFiles $(>:S=$(SUFOBJ)) ] ; - Clean clean : $(<:S=$(SUFLIB)) ; -} +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 +# Build HandBrake.app using Xcode -- +# Getting the right version and build numbers +# requires editing the .plist and specifying +# extra CFLAGs. rule OSXApp -{ - Clean clean : $(1) macosx/build ; - BuildOSXApp $(1) ; +{ + Depends exe : $(<) ; + Depends $(<) : $(>) ; + Clean clean : $(1) macosx/build ; } -actions BuildOSXApp +actions OSXApp { - $(RM) $(1) && \ - ( cd macosx && xcodebuild ) && \ - cp -r macosx/build/HandBrake.app $(1) && \ + $(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 $(1)/Contents/Resources && \ + ( cd $(<)/Contents/Resources && \ cp -r English.lproj $i.lproj && \ cp ../../../macosx/i18n/$i.strings \ $i.lproj/Localizable.strings ) \ done ; } rule OSXPackage -{ - BuildOSXPackage $(1) ; +{ + Depends $(<) : $(>) ; } -actions BuildOSXPackage +actions OSXPackage { - rm -rf $(1) "HandBrake $(HB_VERSION)" && \ + 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" && \ - ( 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 $(1) "HandBrake $(HB_VERSION)" && \ + zip -9 -r $(<) "HandBrake $(HB_VERSION)" && \ rm -rf "HandBrake $(HB_VERSION)" } +rule BeOSPackage +{ + 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)" +}