[PATCH 2/3] genmakefile.sh: fix autogeneration of handhelds/Makefile.cursor

Alan Coopersmith alan.coopersmith at oracle.com
Tue Jul 2 19:35:15 PDT 2013


Previously handhelds/Makefile.cursor was manually fixed up after running
genmakefile.sh, in order to get the cursor image files out of the redglass
directory. This fixes the script to correctly generate the Makefile.cursor
files without human intervention.

After this change, the Makefile.cursor files produced in the redglass &
whiteglass directories by genmakefile.sh are still identical to the
versions currently checked into git.

The Makefile.cursors in the handhelds directory is mostly identical to
what was in git - it has lost the comments about needing human edits,
and it has lost the dependencies on the pngs for the larger size cursors
that aren't used in the handhelds cursor theme .cfg files (which just use
the *-16.png sizes of redglass).   The newly generated version is included
in this commit.

Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
---
 genmakefile.sh             |   18 ++++++++---
 handhelds/Makefile.cfg     |    3 ++
 handhelds/Makefile.cursors |   76 +++++++++++++++++++++-----------------------
 3 files changed, 53 insertions(+), 44 deletions(-)

diff --git a/genmakefile.sh b/genmakefile.sh
index 23b25a7..4fe7517 100755
--- a/genmakefile.sh
+++ b/genmakefile.sh
@@ -2,6 +2,9 @@
 # this script written by daniel stone <daniel at freedesktop.org>, placed in the
 # public domain.
 
+# Default srcdir variable, overridden by Makefile.cfg in handhelds directory
+srcdir='$(srcdir)'
+
 test "x$1" = "x" || . "$1"
 
 printf '# this is a generated file -- do not edit.\n'
@@ -14,14 +17,19 @@ printf '\n'
 for i in $CURSORS; do
 	printf '%s:' "${i}"
 	for png in $(cut -d" " -f4 ${i}.cfg); do
-		EXTRA_DIST="${EXTRA_DIST} ${png}"
-		printf ' $(srcdir)/%s' "${png}"
+		if test "x${srcdir}" = 'x$(srcdir)' ; then
+			EXTRA_DIST="${EXTRA_DIST} ${png}"
+		fi
+		printf ' %s/%s' "${srcdir}" "${png}"
 	done
 	printf '\n'
-	printf '\t$(XCURSORGEN) -p $(srcdir) $(srcdir)/%s.cfg %s\n' \
-	    "${i}" "${i}"
+	printf '\t$(XCURSORGEN) -p %s $(srcdir)/%s.cfg %s\n' \
+	    "${srcdir}" "${i}" "${i}"
 	printf '\n'
-	EXTRA_DIST="${EXTRA_DIST} ${i}.cfg ${i}.xcf"
+	EXTRA_DIST="${EXTRA_DIST} ${i}.cfg"
+	if test "x${srcdir}" = 'x$(srcdir)' ; then
+		EXTRA_DIST="${EXTRA_DIST} ${i}.xcf"
+	fi
 done
 
 test "x$DIST" = "x" || EXTRA_DIST="${EXTRA_DIST} ${DIST}"
diff --git a/handhelds/Makefile.cfg b/handhelds/Makefile.cfg
index 16410b2..08f2f11 100644
--- a/handhelds/Makefile.cfg
+++ b/handhelds/Makefile.cfg
@@ -3,6 +3,9 @@ CURSORS="X_cursor based_arrow_down based_arrow_up bottom_left_corner bottom_righ
 
 DIST="Makefile.cfg Makefile.cursors"
 
+# Use .png files from redglass directory
+srcdir='$(top_srcdir)/redglass'
+
 #CursorLinkTarget(arrow,right_ptr)
 #CursorLinkTarget(cross_reverse,cross)
 #CursorLinkTarget(crosshair,cross)
diff --git a/handhelds/Makefile.cursors b/handhelds/Makefile.cursors
index 185ca49..6bdf251 100644
--- a/handhelds/Makefile.cursors
+++ b/handhelds/Makefile.cursors
@@ -1,120 +1,118 @@
 # this is a generated file -- do not edit.
