[A-a-p-user] How to :include things only once?
Brought to you by:
vimboss
From: Adriaan de G. <ad...@cs...> - 2003-07-28 23:03:59
|
What bit of python magic is required to include a common file only once? Following the example under "Sharing Settings" in tutor-include.html, I've created a common.aap which deifines some rules, an action (for compiling c++ sources with libtool). I've also defined a route. It looks like this: :filetype suffix ltc ltc :action libcompile ltc :print LibCompiling ltc $source :do compile { var_CXX=$libtool --mode=compile --tag=CXX g++ } $source { filetype=cpp } :route ltc libobject libcompile Now it turns out that redefining routes is not allowed (BTW, why is only one command allowed in the route? I'd expect to be able to say :route foo bar <generate blurfl from foo> <generate gnats from blurfl> <generate bar from gnats> in order to define the steps taken from foo to bar), so I can't just blindly :include common.aap everywhere, since if it's already included, AAP dies. What can I do to do the equivalent of #ifndef FILE_H #define FILE_H bla bla... #endif ? -- pub 1024D/FEA2A3FE 2002-06-18 Adriaan de Groot <gr...@kd...> Key fingerprint = 934E 31AA 80A7 723F 54F9 50ED 76AC EE01 FEA2 A3FE |