automake
[Top][All Lists]
Advanced

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

Re: Fwd: Integrating flexc++(1) and bisonc++(1) into Makefile.am


From: Kip Warner
Subject: Re: Fwd: Integrating flexc++(1) and bisonc++(1) into Makefile.am
Date: Wed, 12 Jul 2017 22:37:26 -0700

On Wed, 2017-07-12 at 11:55 -0400, Diab Jerius wrote:
> Take a look at section 18.2 of the automake manual "Handling new file
> extensions"
> 
> Essentially you want to tell automake to tell make that you have a
> rule to create a .cpp file from a .lpp file.

Intuitively this seems to make sense. My issue is that I don't have
hundreds of .lpp files, and only anticipate one for the entire source
tree. Further, there's a little ad hoc magic I've got to do on the only
one in running its generated .cpp through sed to insert some code. If
you have an elegant suggestion for this, I'm all ears.

> As an example, here's what I have to compile Lua code
> 
> SUFFIXES += .lc .lua
> AX_V_LUAC = $(address@hidden@)
> AX_V_LUAC_ = $(address@hidden@)
> AX_V_LUAC_0 = @echo LUAC $@;
> .lua.lc :
>         $(AX_V_LUAC)test "$(LUA_PATH)set" = set || export
> LUA_PATH="$(LUA_PATH)" ;\
>         $(LUAC) -o $@ $<
> 
> It uses the automake silent rules convention to quiet things; see
> section 21.3 "How Automake can help in silencing make"

Excellent idea for extending the silent rules. I was actually going to
ask you guys that next. Now I just wish colorgcc recognized it ;)

-- 
Kip Warner | Senior Software Engineer
OpenPGP signed/encrypted mail preferred
http://www.thevertigo.com

Attachment: signature.asc
Description: This is a digitally signed message part


reply via email to

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