Makefile.am 3.75 KB
Newer Older
1 2 3
PDBGEN_BACKUP = 0
PDBGEN_GROUPS =

4 5 6 7 8 9 10 11 12 13 14
pdb_groups = \
	groups/brush.pdb		\
	groups/brush_select.pdb		\
	groups/brushes.pdb		\
	groups/buffer.pdb		\
	groups/channel.pdb		\
	groups/context.pdb		\
	groups/debug.pdb		\
	groups/display.pdb		\
	groups/drawable.pdb		\
	groups/drawable_color.pdb	\
15
	groups/drawable_edit.pdb	\
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
	groups/dynamics.pdb		\
	groups/edit.pdb			\
	groups/fileops.pdb		\
	groups/floating_sel.pdb		\
	groups/font_select.pdb		\
	groups/fonts.pdb		\
	groups/gimp.pdb			\
	groups/gimprc.pdb		\
	groups/gradient.pdb		\
	groups/gradient_select.pdb	\
	groups/gradients.pdb		\
	groups/help.pdb			\
	groups/image.pdb		\
	groups/image_color_profile.pdb	\
	groups/image_convert.pdb	\
	groups/image_grid.pdb		\
	groups/image_guides.pdb		\
	groups/image_sample_points.pdb	\
	groups/image_select.pdb		\
	groups/image_transform.pdb	\
	groups/image_undo.pdb		\
	groups/item.pdb			\
	groups/item_transform.pdb	\
	groups/layer.pdb		\
	groups/message.pdb		\
	groups/paint_tools.pdb		\
	groups/palette.pdb		\
	groups/palette_select.pdb	\
	groups/palettes.pdb		\
	groups/pattern.pdb		\
	groups/pattern_select.pdb	\
	groups/patterns.pdb		\
	groups/plug_in.pdb		\
	groups/plug_in_compat.pdb	\
	groups/procedural_db.pdb	\
	groups/progress.pdb		\
	groups/selection.pdb		\
	groups/text_layer.pdb		\
	groups/text_tool.pdb		\
	groups/unit.pdb			\
	groups/vectors.pdb
57 58

EXTRA_DIST = \
59 60 61 62 63
	README			\
	README_NEW_PDB_PROC	\
	app.pl			\
	enumcode.pl		\
	enumgen.pl		\
64
	enums.pl		\
65
	enums-external.pl	\
66 67 68 69 70 71
	groups.pl		\
	lib.pl			\
	pdb.pl			\
	pdbgen.pl		\
	stddefs.pdb		\
	util.pl			\
72
	$(pdb_groups)
73

Manish Singh's avatar
Manish Singh committed
74
enum_headers = \
75 76 77 78 79
	../libgimpbase/gimpbaseenums.h		\
	../libgimpconfig/gimpconfigenums.h	\
	../app/operations/operations-enums.h	\
	../app/core/core-enums.h		\
	../app/paint/paint-enums.h
80 81

pdb_scripts = \
82 83 84 85 86 87
	pdbgen.pl	\
	stddefs.pdb	\
	pdb.pl		\
	util.pl		\
	enums.pl	\
	groups.pl
88

89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106
enum_deps = \
	enums.pl		\
	$(srcdir)/util.pl

pdbgen_deps = \
	$(enum_deps)		\
	$(srcdir)/app.pl	\
	$(srcdir)/lib.pl	\
	$(srcdir)/pdb.pl	\
	$(srcdir)/stddefs.pdb	\
	$(srcdir)/pdbgen.pl

stamp_files = \
	stamp-enums		\
	stamp-groups		\
	stamp-pdbgen		\
	stamp-enum-code		\
	stamp-enum-code-py
107

Sven Neumann's avatar
Sven Neumann committed
108
DISTCLEANFILES = $(stamp_files)
109

110 111
$(srcdir)/enums.pl: stamp-enums
	@:
112
stamp-enums: $(srcdir)/enumgen.pl $(enum_headers) enums-external.pl Makefile.am
113
	rootme=`pwd`; \
114 115
	destdir=`cd $(top_srcdir) && pwd`; export destdir; \
	builddir=`cd $(top_builddir) && pwd`; export builddir; \
116 117
	cd $(srcdir) && $(PERL) enumgen.pl $(enum_headers) \
	&& echo timestamp > $$rootme/stamp-enums
118 119 120 121

$(srcdir)/groups.pl: stamp-groups
	@:
stamp-groups: Makefile.am
122
	rootme=`pwd`; cd $(srcdir) \
Sven Neumann's avatar
Sven Neumann committed
123 124
	&& echo "# This file is autogenerated" > $$rootme/groups.pl.tmp \
	&& echo "@groups = qw(" >> $$rootme/groups.pl.tmp \
125 126
	&& (for pdb in $(pdb_groups); do \
	      group=`echo $$pdb | sed -e 's%groups/\([^.]*\)\..*%\1%'`; \
Sven Neumann's avatar
Sven Neumann committed
127
	      echo "    $$group" >> $$rootme/groups.pl.tmp; \
128
	    done) \
Sven Neumann's avatar
Sven Neumann committed
129 130 131 132
	&& echo ");" >> $$rootme/groups.pl.tmp \
	&& (cmp -s $$rootme/groups.pl.tmp groups.pl || \
            cp $$rootme/groups.pl.tmp groups.pl) \
	&& rm $$rootme/groups.pl.tmp \
133
	&& echo timestamp > $$rootme/stamp-groups
134

135
stamp-pdbgen: $(pdbgen_deps) $(pdb_scripts) $(pdb_groups) Makefile.am
136
	rootme=`pwd`; \
137 138
	destdir=`cd $(top_srcdir) && pwd`; export destdir; \
	builddir=`cd $(top_builddir) && pwd`; export builddir; \
139 140
	cd $(srcdir) && \
	   PDBGEN_BACKUP=$(PDBGEN_BACKUP) PDBGEN_GROUPS=$(PDBGEN_GROUPS) \
141 142
	   $(PERL) pdbgen.pl app lib \
	&& echo timestamp > $$rootme/stamp-pdbgen
143

144
stamp-enum-code: $(srcdir)/enumcode.pl $(enum_deps)
145
	rootme=`pwd`; \
146 147
	destdir=`cd $(top_srcdir) && pwd`; export destdir; \
	builddir=`cd $(top_builddir) && pwd`; export builddir; \
148
	cd $(srcdir) && \
Manish Singh's avatar
Manish Singh committed
149
	  PDBGEN_BACKUP=$(PDBGEN_BACKUP) \
150 151
	  $(PERL) enumcode.pl \
	 && echo timestamp > $$rootme/stamp-enum-code
152

153
all-local: stamp-pdbgen stamp-enum-code