Commit a9592a59 authored by Michael Natterer's avatar Michael Natterer 😴

Merge request 4 - Generated .c sources are used as headers...

...Generate .h files instead.

Generate proper .c and .h files for color-picker and tool cursors in
the directories where they are built, and stop including them in other
.c files.
parent 7fab74f4
......@@ -6,3 +6,5 @@
/libappwidgets.a
/libappwidgets.la
/xgen-wec
/gimp-tool-cursors.c
/gimp-tool-cursors.h
......@@ -456,10 +456,14 @@ libappwidgets_a_sources = \
gimpwindowstrategy.c \
gimpwindowstrategy.h
libappwidgets_a_built_sources = widgets-enums.c
libappwidgets_a_built_sources = \
gimp-tool-cursors.c \
gimp-tool-cursors.h \
widgets-enums.c
libappwidgets_a_SOURCES = \
$(libappwidgets_a_built_sources) $(libappwidgets_a_sources)
$(libappwidgets_a_built_sources) \
$(libappwidgets_a_sources)
#
......@@ -492,3 +496,14 @@ $(srcdir)/widgets-enums.c: xgen-wec
touch $@ 2> /dev/null \
|| true; \
fi
gimp-tool-cursors.h: $(top_builddir)/cursors/gimp-tool-cursors.gresource.xml
$(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) \
--sourcedir=$(top_srcdir)/cursors --generate-header \
--target=$@ $(top_builddir)/cursors/gimp-tool-cursors.gresource.xml
gimp-tool-cursors.c: gimp-tool-cursors.h
$(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) \
--sourcedir=$(top_srcdir)/cursors --generate-source \
--target=$@ $(top_builddir)/cursors/gimp-tool-cursors.gresource.xml
......@@ -23,8 +23,6 @@
#include "gimpcursor.h"
#include "cursors/gimp-tool-cursors.c"
#define cursor_default_x_hot 10
#define cursor_default_y_hot 10
......
/Makefile
/Makefile.in
/.xvpics
/.thumbnails
/gimp-color-picker-cursors.c
/gimp-color-picker-cursors.gresource.xml
/gimp-tool-cursors.c
/gimp-tool-cursors.gresource.xml
......@@ -87,10 +87,6 @@ EXTRA_DIST = \
$(CURSOR_IMAGES) \
gimp-tool-cursors.xcf
noinst_DATA = \
gimp-tool-cursors.c \
gimp-color-picker-cursors.c
CLEANFILES = \
$(noinst_DATA) \
gimp-tool-cursors.gresource.xml \
......@@ -108,12 +104,6 @@ gimp-tool-cursors.gresource.xml: $(CURSOR_IMAGES) Makefile.am
echo ' </gresource>' >> $@; \
echo '</gresources>' >> $@ )
gimp-tool-cursors.c: gimp-tool-cursors.gresource.xml
$(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) \
--sourcedir=$(srcdir) --generate-source \
--target=$@ gimp-tool-cursors.gresource.xml
gimp-color-picker-cursors.gresource.xml: $(CURSOR_IMAGES) Makefile.am
$(AM_V_GEN) ( rm -f $@; \
echo '<?xml version="1.0" encoding="UTF-8"?>' > $@; \
......@@ -129,8 +119,3 @@ gimp-color-picker-cursors.gresource.xml: $(CURSOR_IMAGES) Makefile.am
done; \
echo ' </gresource>' >> $@; \
echo '</gresources>' >> $@ )
gimp-color-picker-cursors.c: gimp-color-picker-cursors.gresource.xml
$(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) \
--sourcedir=$(srcdir) --generate-source \
--target=$@ gimp-color-picker-cursors.gresource.xml
......@@ -13,3 +13,5 @@
/*.trs
/*.log
/xgen-wec
/gimp-color-picker-cursors.c
/gimp-color-picker-cursors.h
......@@ -194,8 +194,10 @@ libgimpwidgets_sources = \
gimpzoommodel.h
libgimpwidgets_built_sources = \
gimpwidgetsenums.c \
gimpwidgetsmarshal.c \
gimp-color-picker-cursors.c \
gimp-color-picker-cursors.h \
gimpwidgetsenums.c \
gimpwidgetsmarshal.c \
gimpwidgetsmarshal.h
libgimpwidgets_extra_sources = gimpwidgetsmarshal.list
......@@ -345,6 +347,16 @@ gimpwidgetsmarshal.c: gimpwidgetsmarshal.h
&& cp xgen-wmc $(@F) \
&& rm -f xgen-wmc xgen-wmc~
gimp-color-picker-cursors.h: $(top_builddir)/cursors/gimp-color-picker-cursors.gresource.xml
$(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) \
--sourcedir=$(top_srcdir)/cursors --generate-header \
--target=$@ $(top_builddir)/cursors/gimp-color-picker-cursors.gresource.xml
gimp-color-picker-cursors.c: gimp-color-picker-cursors.h
$(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) \
--sourcedir=$(top_srcdir)/cursors --generate-source \
--target=$@ $(top_builddir)/cursors/gimp-color-picker-cursors.gresource.xml
#
# test programs, not installed
......
......@@ -39,8 +39,6 @@
#include "gimppickbutton-private.h"
#include "gimpwidgetsutils.h"
#include "cursors/gimp-color-picker-cursors.c"
#include "libgimp/libgimp-intl.h"
......
......@@ -27,8 +27,6 @@
#include "gimppickbutton-private.h"
#include "gimppickbutton-quartz.h"
#include "cursors/gimp-color-picker-cursors.c"
#ifdef GDK_WINDOWING_QUARTZ
#import <AppKit/AppKit.h>
#include <Carbon/Carbon.h> /* For virtual key codes ... */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment