John T | 3 May 15:37 2012
Picon

Simple Makefile

Is there a simple makefile to just build html documents from some .txt files? Or is there a better way?

Thanks
John

--
You received this message because you are subscribed to the Google Groups "asciidoc" group.
To view this discussion on the web visit https://groups.google.com/d/msg/asciidoc/-/augMMjhb0WcJ.
To post to this group, send email to asciidoc-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to asciidoc+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit this group at http://groups.google.com/group/asciidoc?hl=en.
Simon Ruderich | 3 May 17:57 2012

Re: Simple Makefile

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
John T | 4 May 15:16 2012
Picon

Re: Simple Makefile

Simon,

Thanks so much that worked perfect as soon as I figured out make wants tabs instead of spaces.

Thanks
John

--
You received this message because you are subscribed to the Google Groups "asciidoc" group.
To view this discussion on the web visit https://groups.google.com/d/msg/asciidoc/-/3PSsNvUhdUMJ.
To post to this group, send email to asciidoc-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to asciidoc+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit this group at http://groups.google.com/group/asciidoc?hl=en.

Gmane