<p>I use this tool called <a href="http://www.lazycplusplus.com/" rel="nofollow noreferrer">Lazy C++</a> which breaks a single C++ .lzz file into a .h and .cpp file. I want <a href="http://makepp.sourceforge.net/" rel="nofollow noreferrer">Makepp</a> to expect both of these files to exist after my rule for building .lzz files, but I'm not sure how to put two targets into a single build line.</p>

[{'answer_id': 35592, 'author': 'Tynan', 'author_id': 3548, 'author_profile': 'https://Stackoverflow.com/users/3548', 'pm_score': 3, 'selected': True, 'text': '<p>I\'ve never used Makepp personally, but since it\'s a drop-in replacement for GNU Make, you should be able to do something like:</p>\n\n<pre><code>build: foo.h foo.cpp\n   g++ $(CFLAGS) foo.cpp -o $(LFLAGS) foo\n\nfoo.h foo.cpp: foo.lzz\n   lzz foo.lzz\n</code></pre>\n\n<p>Also not sure about the lzz invocation there, but that should help.  You can read more about this at <a href="http://theory.uwinnipeg.ca/gnu/make/make_37.html" rel="nofollow noreferrer">http://theory.uwinnipeg.ca/gnu/make/make_37.html</a>.</p>\n'}, {'answer_id': 2717514, 'author': 'Daniel', 'author_id': 326407, 'author_profile': 'https://Stackoverflow.com/users/326407', 'pm_score': 2, 'selected': False, 'text': '<p>Lzz is amazing!  This is just what I was looking for <a href="http://groups.google.com/group/comp.lang.c++/browse_thread/thread/c50de73b70a6a957/f3f47fcdcfb6bc09" rel="nofollow noreferrer">http://groups.google.com/group/comp.lang.c++/browse_thread/thread/c50de73b70a6a957/f3f47fcdcfb6bc09</a></p>\n\n<p>Actually all you need is to depend (typically) on foo.o in your link rule, and a pattern rule to call lzz:</p>\n\n<pre><code>%.cpp %.h: %.lzz\n    lzz $(input)\n</code></pre>\n\n<p>The rest will fall into place automatically.  When compiling any source that includes foo.h, or linking foo.o to a library or program, lzz will first get called automatically.</p>\n\n<p>Makepp will also recognize if only the timestamp but not the content of the produced file changed, and ignore that.  But it can\'t hurt to give it less to do, by using the lzz options to suppress recreating an identical file.</p>\n\n<p>Regards -- Daniel</p>\n'}]
['https://Stackoverflow.com/questions/35548', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/3594/']