On Thu, May 03, 2012 at 06:37:51AM -0700, John T wrote:
> Is there a simple makefile to just build html documents from some .txt
> files? Or is there a better way?

The following Makefile (GNU make required) should work fine (if
you don't have files with newlines in them or similar crazy):

    HTML = $(patsubst %.txt,%.html,$(shell find -name \*.txt))

    all: $(HTML)

    clean:
        rm -f $(HTML)

    %.html: %.txt
            cd $(<D) && asciidoc $(<F)

    .PHONY: all clean

Regards,
Simon
-- 
+ privacy is necessary
+ using gnupg http://gnupg.org
+ public key id: 0x92FEFDB7E44C32F9

Attachment: pgpaUlWCwm7VU.pgp
Description: PGP signature

Reply via email to