hi Tom,
thank you so much for your help! your advice was fantastic. whoops... i
just noticed your name on the autotools book! no wonder!
anyway, everything you mentioned was documented in the "info" file so
you don't have to worry about adding anything.
based on your advice i created my code/Makefile.am as follows:
-----------------------------------------------------------
SUFFIXES = .psw .h
bin_PROGRAMS = example
example_SOURCES = example.c wraps.c
EXTRA_DIST = wraps.psw
BUILT_SOURCES = wraps.c wraps.h
CLEANFILES = wraps.h wraps.c
example_LDADD = $(X_LIBS) $(X_PRE_LIBS) -lX11 $(X_EXTRA_LIBS)
INCLUDES = $(X_CFLAGS)
.psw.c:
pswrap -a -o ${@} $<
.psw.h:
pswrap -a -h ${@} $< > /dev/null 2>&1
-----------------------------------------------------------
and i also included the following in the top-level Makefile.am:
-----------------------------------------------------------
dist-hook:
$(RM) $(distdir)/code/wraps.c
-----------------------------------------------------------
and everything works the way i want it to. when i tried adding the
"wraps.psw" to the "example_SOURCES" line, gcc kept trying to compile
the "wraps.h" file!
-----------------------------------------------------------
gcc -g -O2 -o example example.o wraps.o wraps.h -L/usr/X11R6/lib
-lSM -lICE -lX11 -ldps -lXt
gcc: Compilation of header file requested
make[2]: *** [example] Error 1
-----------------------------------------------------------
thanks again for your help, if anything looks wrong or out-of-place
don't hesitate to educate me.
best regards,
trevor
--
http://home.ica.net/~vjbtlw/