diff options
author | Richard Jones <rjones@redhat.com> | 2009-04-25 18:28:24 +0100 |
---|---|---|
committer | Richard Jones <rjones@redhat.com> | 2009-04-25 18:28:24 +0100 |
commit | b6d5c9e646d0aa18699a88d02ed9205380553b65 (patch) | |
tree | 968f654f1efcfaf21d32b09ead0bfe570c050b66 /Makefile.am | |
parent | a057a058e72d0949db4140e9a03b7a0e5b3c823c (diff) | |
download | libguestfs-b6d5c9e646d0aa18699a88d02ed9205380553b65.tar.gz libguestfs-b6d5c9e646d0aa18699a88d02ed9205380553b65.tar.xz libguestfs-b6d5c9e646d0aa18699a88d02ed9205380553b65.zip |
Better generation of recipes page.
Diffstat (limited to 'Makefile.am')
-rw-r--r-- | Makefile.am | 30 |
1 files changed, 4 insertions, 26 deletions
diff --git a/Makefile.am b/Makefile.am index 40e7980f..fb1d42ba 100644 --- a/Makefile.am +++ b/Makefile.am @@ -50,7 +50,8 @@ EXTRA_DIST = \ recipes/*.html \ recipes/*.sh \ recipes/*.example \ - html/recipes.css + html/recipes.css \ + make-recipes.sh # Build the root filesystem. # Currently this is arch-dependent, so it seems like putting it in @@ -142,32 +143,9 @@ html/guestfish.1.html: guestfish.pod guestfish-actions.pod --outfile $@ # Recipes web page. -html/recipes.html: $(wildcard recipes/*.sh) $(wildcard recipes/*.html) $(wildcard recipes/*.example) Makefile +html/recipes.html: $(wildcard recipes/*.sh) $(wildcard recipes/*.html) $(wildcard recipes/*.example) Makefile make-recipes.sh rm -f $@ $@-t - echo '<html><head><title>guestfish recipes</title>' >> $@-t; \ - echo '<link rel="stylesheet" href="recipes.css" type="text/css" title="Standard"/>' >> $@-t; \ - echo '</head><body>' >> $@-t; \ - echo '<h1>guestfish recipes</h1>' >> $@-t; \ - echo '<p>You can also find these in the <code>recipes/</code> subdirectory of the source.</p>' >> $@-t; \ - for f in recipes/*.sh; do \ - b=`basename $$f .sh`; \ - echo -n '<a name="'$$b'"></a>' >> $@-t; \ - if [ -r recipes/$$b.html ]; then \ - cat recipes/$$b.html >> $@-t; \ - else \ - echo '<h2>$$b</h2>' >> $@-t; \ - fi; \ - echo '<pre class="example">' >> $@-t; \ - sed -e 's,&,\&,g' -e 's,<,\<,g' -e 's,>,\>,g' < $$f >> $@-t; \ - echo '</pre>' >> $@-t; \ - if [ -r recipes/$$b.example ]; then \ - echo '<h3>Example output</h3>' >> $@-t; \ - echo '<pre>' >> $@-t; \ - sed -e 's,&,\&,g' -e 's,<,\<,g' -e 's,>,\>,g' < recipes/$$b.example >> $@-t; \ - echo '</pre>' >> $@-t; \ - fi; \ - done; \ - echo '</body></html>' >> $@-t; \ + sh make-recipes.sh recipes/*.sh > $@-t mv $@-t $@ website: html/guestfs.3.html html/guestfish.1.html html/recipes.html |