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 = $(AX_V_LUAC_@AM_V@) > AX_V_LUAC_ = $(AX_V_LUAC_@AM_DEFAULT_V@) > 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
signature.asc
Description: This is a digitally signed message part