automake
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: several automake questions


From: Alexandre Duret-Lutz
Subject: Re: several automake questions
Date: 12 Oct 2001 13:27:37 +0200
User-agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7

>>> "mcmahill" == mcmahill  <address@hidden> writes:

[...]

 mcmahill> 1) How can I specify a different directory or
 mcmahill> subdirectory for a program?  The application is a cgi
 mcmahill> program which might, for example, end up in
 mcmahill> /usr/local/libexec/cgi-bin.  The standard things like
 mcmahill> bin_PROGRAMS or libexec_PROGRAMS just don't get me to
 mcmahill> the right place.  I somehow need a cgibin_PROGRAMS...

cgibindir = $(libexecdir)/cgi-bin
cgibin_PROGRAMS = mumble
mumble_SOURCES = ...

[...]

 mcmahill> 3)  I have some C files which get generated with a gawk script.
[...]
 mcmahill> Whats a good way to have these generated files end up
 mcmahill> in the distribution tarball for those users who may
 mcmahill> not have gawk installed?  Right now I do something
 mcmahill> like:

 mcmahill> BUILT_SOURCES = \
 mcmahill> air_coil_html.c \
 mcmahill> .....

 mcmahill> SUFFIXES = .html 

 mcmahill> %_html.c : %.html
(BTW, % rules are not portable)
 mcmahill> @AWK_GENSUB_YES@ $(HTML2C) $(srcdir)/$< > $(srcdir)/$@
 mcmahill> @AWK_GENSUB_NO@ echo "Your awk (${AWK}) does not have gensub()"
 mcmahill> @AWK_GENSUB_NO@ touch $(srcdir)/$@

They will be ditributed if you list them with the other _SOURCES
of the program they belong to.  

Also, if the only thing you'll do with these C files is to
compile them (i.e. you don't include them from another source) I
believe you don't need BUILT_SOURCE at all: your program depends
on its sources, and Make knows how to build the missing files
using the rule you added.

[...]

-- 
Alexandre Duret-Lutz



reply via email to

[Prev in Thread] Current Thread [Next in Thread]