chiark / gitweb /
Move images.h to images/ directory, and limit to just the images that
authorRichard Kettlewell <rjk@greenend.org.uk>
Sun, 17 Jan 2010 17:37:44 +0000 (17:37 +0000)
committerRichard Kettlewell <rjk@greenend.org.uk>
Sun, 17 Jan 2010 17:37:44 +0000 (17:37 +0000)
Disobedience actually needs.

.bzrignore
configure.ac
disobedience/Makefile.am
disobedience/misc.c
images/Makefile.am

index 4551219feb24bd47b94e4f30f343e3e71986e100..30d6e0df6f5c7ad525db79a819a5f6db9eda516f 100644 (file)
@@ -107,7 +107,7 @@ doc/disorder-normalize.8.html
 doc/disorder-decode.8.html
 doc/disorder-decode.8
 doc/plumbing.png
 doc/disorder-decode.8.html
 doc/disorder-decode.8
 doc/plumbing.png
-disobedience/images.h
+images/images.h
 debian/disorder-server
 doc/disorder-stats.8
 doc/disorder-stats.8.html
 debian/disorder-server
 doc/disorder-stats.8
 doc/disorder-stats.8.html
index 80e8e242bfc35b344011513964afcc5f7a85d683..c72e59d26f279b1885399880ef8ffa6b6179a7a0 100644 (file)
@@ -1,7 +1,7 @@
 # Process this file with autoconf to produce a configure script.
 #
 # This file is part of DisOrder.
 # Process this file with autoconf to produce a configure script.
 #
 # This file is part of DisOrder.
-# Copyright (C) 2004-2009 Richard Kettlewell
+# Copyright (C) 2004-2010 Richard Kettlewell
 # Portions copyright (C) 2007 Ross Younger
 #
 # This program is free software: you can redistribute it and/or modify
 # Portions copyright (C) 2007 Ross Younger
 #
 # This program is free software: you can redistribute it and/or modify
@@ -685,6 +685,7 @@ AM_CONDITIONAL([SERVER], [test x$want_server = xyes])
 if test $want_gtk = yes; then
   AC_DEFINE([WITH_GTK], [1], [define if using GTK+])
 fi
 if test $want_gtk = yes; then
   AC_DEFINE([WITH_GTK], [1], [define if using GTK+])
 fi
+AM_CONDITIONAL([GTK], [test x$want_gtk = xyes])
 
 if test "x$GCC" = xyes; then
   # We need LLONG_MAX and annoyingly GCC doesn't always give it to us
 
 if test "x$GCC" = xyes; then
   # We need LLONG_MAX and annoyingly GCC doesn't always give it to us
index 4a49500303cab2f8ab17483a5293761ddae8e722..7b823c262d9bf6860b58aeaeaf2f91572d862a91 100644 (file)
@@ -1,6 +1,6 @@
 #
 # This file is part of DisOrder.
 #
 # This file is part of DisOrder.
-# Copyright (C) 2006-2009 Richard Kettlewell
+# Copyright (C) 2006-2010 Richard Kettlewell
 #
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 #
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -21,7 +21,6 @@ SUBDIRS=manual
 
 AM_CPPFLAGS=-I${top_srcdir}/lib -I../lib
 AM_CFLAGS=$(GLIB_CFLAGS) $(GTK_CFLAGS)
 
 AM_CPPFLAGS=-I${top_srcdir}/lib -I../lib
 AM_CFLAGS=$(GLIB_CFLAGS) $(GTK_CFLAGS)