-# edit by daniels -- :%s/-p $(top_srcdir)/redglass/-p $(top_srcdir)\/redglass/
-# edit by kem -- depend on $(top_srcdir)/redglass/*.png and fix EXTRA_DIST
 
 CURSORFILES = X_cursor based_arrow_down based_arrow_up bottom_left_corner bottom_right_corner bottom_side bottom_tee center_ptr circle cross dot dotbox double_arrow draped_box fleur gumby hand2 left_ptr left_ptr_watch left_side left_tee ll_angle pencil right_ptr right_side right_tee sb_h_double_arrow sb_right_arrow sb_up_arrow sb_v_double_arrow shuttle top_left_corner top_right_corner top_side top_tee watch xterm
 CLEANFILES = $(CURSORFILES)
 cursor_DATA = $(CURSORFILES)
 
-X_cursor: $(top_srcdir)/redglass/X_cursor-16.png $(top_srcdir)/redglass/X_cursor-24.png $(top_srcdir)/redglass/X_cursor-32.png $(top_srcdir)/redglass/X_cursor-48.png $(top_srcdir)/redglass/X_cursor-64.png
+X_cursor: $(top_srcdir)/redglass/X_cursor-16.png
 	$(XCURSORGEN) -p $(top_srcdir)/redglass $(srcdir)/X_cursor.cfg X_cursor
 
-based_arrow_down: $(top_srcdir)/redglass/based_arrow_down-16.png $(top_srcdir)/redglass/based_arrow_down-24.png $(top_srcdir)/redglass/based_arrow_down-32.png $(top_srcdir)/redglass/based_arrow_down-48.png $(top_srcdir)/redglass/based_arrow_down-64.png
+based_arrow_down: $(top_srcdir)/redglass/based_arrow_down-16.png
 	$(XCURSORGEN) -p $(top_srcdir)/redglass $(srcdir)/based_arrow_down.cfg based_arrow_down
 
-based_arrow_up: $(top_srcdir)/redglass/based_arrow_up-16.png $(top_srcdir)/redglass/based_arrow_up-24.png $(top_srcdir)/redglass/based_arrow_up-32.png $(top_srcdir)/redglass/based_arrow_up-48.png $(top_srcdir)/redglass/based_arrow_up-64.png
+based_arrow_up: $(top_srcdir)/redglass/based_arrow_up-16.png
 	$(XCURSORGEN) -p $(top_srcdir)/redglass $(srcdir)/based_arrow_up.cfg based_arrow_up
 
-bottom_left_corner: $(top_srcdir)/redglass/bottom_left_corner-16.png $(top_srcdir)/redglass/bottom_left_corner-24.png $(top_srcdir)/redglass/bottom_left_corner-32.png $(top_srcdir)/redglass/bottom_left_corner-48.png $(top_srcdir)/redglass/bottom_left_corner-64.png
+bottom_left_corner: $(top_srcdir)/redglass/bottom_left_corner-16.png
 	$(XCURSORGEN) -p $(top_srcdir)/redglass $(srcdir)/bottom_left_corner.cfg bottom_left_corner
 
-bottom_right_corner: $(top_srcdir)/redglass/bottom_right_corner-16.png $(top_srcdir)/redglass/bottom_right_corner-24.png $(top_srcdir)/redglass/bottom_right_corner-32.png $(top_srcdir)/redglass/bottom_right_corner-48.png $(top_srcdir)/redglass/bottom_right_corner-64.png
+bottom_right_corner: $(top_srcdir)/redglass/bottom_right_corner-16.png
 	$(XCURSORGEN) -p $(top_srcdir)/redglass $(srcdir)/bottom_right_corner.cfg bottom_right_corner
 
-bottom_side: $(top_srcdir)/redglass/bottom_side-16.png $(top_srcdir)/redglass/bottom_side-24.png $(top_srcdir)/redglass/bottom_side-32.png $(top_srcdir)/redglass/bottom_side-48.png $(top_srcdir)/redglass/bottom_side-64.png
+bottom_side: $(top_srcdir)/redglass/bottom_side-16.png
 	$(XCURSORGEN) -p $(top_srcdir)/redglass $(srcdir)/bottom_side.cfg bottom_side
 
