[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: gEDA-user: PCB adding exporter GUI



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
Makefile.am 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
LIBPNG_SRCS = \
	dolists.h \
	hid/hidint.h \
	hid/png/png.c \
	hid/png/png.h 
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:

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


BUILT_SOURCES = \
	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 \
	hid/common/hidlist.h


EXTRA_DIST= \
	check_icon.data \
	default_font \
	$(srcdir)/hid/batch/hid.conf \
	$(srcdir)/hid/bom/hid.conf \
	$(srcdir)/hid/gerber/hid.conf \
	$(srcdir)/hid/gtk/gui-icons-misc.data \
	$(srcdir)/hid/gtk/gui-icons-mode-buttons.data \
	$(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 \
	pcbtest.sh.in \
	dbus.xml


DISTCLEANFILES= pcbtest.sh 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 \
	dbus-introspect.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 configure.ac in the top level directory. You'll find
configure tests for the PNG exporter. You "might" not need to modify
anything in confgure.ac, as it actually searches for HIDs to build:


for hid in `cd $srcdir/src/hid; echo *`; do
    F=$srcdir/src/hid/$hid/hid.conf
    if test -f $F 
    then
    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" ;;
	esac
    fi
done



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




_______________________________________________
geda-user mailing list
geda-user@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user