-PNGS:=$(shell export LC_COLLATE=C;echo ${top_srcdir}/images/*.png)
 
 disobedience_SOURCES=disobedience.h disobedience.c client.c queue.c    \
        recent.c added.c queue-generic.c queue-generic.h queue-menu.c   \
 
 disobedience_SOURCES=disobedience.h disobedience.c client.c queue.c    \
        recent.c added.c queue-generic.c queue-generic.h queue-menu.c   \
@@ -39,29 +38,13 @@ install-exec-hook:
 
 check: check-help
 
 
 check: check-help
 
-misc.o: images.h
-
-images.h: $(PNGS)
-       set -e;                                                         \
-       exec > @$.new;                                                  \
-       for png in $(PNGS); do                                          \
-         name=`echo $$png | $(GNUSED) 's,.*/,,;s,\.png,,;'`;           \
-         gdk-pixbuf-csource --raw --name=image_$$name $$png;           \
-       done;                                                           \
-       echo "static const struct image images[] = {";                  \
-       for png in $(PNGS); do                                          \
-         name=`echo $$png | $(GNUSED) 's,.*/,,;s,\.png,,;'`;           \
-         echo "  { \"$$name.png\", image_$$name },";                   \
-       done;                                                           \
-       echo "};"
-       mv @$.new $@
+misc.o: ../images/images.h
 
 # check everything has working --help
 check-help: all
        unset DISPLAY;./disobedience --version > /dev/null
        unset DISPLAY;./disobedience --help > /dev/null
 
 
 # check everything has working --help
 check-help: all
        unset DISPLAY;./disobedience --version > /dev/null
        unset DISPLAY;./disobedience --help > /dev/null
 
-CLEANFILES=images.h \
-          *.gcda *.gcov *.gcno *.c.html index.html
+CLEANFILES=*.gcda *.gcov *.gcno *.c.html index.html
 
 export GNUSED
 
 export GNUSED
index 41fcd136cabf74113dd997380f6a46af26b9ab10..a1fdf4d5f7b72d9ec2bdb96097d366f62503f788 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * This file is part of DisOrder
 /*
  * This file is part of DisOrder
- * Copyright (C) 2006-2008 Richard Kettlewell
+ * Copyright (C) 2006-2008, 2010 Richard Kettlewell
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -27,7 +27,7 @@ struct image {
   const guint8 *data;
 };
 
   const guint8 *data;
 };
 
-#include "images.h"
+#include "../images/images.h"
 
 /* Miscellaneous GTK+ stuff ------------------------------------------------ */
 
 
 /* Miscellaneous GTK+ stuff ------------------------------------------------ */
 
index 22322edcabc2bfa38cbd4f91c82d65ccf48f277e..36a6ad5cd6047f5756ddb4758ed7f4be2dc44f75 100644 (file)
@@ -1,6 +1,6 @@
 #
 # This file is part of DisOrder.
 #
 # This file is part of DisOrder.
-# Copyright (C) 2005-2009 Richard Kettlewell
+# Copyright (C) 2005-2010 Richard Kettlewell
 #
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 #
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -30,4 +30,26 @@ randomdisabled32.png randomenabled32.png rtpdisabled32.png           \
 rtpenabled32.png duck55.png cards24.png cards48.png                    \
 cards-simple-fanned.svg cards-thin.svg
 
 rtpenabled32.png duck55.png cards24.png cards48.png                    \
 cards-simple-fanned.svg cards-thin.svg
 
-CLEANFILES=$(SEDFILES)
+DISOBEDIENCE_IMAGES=up.png down.png cards24.png logo256.png duck.png   \
+propagate.png
+
+if GTK
+noinst_HEADERS=images.h
+
+images.h: $(DISOBEDIENCE_IMAGES)
+       set -e;                                                         \
+       exec > @$.new;                                                  \
+       for png in $^; do                                               \
+         name=`echo $$png | $(GNUSED) 's,.*/,,;s,\.png,,;'`;           \
+         gdk-pixbuf-csource --raw --name=image_$$name $$png;           \
+       done;                                                           \
+       echo "static const struct image images[] = {";                  \
+       for png in `echo $^`; do                                        \
+         name=`echo $$png | $(GNUSED) 's,.*/,,;s,\.png,,;'`;           \
+         echo "  { \"$$name.png\", image_$$name },";                   \
+       done|sort;                                                      \
+       echo "};"
+       mv @$.new $@
+endif
+
+CLEANFILES=$(SEDFILES) images.h