-bottom_tee: $(top_srcdir)/redglass/bottom_tee-16.png $(top_srcdir)/redglass/bottom_tee-24.png $(top_srcdir)/redglass/bottom_tee-32.png $(top_srcdir)/redglass/bottom_tee-48.png $(top_srcdir)/redglass/bottom_tee-64.png
+bottom_tee: $(top_srcdir)/redglass/bottom_tee-16.png
 	$(XCURSORGEN) -p $(top_srcdir)/redglass $(srcdir)/bottom_tee.cfg bottom_tee
 
-center_ptr: $(top_srcdir)/redglass/center_ptr-16.png $(top_srcdir)/redglass/center_ptr-24.png $(top_srcdir)/redglass/center_ptr-32.png $(top_srcdir)/redglass/center_ptr-48.png $(top_srcdir)/redglass/center_ptr-64.png
+center_ptr: $(top_srcdir)/redglass/center_ptr-16.png
 	$(XCURSORGEN) -p $(top_srcdir)/redglass $(srcdir)/center_ptr.cfg center_ptr
 
-circle: $(top_srcdir)/redglass/circle-16.png $(top_srcdir)/redglass/circle-24.png $(top_srcdir)/redglass/circle-32.png $(top_srcdir)/redglass/circle-48.png $(top_srcdir)/redglass/circle-64.png
+circle: $(top_srcdir)/redglass/circle-16.png
 	$(XCURSORGEN) -p $(top_srcdir)/redglass $(srcdir)/circle.cfg circle
 
-cross: $(top_srcdir)/redglass/cross-16.png $(top_srcdir)/redglass/cross-24.png $(top_srcdir)/redglass/cross-32.png $(top_srcdir)/redglass/cross-48.png $(top_srcdir)/redglass/cross-64.png
+cross: $(top_srcdir)/redglass/cross-16.png
 	$(XCURSORGEN) -p $(top_srcdir)/redglass $(srcdir)/cross.cfg cross
 
-dot: $(top_srcdir)/redglass/dot-16.png $(top_srcdir)/redglass/dot-24.png $(top_srcdir)/redglass/dot-32.png $(top_srcdir)/redglass/dot-48.png $(top_srcdir)/redglass/dot-64.png
+dot: $(top_srcdir)/redglass/dot-16.png
 	$(XCURSORGEN) -p $(top_srcdir)/redglass $(srcdir)/dot.cfg dot
 
-dotbox: $(top_srcdir)/redglass/dotbox-16.png $(top_srcdir)/redglass/dotbox-24.png $(top_srcdir)/redglass/dotbox-32.png $(top_srcdir)/redglass/dotbox-48.png $(top_srcdir)/redglass/dotbox-64.png
+dotbox: $(top_srcdir)/redglass/dotbox-16.png
 	$(XCURSORGEN) -p $(top_srcdir)/redglass $(srcdir)/dotbox.cfg dotbox
 
-double_arrow: $(top_srcdir)/redglass/double_arrow-16.png $(top_srcdir)/redglass/double_arrow-24.png $(top_srcdir)/redglass/double_arrow-32.png $(top_srcdir)/redglass/double_arrow-48.png $(top_srcdir)/redglass/double_arrow-64.png
+double_arrow: $(top_srcdir)/redglass/double_arrow-16.png
 	$(XCURSORGEN) -p $(top_srcdir)/redglass $(srcdir)/double_arrow.cfg double_arrow
 
-draped_box: $(top_srcdir)/redglass/draped_box-16.png $(top_srcdir)/redglass/draped_box-24.png $(top_srcdir)/redglass/draped_box-32.png $(top_srcdir)/redglass/draped_box-48.png $(top_srcdir)/redglass/draped_box-64.png
+draped_box: $(top_srcdir)/redglass/draped_box-16.png
 	$(XCURSORGEN) -p $(top_srcdir)/redglass $(srcdir)/draped_box.cfg draped_box
 
-fleur: $(top_srcdir)/redglass/fleur-16.png $(top_srcdir)/redglass/fleur-24.png $(top_srcdir)/redglass/fleur-32.png $(top_srcdir)/redglass/fleur-48.png $(top_srcdir)/redglass/fleur-64.png
+fleur: $(top_srcdir)/redglass/fleur-16.png
 	$(XCURSORGEN) -p $(top_srcdir)/redglass $(srcdir)/fleur.cfg fleur
 
