]> granicus.if.org Git - handbrake/commitdiff
Have to handle hbversion.h in make, not just jam.
authorvan <vanj.hb@gmail.com>
Sun, 1 Jun 2008 03:17:35 +0000 (03:17 +0000)
committervan <vanj.hb@gmail.com>
Sun, 1 Jun 2008 03:17:35 +0000 (03:17 +0000)
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1484 b64f7644-9d1e-0410-96f1-a4d463321fa5

Makefile

index 7f914d2464e6fb39452632ebfe5654a4d21e751f..7b3acb5d46447dfb05e23ee10c383d495dc764fd 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -19,26 +19,26 @@ test:       clean cli
 \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
@@ -68,7 +68,7 @@ all:  contrib/.contrib libhb/libhb.a HandBrakeCLI
 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
@@ -77,6 +77,7 @@ HandBrakeCLI:
 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
@@ -98,7 +99,7 @@ contribPack:
 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
@@ -107,8 +108,20 @@ HandBrakeCLI:
 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