~ubuntu-branches/ubuntu/quantal/sgt-puzzles/quantal

« back to all changes in this revision

Viewing changes to debian/patches/205_update-version-as-needed.diff

  • Committer: Bazaar Package Importer
  • Author(s): Ben Hutchings
  • Date: 2011-03-01 04:16:54 UTC
  • mfrom: (1.2.9 upstream)
  • mto: This revision was merged to the branch mainline in revision 18.
  • Revision ID: james.westby@ubuntu.com-20110301041654-949qy9qrroziy7vq
* New upstream version:
  - Add Range and Signpost puzzles
  - Use stock icons and conventional order for dialog buttons
  - Use Cairo for screen rendering
* Update German translation, thanks to Helge Kreutzmann
* Remove or update patches applied or partially applied upstream
* Use Debian source format 3.0 (quilt)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
Fix dependencies of version.o and version.def to avoid unnecessary rebuilds.
2
 
 
3
 
Index: sgt-puzzles/Recipe
4
 
===================================================================
5
 
--- sgt-puzzles.orig/Recipe     2009-02-16 00:57:41.000000000 +0000
6
 
+++ sgt-puzzles/Recipe  2009-02-16 01:46:46.000000000 +0000
7
 
@@ -110,15 +110,25 @@
8
 
 # For Unix, we also need the gross MD5 hack that causes automatic
9
 
 # version number selection in release source archives.
10
 
 !begin gtk
11
 
-version.o: FORCE;
12
 
-FORCE:
13
 
+version.o: version.c version.def
14
 
+       $(CC) $(COMPAT) $(XFLAGS) $(CFLAGS) `cat version.def` -c version.c
15
 
+version.def: FORCE
16
 
        if test -z "$(VER)" && test -f manifest && md5sum -c manifest; then \
17
 
-               $(CC) $(COMPAT) $(XFLAGS) $(CFLAGS) `cat version.def` -c version.c; \
18
 
-       elif test -z "$(VER)" && test -d .svn && svnversion . >/dev/null 2>&1; then \
19
 
-               $(CC) $(COMPAT) $(XFLAGS) $(CFLAGS) "-DREVISION=`svnversion .`" -c version.c; \
20
 
+               :; \
21
 
        else \
22
 
-               $(CC) $(COMPAT) $(XFLAGS) $(CFLAGS) $(VER) -c version.c; \
23
 
+               if test -z "$(VER)" && test -d .svn && svnversion . >/dev/null 2>&1; then \
24
 
+                       echo "-DREVISION=`svnversion .`" >version.def.new; \
25
 
+               else \
26
 
+                       echo "$(VER)" >version.def.new; \
27
 
+               fi && \
28
 
+               if diff -q version.def.new version.def; then \
29
 
+                       rm version.def.new; \
30
 
+               else \
31
 
+                       rm -f manifest && \
32
 
+                       mv version.def.new version.def; \
33
 
+               fi; \
34
 
        fi
35
 
+.PHONY: FORCE
36
 
 !end
37
 
 !specialobj gtk version
38
 
 !begin nestedvm