-gumby: $(top_srcdir)/redglass/gumby-16.png $(top_srcdir)/redglass/gumby-24.png $(top_srcdir)/redglass/gumby-32.png $(top_srcdir)/redglass/gumby-48.png $(top_srcdir)/redglass/gumby-64.png
+gumby: $(top_srcdir)/redglass/gumby-16.png
 	$(XCURSORGEN) -p $(top_srcdir)/redglass $(srcdir)/gumby.cfg gumby
 
-hand2: $(top_srcdir)/redglass/hand2-16.png $(top_srcdir)/redglass/hand2-24.png $(top_srcdir)/redglass/hand2-32.png $(top_srcdir)/redglass/hand2-48.png $(top_srcdir)/redglass/hand2-64.png
+hand2: $(top_srcdir)/redglass/hand2-16.png
 	$(XCURSORGEN) -p $(top_srcdir)/redglass $(srcdir)/hand2.cfg hand2
 
-left_ptr: $(top_srcdir)/redglass/left_ptr-16.png $(top_srcdir)/redglass/left_ptr-24.png $(top_srcdir)/redglass/left_ptr-32.png $(top_srcdir)/redglass/left_ptr-48.png $(top_srcdir)/redglass/left_ptr-64.png
+left_ptr: $(top_srcdir)/redglass/left_ptr-16.png
 	$(XCURSORGEN) -p $(top_srcdir)/redglass $(srcdir)/left_ptr.cfg left_ptr
 
-left_ptr_watch: $(top_srcdir)/redglass/left_ptr_watch-16.png $(top_srcdir)/redglass/left_ptr_watch-24.png $(top_srcdir)/redglass/left_ptr_watch-32.png $(top_srcdir)/redglass/left_ptr_watch-48.png $(top_srcdir)/redglass/left_ptr_watch-64.png
+left_ptr_watch: $(top_srcdir)/redglass/left_ptr_watch-16.png
 	$(XCURSORGEN) -p $(top_srcdir)/redglass $(srcdir)/left_ptr_watch.cfg left_ptr_watch
 
-left_side: $(top_srcdir)/redglass/left_side-16.png $(top_srcdir)/redglass/left_side-24.png $(top_srcdir)/redglass/left_side-32.png $(top_srcdir)/redglass/left_side-48.png $(top_srcdir)/redglass/left_side-64.png
+left_side: $(top_srcdir)/redglass/left_side-16.png
 	$(XCURSORGEN) -p $(top_srcdir)/redglass $(srcdir)/left_side.cfg left_side
 
-left_tee: $(top_srcdir)/redglass/left_tee-16.png $(top_srcdir)/redglass/left_tee-24.png $(top_srcdir)/redglass/left_tee-32.png $(top_srcdir)/redglass/left_tee-48.png $(top_srcdir)/redglass/left_tee-64.png
+left_tee: $(top_srcdir)/redglass/left_tee-16.png
 	$(XCURSORGEN) -p $(top_srcdir)/redglass $(srcdir)/left_tee.cfg left_tee
 
-ll_angle: $(top_srcdir)/redglass/ll_angle-16.png $(top_srcdir)/redglass/ll_angle-24.png $(top_srcdir)/redglass/ll_angle-32.png $(top_srcdir)/redglass/ll_angle-48.png $(top_srcdir)/redglass/ll_angle-64.png
+ll_angle: $(top_srcdir)/redglass/ll_angle-16.png
 	$(XCURSORGEN) -p $(top_srcdir)/redglass $(srcdir)/ll_angle.cfg ll_angle
 
-pencil: $(top_srcdir)/redglass/pencil-16.png $(top_srcdir)/redglass/pencil-24.png $(top_srcdir)/redglass/pencil-32.png $(top_srcdir)/redglass/pencil-48.png $(top_srcdir)/redglass/pencil-64.png
+pencil: $(top_srcdir)/redglass/pencil-16.png
 	$(XCURSORGEN) -p $(top_srcdir)/redglass $(srcdir)/pencil.cfg pencil
 
