On Tuesday 09 April 2002 12:56 pm, Lars Gullik Bj�nnes wrote:
> Angus Leeming <[EMAIL PROTECTED]> writes:
> | Attached is a first stab at getting the generation of those form_*.[Ch]
> | files from the .fd ones again. Currently all is horribly broken if the
> | build dir and src dir are different.
>
> Because this:
>
> updatesrc: test
>       for fil in *.C *.h; \
>       do cmp -s $$fil ../$$fil || mv $$fil ..; \
>       done
>       rm -f *.[hHcC] *.bak
>
> .fd.C:
>       ${SHELL} ./fdfix.sh $<
>
> Does not take $(srcdir) and $(builddir) into account.

Sure.

> Instead of changing how fd->C files are generated and compiled, I'd
> like a lot better at this stage to just insert the $(srcdir) and
> $(builddir) where approp.
>
> It is even possible that we should just disallow fd->C generation when
> srcdir != builddir.

This seems best for now. I'll just use makefile.old

> | I decided that since the .[Ch] files are generated, they should go in the
> | build tree.
> |
> | I don't know how to get the xforms/Makefile.am to use them however.
> | Pointers welcome.
> |
> | It'd be good if we could through out the "updatesrc" option in the
> | xforms/forms/Makefile.am and just run make normally. To do this, we need
> | to ascertain whether $srcdir/form_xxx.fd is newer than
> | $builddir/form_xxx.[Ch]. Again, pointers would be good ;-)
>
> Make solves this automatically for you.
>
> This is 1.3 stuff.
>
> | If we can do all this, then we can remove the xforms/form_xxx.[Ch] files
> | from the repository.
>
> Let's do that in 1.3 then.

As you wish. Actually it's turning out pretty easy. Here's the 
xforms/forms/Makefile.am that builds .o files from .fd ones.

Angus
include $(top_srcdir)/config/common.am

noinst_LTLIBRARIES = libfdesign.la

# I'm not at all sure why these files need to be part of a class...
# Angus 9 April 2002
INCLUDES = -I$(srcdir)/.. \
        -I$(top_srcdir)/src  \
        -I$(top_srcdir)/src/frontends/ \
        -I$(top_srcdir)/src/frontends/controllers \
        $(SIGC_CFLAGS) $(BOOST_INCLUDES)

SHELL = /bin/sh
SCRIPT = $(srcdir)/fdfix.sh

SUFFIXES = .fd

SRCS =  form_aboutlyx.fd \
        form_bibitem.fd \
        form_bibtex.fd \
        form_bibtex.fd \
        form_browser.fd \
        form_character.fd \
        form_citation.fd \
        form_document.fd \
        form_error.fd \
        form_ert.fd \
        form_external.fd \
        form_filedialog.fd \
        form_float.fd \
        form_forks.fd \
        form_graphics.fd \
        form_include.fd \
        form_index.fd \
        form_maths_deco.fd \
        form_maths_delim.fd \
        form_maths_matrix.fd \
        form_maths_panel.fd \
        form_maths_space.fd \
        form_maths_style.fd \
        form_minipage.fd \
        form_paragraph.fd \
        form_preamble.fd \
        form_preferences.fd \
        form_print.fd \
        form_ref.fd \
        form_search.fd \
        form_sendto.fd \
        form_spellchecker.fd \
        form_tabular.fd \
        form_tabular_create.fd \
        form_texinfo.fd \
        form_thesaurus.fd \
        form_toc.fd \
        form_url.fd

libfdesign_la_SOURCES = $(SRCS:.fd=.C) $(SRCS:.fd=.h)

libfdesign.la: $(libfdesign_la_OBJECTS) $(libfdesign_la_DEPENDENCIES)

.fd.C:
        ${SHELL} ${SCRIPT} $<

clean-local:
        rm -f *.[Ch] fdfixc_modified.sed
#       rm -f $(srcdir)/*.[hc] $(srcdir)/*.bak

#distclean-local:
#       rm -f $(srcdir)/*.orig $(srcdir)/*.rej $(srcdir)/*~

Reply via email to