gEDA-user: PCB adding exporter GUI

Peter Clifton pcjc2 at
Wed Oct 28 11:18:00 EDT 2009

On Wed, 2009-10-28 at 09:02 +0100, Alberto Maccioni wrote:
> I'm trying to write a modified version of png exporter gui, but I
> continue to get compilation errors; it seems that Make doesn't have a
> rule to build the new code (which is in a separate directory with a
> different name).
> I modified the .Po file in the .deps subdirectory but probably there's
> something to do to the configure script as well.
> Does anyone know how to do it?

Leave the .Po files alone.. they are auto-generated.. If you open up the in src/, you will find the list of files to build:

For different exporters (which can be conditionally built), there are
separate sections, e.g.:

libpng_a_CPPFLAGS = -I./hid/png
	dolists.h \
	hid/hidint.h \
	hid/png/png.c \
libpng_a_SOURCES = ${LIBPNG_SRCS} hid/png/png_lists.h

hid/png/png_lists.h : ${LIBPNG_SRCS} Makefile
	true > $@
	(for f in ${LIBPNG_SRCS} ; do cat $(srcdir)/$$f ; done) | grep "^REGISTER" > $@.tmp
	mv $@.tmp $@

You'll probably want a copy of that block, but changing the name to your new name.

Other blocks you might need to add to:

	libgtk.a liblesstif.a libbatch.a \
	liblpr.a libgerber.a libbom.a libpng.a libps.a libnelma.a libgts.a

	core_lists.h \
	gpcb-menu.h \
	hid/gtk/gtk_lists.h \
	hid/lesstif/lesstif_lists.h \
	hid/batch/batch_lists.h \
	hid/png/png_lists.h \
	hid/nelma/nelma_lists.h \
	hid/ps/ps_lists.h \
	parse_y.h \
	pcb-menu.h \
	res_parse.h \

	default_font \
	$(srcdir)/hid/batch/hid.conf \
	$(srcdir)/hid/bom/hid.conf \
	$(srcdir)/hid/gerber/hid.conf \
	$(srcdir)/hid/gtk/ \
	$(srcdir)/hid/gtk/ \
	$(srcdir)/hid/gtk/hid.conf \
	$(srcdir)/hid/gtk/pcb.rc \
	$(srcdir)/hid/lesstif/hid.conf \
	$(srcdir)/hid/lpr/hid.conf \
	$(srcdir)/hid/png/hid.conf \
	$(srcdir)/hid/nelma/hid.conf \
	$(srcdir)/hid/ps/hid.conf \
	gpcb-menu.res \
	pcb-menu.res \ \

DISTCLEANFILES= gpcb-menu.h pcb-menu.h \
	hid/batch/batch_lists.h \
	hid/common/hidlist.h \
	hid/gtk/gtk_lists.h \
	hid/lesstif/lesstif_lists.h \
	hid/png/png_lists.h \
	hid/nelma/nelma_lists.h \
	hid/ps/ps_lists.h \
	gts/gts_lists.h \
	core_lists.h \

You will probably be able to get your code to compile even if you
haven't got _all_ of the above setup correctly. (They relate to creating
dist tarballs, and cleaning things up so make distcheck will pass).

Then.. open in the top level directory. You'll find
configure tests for the PNG exporter. You "might" not need to modify
anything in, as it actually searches for HIDs to build:

for hid in `cd $srcdir/src/hid; echo *`; do
    if test -f $F 
    echo checking $F
        . $F
	case $type in
	  gui ) hid_guis="$hid_guis $hid" ;;
	  printer ) hid_printers="$hid_printers $hid" ;;
	  export ) hid_exporters="$hid_exporters $hid" ;;
	  always ) hid_always="$hid_always $hid" ;;

I hope that points you in the right direction. Good luck.

I should have asked at the beginning of this email.. what is it that
your new PNG exporter does differently to the existing .png exporter?

Would it be possible to just add features to the existing exporter?

Best wishes,

Peter Clifton

More information about the geda-user mailing list