-right_ptr: $(top_srcdir)/redglass/right_ptr-16.png $(top_srcdir)/redglass/right_ptr-24.png $(top_srcdir)/redglass/right_ptr-32.png $(top_srcdir)/redglass/right_ptr-48.png $(top_srcdir)/redglass/right_ptr-64.png
+right_ptr: $(top_srcdir)/redglass/right_ptr-16.png
 	$(XCURSORGEN) -p $(top_srcdir)/redglass $(srcdir)/right_ptr.cfg right_ptr
 
-right_side: $(top_srcdir)/redglass/right_side-16.png $(top_srcdir)/redglass/right_side-24.png $(top_srcdir)/redglass/right_side-32.png $(top_srcdir)/redglass/right_side-48.png $(top_srcdir)/redglass/right_side-64.png
+right_side: $(top_srcdir)/redglass/right_side-16.png
 	$(XCURSORGEN) -p $(top_srcdir)/redglass $(srcdir)/right_side.cfg right_side
 
-right_tee: $(top_srcdir)/redglass/right_tee-16.png $(top_srcdir)/redglass/right_tee-24.png $(top_srcdir)/redglass/right_tee-32.png $(top_srcdir)/redglass/right_tee-48.png $(top_srcdir)/redglass/right_tee-64.png
+right_tee: $(top_srcdir)/redglass/right_tee-16.png
 	$(XCURSORGEN) -p $(top_srcdir)/redglass $(srcdir)/right_tee.cfg right_tee
 
-sb_h_double_arrow: $(top_srcdir)/redglass/sb_h_double_arrow-16.png $(top_srcdir)/redglass/sb_h_double_arrow-24.png $(top_srcdir)/redglass/sb_h_double_arrow-32.png $(top_srcdir)/redglass/sb_h_double_arrow-48.png $(top_srcdir)/redglass/sb_h_double_arrow-64.png
+sb_h_double_arrow: $(top_srcdir)/redglass/sb_h_double_arrow-16.png
 	$(XCURSORGEN) -p $(top_srcdir)/redglass $(srcdir)/sb_h_double_arrow.cfg sb_h_double_arrow
 
-sb_right_arrow: $(top_srcdir)/redglass/sb_right_arrow-16.png $(top_srcdir)/redglass/sb_right_arrow-24.png $(top_srcdir)/redglass/sb_right_arrow-32.png $(top_srcdir)/redglass/sb_right_arrow-48.png $(top_srcdir)/redglass/sb_right_arrow-64.png
+sb_right_arrow: $(top_srcdir)/redglass/sb_right_arrow-16.png
 	$(XCURSORGEN) -p $(top_srcdir)/redglass $(srcdir)/sb_right_arrow.cfg sb_right_arrow
 
-sb_up_arrow: $(top_srcdir)/redglass/sb_up_arrow-16.png $(top_srcdir)/redglass/sb_up_arrow-24.png $(top_srcdir)/redglass/sb_up_arrow-32.png $(top_srcdir)/redglass/sb_up_arrow-48.png $(top_srcdir)/redglass/sb_up_arrow-64.png
+sb_up_arrow: $(top_srcdir)/redglass/sb_up_arrow-16.png
 	$(XCURSORGEN) -p $(top_srcdir)/redglass $(srcdir)/sb_up_arrow.cfg sb_up_arrow
 
-sb_v_double_arrow: $(top_srcdir)/redglass/sb_v_double_arrow-16.png $(top_srcdir)/redglass/sb_v_double_arrow-24.png $(top_srcdir)/redglass/sb_v_double_arrow-32.png $(top_srcdir)/redglass/sb_v_double_arrow-48.png $(top_srcdir)/redglass/sb_v_double_arrow-64.png
+sb_v_double_arrow: $(top_srcdir)/redglass/sb_v_double_arrow-16.png
 	$(XCURSORGEN) -p $(top_srcdir)/redglass $(srcdir)/sb_v_double_arrow.cfg sb_v_double_arrow
 
-shuttle: $(top_srcdir)/redglass/shuttle-16.png $(top_srcdir)/redglass/shuttle-24.png $(top_srcdir)/redglass/shuttle-32.png $(top_srcdir)/redglass/shuttle-48.png $(top_srcdir)/redglass/shuttle-64.png
+shuttle: $(top_srcdir)/redglass/shuttle-16.png
 	$(XCURSORGEN) -p $(top_srcdir)/redglass $(srcdir)/shuttle.cfg shuttle
 
