X-Git-Url: http://git.annexia.org/?p=libguestfs.git;a=blobdiff_plain;f=Makefile.am;h=fb1d42bab99679f0c2548fcc8309e392caceeff3;hp=40e7980fea4deb09acb64ae18ac79b2644300913;hb=b6d5c9e646d0aa18699a88d02ed9205380553b65;hpb=a057a058e72d0949db4140e9a03b7a0e5b3c823c;ds=sidebyside diff --git a/Makefile.am b/Makefile.am index 40e7980..fb1d42b 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 'guestfish recipes' >> $@-t; \ - echo '' >> $@-t; \ - echo '' >> $@-t; \ - echo '

guestfish recipes

' >> $@-t; \ - echo '

You can also find these in the recipes/ subdirectory of the source.

' >> $@-t; \ - for f in recipes/*.sh; do \ - b=`basename $$f .sh`; \ - echo -n '' >> $@-t; \ - if [ -r recipes/$$b.html ]; then \ - cat recipes/$$b.html >> $@-t; \ - else \ - echo '

$$b

' >> $@-t; \ - fi; \ - echo '
' >> $@-t; \
-	  sed -e 's,&,\&,g' -e 's,<,\<,g' -e 's,>,\>,g' < $$f >> $@-t; \
-	  echo '
' >> $@-t; \ - if [ -r recipes/$$b.example ]; then \ - echo '

Example output

' >> $@-t; \ - echo '
' >> $@-t; \
-	    sed -e 's,&,\&,g' -e 's,<,\<,g' -e 's,>,\>,g' < recipes/$$b.example >> $@-t; \
-	    echo '
' >> $@-t; \ - fi; \ - done; \ - echo '' >> $@-t; \ + sh make-recipes.sh recipes/*.sh > $@-t mv $@-t $@ website: html/guestfs.3.html html/guestfish.1.html html/recipes.html