Changeset 1075 for trunk


Ignore:
Timestamp:
Nov 11, 2006, 2:02:44 AM (15 years ago)
Author:
titer
Message:

Clean up, generate Info.plist from version.sh as well

Location:
trunk
Files:
1 deleted
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/mk/osx.mk

    r436 r1075  
    22
    33#
    4 # Update Info.plist with the version from version.mk
     4# Use Xcode do make the actual build
    55#
    6 include mk/version.mk
    7 macosx/Info.plist: macosx/Info.plist.in mk/version.mk
    8         $(RM) $@
    9         sed -e "s/%%BUNDLE_VERSION%%/$(VERSION_REVISION)/g" \
    10           -e "s/%%SHORT_VERSION_STRING%%/$(VERSION_STRING)/g" < $< > $@
    11 
    12 #
    13 # Then use Xcode do make the actual build
    14 #
    15 all: macosx/Info.plist
     6all:
    167        @xcodebuild -alltargets -activeconfiguration | grep -v "^$$"
    178clean:
    189        @xcodebuild -alltargets -activeconfiguration clean | grep -v "^$$"
    19         $(RM) macosx/Info.plist
    2010
    2111
     
    2414# Check if this is a release or an SVN build
    2515#
     16include mk/version.mk
    2617ifeq ($(VERSION_STRING),$(VERSION_MAJOR).$(VERSION_MINOR))
    2718VERSION_PACKAGE = $(VERSION_STRING)
  • trunk/version.sh

    r1036 r1075  
    33# $Id$
    44
     5MAJOR=0
     6MINOR=6
     7STRING=0.7-svn
     8
    59# Get current SVN revision from Ids in all source files
    6 REVMAX=`( find . '(' -name '*.[chm]' -o -name '*.cpp' -o -name '*.po' \
     10REV=`( find . '(' -name '*.[chm]' -o -name '*.cpp' -o -name '*.po' \
    711            -o -name '*.mk' -o -name '*.in' -o -name 'Makefile' \
    812            -o -name 'configure' ')' -exec cat '{}' ';' ) | \
     
    2529
    2630# Generate version.mk
    27 cp -f mk/version.mk.in mk/version.mk.new
    28 echo "VERSION_REVISION = $REVMAX" >> mk/version.mk.new
     31cat > mk/version.mk.new << EOF
     32VERSION_MAJOR    = $MAJOR
     33VERSION_MINOR    = $MINOR
     34VERSION_STRING   = $STRING
     35VERSION_REVISION = $REV
     36EOF
    2937replace_if_differs mk/version.mk.new mk/version.mk
    3038
    31 # Generate version.h from version.mk
    32 grep "^VER" mk/version.mk | sed -e 's/^/#define /g' -e 's/= //g' \
    33     -e 's/\(VERSION_STRING[ ]*\)\(.*\)/\1"\2"/' > \
    34     libtransmission/version.h.new
     39# Generate version.h
     40cat > libtransmission/version.h.new << EOF
     41#define VERSION_MAJOR    $MAJOR
     42#define VERSION_MINOR    $MINOR
     43#define VERSION_STRING   "$STRING"
     44#define VERSION_REVISION $REV
     45EOF
    3546replace_if_differs libtransmission/version.h.new libtransmission/version.h
    3647
     48# Generate Info.plist from Info.plist.in
     49sed -e "s/%%BUNDLE_VERSION%%/$REV/" -e "s/%%SHORT_VERSION_STRING%%/$STRING/" \
     50        < macosx/Info.plist.in > macosx/Info.plist.new
     51replace_if_differs macosx/Info.plist.new macosx/Info.plist
     52
    3753exit 0
Note: See TracChangeset for help on using the changeset viewer.