On 10/05/2010 02:35 PM, Bruno Haible wrote:
Thanks; this is good and would solve half of the problem. But an expansion that contains #if and #pragma would also collide with 'make' syntax, as explained in <http://lists.gnu.org/archive/html/bug-gnulib/2008-10/msg00300.html>.
Maybe we're thinking about this wrong. We already use sed's r command to inline the body of a secondary file. So, what if, instead of trying to pass # through AC_SUBST, automake, and make, we instead just build the minimal 4-liner file, parallel to $(CXXDEFS_H), $(ARG_NONNULL_H), and $(WARN_ON_USE_H), and use sed's r command to pull it in at the right place.
Then, you're back to a one-liner solution in the *.in.h files, which expands to the appropriate number of lines in the installed replacement header.
-- Eric Blake [email protected] +1-801-349-2682 Libvirt virtualization library http://libvirt.org
