[Top][All Lists]

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

Re: Generating HeaderFiles

From: Bruce Korb
Subject: Re: Generating HeaderFiles
Date: Mon, 08 Jul 2002 09:49:34 -0700

Enrico Ng wrote:
> I am trying to make an automake file to create libtool libraries.
> The problem is that the libraries I would like to create depend on
> header files that have to generated.
> How do I do this in automake?

With normal "make" dependency rules.  Below is my for
"xml2ag".  "xmlopts.c", "xmlopts.h" and "fork.c" are derived files.
So are "xml2ag.1", "" and "xml2ag.texi":

TARG = xml2ag

bin_PROGRAMS    = xml2ag
nodist_xml2ag_SOURCES = xmlopts.c xmlopts.h fork.c
xml2ag_SOURCES  = xml2ag.c

## SUBDIRS      = test
EXTRA_DIST      = xmlopts.def fork.tpl
AGEXE           = $(top_builddir)/agen5/@AGEXE@ -L$(top_srcdir)/agen5
xml2ag_LDADD    = $(top_builddir)/autoopts/
man_MANS        = $(TARG).1
DOCFILES        = $(TARG).texi $(TARG).menu $(TARG).1
DISTCLEANFILES  = $(DOCFILES) $(nodist_xml2ag_SOURCES) *-stamp

all : gen
gen : $(nodist_xml2ag_SOURCES) $(DOCFILES)

xmlopts.c $(xml2ag_OBJECTS) : xmlopts.h

xmlopts.h : xmlopts.def
        top_builddir=$(top_builddir) COLUMNS_EXE=`cd ../columns;pwd`/columns \
        $(AGEXE) -L$(top_srcdir)/autoopts $(srcdir)/xmlopts.def

fork.c : fork.tpl xmlopts.def
        top_builddir=$(top_builddir) COLUMNS_EXE=`cd ../columns;pwd`/columns \
        $(AGEXE) -T fork.tpl xmlopts.def

$(DOCFILES) : doc-stamp

doc-stamp : xmlopts.def $(TARG)
        top_builddir=$(top_builddir) \
        $(AGEXE) -L$(top_srcdir)/autoopts -Taginfo -b$(TARG) -DLEVEL=section \
        $(AGEXE) -L$(top_srcdir)/autoopts -T agman1 -b$(TARG) 
        @touch $@

reply via email to

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