# To subscribers of the xforms list from Angus Leeming <angus.leeming@btopenworld.com> :
On Wednesday 23 April 2003 8:16 pm, Lars Gullik Bjønnes wrote:
> Angus Leeming <angus.leeming@btopenworld.com> writes:
>
> [I am not sure if this will reach the xforms list...]
>
> | Let's leave configure.ac as-is for the time being. I'm much more
> | concerned with the state of lib/include/Makefile.am which is a gross hack
> | (because I don't know the right way to do it). All I want to do is to
> | generate forms.h from all these other header files. Surely it can't be
> | that hard really?
>
> May I suggest something different?
Yes, I thought of that, but let's get the current solution working first.
> if that approach is not to be taken then I belive a
> BUILT_SOURCES target might do what you want...
> in combination with some other targets of course...
Yes. The Makefile.am below "sort-of-works". Eg
$ ./autogen.sh
$ mkdir build && cd build && ../configure && make
will work, although autogen.sh complains about
lib/include/Makefile.am:41: invalid unused variable name
`forms_h_BUILT_SOURCES'
However,
$ ./autogen.sh
$ mkdir build && cd build && ../configure && make distdir
$ cd xforms-1.1cvs && mkdir build && cd build
$ ../configure --prefix=$PWD/test-install
$ make
fails because the header files AAA.h -> zzz.h are not regarded as part of the
distribution and so are not copied into distdir. Presumably, this is related
to the autogen.sh warning.
make[3]: Entering directory
`/home/angus/xforms/xforms/build/xforms-1.1cvs/build/lib/include'
make[3]: *** No rule to make target `AAA.h', needed by `forms.h'. Stop.
make[3]: Leaving directory
`/home/angus/xforms/xforms/build/xforms-1.1cvs/build/lib/include'
make[2]: *** [all-recursive] Error 1
I'm somewhat stumped!
Angus
include $(top_srcdir)/config/common.am
CLEANFILES = forms.h
include_HEADERS = forms.h
forms_h_BUILT_SOURCES = \
AAA.h \
Basic.h \
XBasic.h \
bitmap.h \
box.h \
browser.h \
button.h \
canvas.h \
chart.h \
choice.h \
clipbd.h \
clock.h \
counter.h \
cursor.h \
dial.h \
filesys.h \
flps.h \
formbrowser.h \
frame.h \
free.h \
goodies.h \
input.h \
menu.h \
menubar.h \
popup.h \
positioner.h \
scrollbar.h \
slider.h \
tabfolder.h \
text.h \
thumbwheel.h \
timer.h \
xyplot.h \
zzz.h
forms.h: $(forms_h_BUILT_SOURCES)
@rm -f forms.h
@for i in $(forms_h_BUILT_SOURCES); do \
sed "1,/crop here for forms/d" ${srcdir}/$$i >> forms.h; \
done
cmp -s forms.h ../forms.h; \
if [ $$? -ne 0 ]; then \
cp forms.h ../.; \
echo created new forms.h; \
fi
_________________________________________________
To unsubscribe, send the message "unsubscribe" to
xforms-request@bob.usuhs.mil or see
http://bob.usuhs.mil/mailserv/xforms.html
XForms Home Page: http://world.std.com/~xforms
List Archive: http://bob.usuhs.mil/mailserv/list-archives/
Development: http://savannah.nongnu.org/files/?group=xforms
This archive was generated by hypermail 2b29 : Wed Apr 23 2003 - 16:46:39 EDT