-top_left_corner: $(top_srcdir)/redglass/top_left_corner-16.png $(top_srcdir)/redglass/top_left_corner-24.png $(top_srcdir)/redglass/top_left_corner-32.png $(top_srcdir)/redglass/top_left_corner-48.png $(top_srcdir)/redglass/top_left_corner-64.png
+top_left_corner: $(top_srcdir)/redglass/top_left_corner-16.png
 	$(XCURSORGEN) -p $(top_srcdir)/redglass $(srcdir)/top_left_corner.cfg top_left_corner
 
-top_right_corner: $(top_srcdir)/redglass/top_right_corner-16.png $(top_srcdir)/redglass/top_right_corner-24.png $(top_srcdir)/redglass/top_right_corner-32.png $(top_srcdir)/redglass/top_right_corner-48.png $(top_srcdir)/redglass/top_right_corner-64.png
+top_right_corner: $(top_srcdir)/redglass/top_right_corner-16.png
 	$(XCURSORGEN) -p $(top_srcdir)/redglass $(srcdir)/top_right_corner.cfg top_right_corner
 
-top_side: $(top_srcdir)/redglass/top_side-16.png $(top_srcdir)/redglass/top_side-24.png $(top_srcdir)/redglass/top_side-32.png $(top_srcdir)/redglass/top_side-48.png $(top_srcdir)/redglass/top_side-64.png
+top_side: $(top_srcdir)/redglass/top_side-16.png
 	$(XCURSORGEN) -p $(top_srcdir)/redglass $(srcdir)/top_side.cfg top_side
 
-top_tee: $(top_srcdir)/redglass/top_tee-16.png $(top_srcdir)/redglass/top_tee-24.png $(top_srcdir)/redglass/top_tee-32.png $(top_srcdir)/redglass/top_tee-48.png $(top_srcdir)/redglass/top_tee-64.png
+top_tee: $(top_srcdir)/redglass/top_tee-16.png
 	$(XCURSORGEN) -p $(top_srcdir)/redglass $(srcdir)/top_tee.cfg top_tee
 
-watch: $(top_srcdir)/redglass/watch-16.png $(top_srcdir)/redglass/watch-24.png $(top_srcdir)/redglass/watch-32.png $(top_srcdir)/redglass/watch-48.png $(top_srcdir)/redglass/watch-64.png
+watch: $(top_srcdir)/redglass/watch-16.png
 	$(XCURSORGEN) -p $(top_srcdir)/redglass $(srcdir)/watch.cfg watch
 
-xterm: $(top_srcdir)/redglass/xterm-16.png $(top_srcdir)/redglass/xterm-24.png $(top_srcdir)/redglass/xterm-32.png $(top_srcdir)/redglass/xterm-48.png $(top_srcdir)/redglass/xterm-64.png
+xterm: $(top_srcdir)/redglass/xterm-16.png
 	$(XCURSORGEN) -p $(top_srcdir)/redglass $(srcdir)/xterm.cfg xterm
 
 EXTRA_DIST = X_cursor.cfg based_arrow_down.cfg based_arrow_up.cfg bottom_left_corner.cfg bottom_right_corner.cfg bottom_side.cfg bottom_tee.cfg center_ptr.cfg circle.cfg cross.cfg dot.cfg dotbox.cfg double_arrow.cfg draped_box.cfg fleur.cfg gumby.cfg hand2.cfg left_ptr.cfg left_ptr_watch.cfg left_side.cfg left_tee.cfg ll_angle.cfg pencil.cfg right_ptr.cfg right_side.cfg right_tee.cfg sb_h_double_arrow.cfg sb_right_arrow.cfg sb_up_arrow.cfg sb_v_double_arrow.cfg shuttle.cfg top_left_corner.cfg top_right_corner.cfg top_side.cfg top_tee.cfg watch.cfg xterm.cfg Makefile.cfg Makefile.cursors
-- 
1.7.9.2



More information about the xorg-devel mailing list