\r
dev: clean internal\r
\r
-app:\r
+app: libhb/hbversion.h\r
(./DownloadMacOsXContribBinaries.sh ; cd macosx ; xcodebuild -target libhb -target HandBrake -target HandBrakeCLI -configuration UB HB_BUILD="$(HB_BUILD)" HB_VERSION="$(HB_VERSION)" APPCAST_URL="http://handbrake.fr/appcast.xml" build | sed '/^$$/d' )\r
\r
contrib/.contrib:\r
@$(MAKE) --no-print-directory -C contrib all\r
\r
-snapshot-app: contrib/.contrib\r
+snapshot-app: contrib/.contrib libhb/hbversion.h\r
( cd macosx ; xcodebuild -target libhb -target HandBrake -target HandBrakeCLI -configuration Deployment HB_BUILD="$(SNAP_HB_BUILD)" HB_VERSION="$(SNAP_HB_VERSION)" CURRENT_PROJECT_VERSION="$(SNAP_HB_VERSION)" APPCAST_URL="http://handbrake.fr/appcast_unstable.xml" build | sed '/^$$/d' )\r
\r
-app-chunky:\r
+app-chunky: libhb/hbversion.h\r
(./DownloadMacOsXContribBinaries.sh ; cd macosx ; xcodebuild -alltargets -configuration UB HB_BUILD="$(HB_BUILD)" HB_VERSION="$(HB_VERSION)" APPCAST_URL="http://handbrake.fr/appcast.xml" build | sed '/^$$/d' )\r
\r
-cli:\r
+cli: libhb/hbversion.h\r
(./DownloadMacOsXContribBinaries.sh ; cd macosx ; xcodebuild -target libhb -target HandBrakeCLI -configuration UB HB_BUILD="$(HB_BUILD)" HB_VERSION="$(HB_VERSION)" build | sed '/^$$/d' )\r
\r
clean:\r
- (cd macosx ; xcodebuild -alltargets -configuration UB clean | sed '/^$$/d' )\r
+ (cd macosx ; xcodebuild -alltargets -configuration UB clean | sed '/^$$/d' ; rm -f libhb/hbversion.h )\r
\r
mrproper:\r
- (rm -rf contrib/*tar.gz contrib/include contrib/lib contrib/DarwinContribVersion.txt ; cd macosx ; xcodebuild -alltargets -configuration UB clean | sed '/^$$/d' )\r
+ (rm -rf libhb/hbversion.h contrib/*tar.gz contrib/include contrib/lib contrib/DarwinContribVersion.txt ; cd macosx ; xcodebuild -alltargets -configuration UB clean | sed '/^$$/d' )\r
\r
release:\r
(rm -rf HandBrake HandBrake*dmg ; mkdir -p HandBrake/api HandBrake/doc HandBrake/doc/pdf; cp test/BUILDSHARED AUTHORS BUILD COPYING CREDITS NEWS THANKS TRANSLATIONS HandBrake/doc ; cp -rp pdf/ HandBrake/doc/pdf/ ; cp -rp HandBrake.app HandBrake ; cp -rp libhb/libhb.dylib HandBrake/api ; cp -rp libhb/hb.h libhb/common.h libhb/ports.h HandBrake/api ; cp -rp HandBrakeCLI HandBrake ; hdiutil create -srcfolder HandBrake -format UDZO HandBrake-$(HB_VERSION)-MacOS_UB.dmg ; rm -rf HandBrake )\r
contrib/.contrib:\r
@$(MAKE) --no-print-directory -C contrib all\r
\r
-libhb/libhb.a:\r
+libhb/libhb.a: libhb/hbversion.h\r
@$(MAKE) --no-print-directory -C libhb all\r
\r
HandBrakeCLI:\r
clean:\r
@$(MAKE) --no-print-directory -C libhb clean\r
@$(MAKE) --no-print-directory -C test clean\r
+ @rm libhb/hbversion.h\r
\r
mrproper: clean\r
@$(MAKE) --no-print-directory -C contrib mrproper\r
contrib/.contrib:\r
@$(MAKE) --no-print-directory -C contrib all\r
\r
-libhb/libhb.a:\r
+libhb/libhb.a: libhb/hbversion.h\r
@$(MAKE) --no-print-directory -C libhb all\r
\r
HandBrakeCLI: \r
clean:\r
@$(MAKE) --no-print-directory -C libhb clean\r
@$(MAKE) --no-print-directory -C test clean\r
+ @rm libhb/hbversion.h\r
\r
mrproper: clean\r
@$(MAKE) --no-print-directory -C contrib mrproper\r
\r
endif\r
+\r
+libhb/hbversion.h:\r
+ echo "#ifndef HB_BUILD" > libhb/hbversion.h\r
+ echo "#define HB_BUILD $(HB_BUILD)" >> libhb/hbversion.h\r
+ echo "#endif" >> libhb/hbversion.h\r
+ echo "#ifndef HB_VERSION" >> libhb/hbversion.h\r
+ echo "#define HB_VERSION \"$(HB_VERSION)\"" >> libhb/hbversion.h\r
+ echo "#endif" >> libhb/hbversion.h\r
+ echo "#ifndef HB_APPCAST_URL" >> libhb/hbversion.h\r
+ echo "#define APPCAST_URL \"$(APPCAST_URL)\"" >> libhb/hbversion.h\r
+ echo "#endif" >> libhb/hbversion.h\r