~technomancy/fennel-lang.org

d349226f58899c618d71b3cb382d6ee06792910d — Phil Hagelberg 1 year, 6 months ago 89d802c
Update to 0.4.0-dev; compile one-file fennel script.
3 files changed, 40 insertions(+), 20 deletions(-)

M fennel
M main.fnl
M makefile
M fennel => fennel +1 -1
@@ 1,1 1,1 @@
Subproject commit fcd485bbb6ab9508c1d2793c9cf71a2b8b4ba058
Subproject commit 3e8c1cc92b1d5048e5dd4b6893e6dbc147777baa

M main.fnl => main.fnl +5 -3
@@ 63,7 63,7 @@

               [:pre {}
                [:kbd {} (.. "    $ git clone https://github.com/bakpakin/Fennel"
                             " && cd Fennel"
                             "\n    $ cd Fennel && make fennel"
                             "\n    $ ./fennel --compile code.fnl > code.lua"
                             "\n    $ ./fennel --repl"
                             "\n    $ ./fennel code.fnl")]]


@@ 90,8 90,10 @@

               [:h2 {} "Documentation"]
               [:ul {}
                ;; [:li {} "The" [:a {:href "/setup"} "Setup guide"]
                ;;  "is a good place to start."]
                [:li {} "The" [:a {:href "/tutorial"} "Tutorial"]
                 "is a good place to start."]
                 "teaches you the basics of the language"]
                [:li {} "The" [:a {:href "/lua-primer"} "Lua primer"]
                 "will catch you up if you don't already know Lua."]
                [:li {} "The" [:a {:href "/reference"} "Reference"] "lists "


@@ 122,7 124,7 @@
                " for collecting ideas."]

               [:hr {}]
               [:p {} "Fennel is copyright © 2016-2019 Calvin Rose and "
               [:p {} "Fennel is copyright © 2016-2020 Calvin Rose and "
                [:a {:href "https://github.com/bakpakin/Fennel/graphs/contributors"}
                 "contributors."] "released under the MIT/X11 license. "
                "This website is under the same terms and also stored on"

M makefile => makefile +34 -16
@@ 14,31 14,49 @@ PANDOC=pandoc --syntax-definition fennel-syntax.xml \
	-H head.html -A foot.html -T "Fennel" \
	--lua-filter=promote-h1-to-title.lua

index.html: main.fnl sample.html ; fennel/fennel main.fnl $(TAGDIRS) > index.html
fennelview.lua: fennel/fennelview.fnl ; fennel/fennel --compile $^ > $@
generate.lua: fennel/generate.fnl ; fennel/fennel --compile $^ > $@
fennel/fennel: ; make -C fennel fennel

index.html: main.fnl sample.html fennel/fennel
	fennel/fennel main.fnl $(TAGDIRS) > index.html
%.lua: fennel/%.fnl fennel/fennel ; fennel/fennel --compile $< > $@

reference.html: fennel/reference.md ; $(PANDOC) --toc -o $@ $^
%.html: fennel/%.md ; $(PANDOC) -o $@ $^

# TODO: for now all master and tags are generated the same;
# there might be time, when we have "generations" of fennel
# TODO: dedupe v% and master setup here
%/tag-intro.md: ; fennel/fennel tag-intro.fnl $@ > $@

%/tag-intro.md: fennel/fennel ; fennel/fennel tag-intro.fnl $@ > $@
%/repl.md: repl.md ; cp $^ $@
%/init.lua: init.lua ; cp $^ $@
%/repl.fnl: repl.fnl ; cp $^ $@
%/fennelview.lua: %/fennel/fennelview.fnl ; $*/fennel/fennel --compile $^ > $@
%/generate.lua: %/fennel/generate.fnl ; $*/fennel/fennel --compile $^ > $@
v%/fennel: ; git clone --branch $* fennel $@
v%/index.html: v%/tag-intro.md v%/repl.md $(foreach md, $(TAGSOURCES), v%/fennel/${md}.md); $(PANDOC) -o $@ $^
master/fennel: ; git clone --branch master fennel $@
master/index.html: master/tag-intro.md master/repl.md $(foreach md, $(TAGSOURCES), master/fennel/${md}.md); $(PANDOC) -o $@ $^ && rm master/tag-intro.md
%/fennelview.lua: %/fennel/fennelview.fnl %/fennel/fennel
	$*/fennel/fennel --compile $< > $@
%/generate.lua: %/fennel/generate.fnl %/fennel/fennel
	$*/fennel/fennel --compile $< > $@

v%/fennel:
	git clone --branch $* fennel $@
	make -C $(@D) fennel

master/fennel:
	git clone --branch master fennel $@
	make -C $(@D) fennel

v%/index.html: v%/tag-intro.md v%/repl.md $(foreach md, $(TAGSOURCES), \
		v%/fennel/${md}.md)
	$(PANDOC) -o $@ $^

master/index.html: master/tag-intro.md master/repl.md \
		$(foreach md, $(TAGSOURCES), master/fennel/${md}.md)
	$(PANDOC) -o $@ $^ && rm master/tag-intro.md

tagdirs: ; $(foreach tagdir, $(TAGDIRSS), mkdir -p ${tagdir})
cleantagdirs: ; $(foreach tagdir, $(TAGDIRS), rm -rf ${tagdir})
tags: tagdirs $(foreach tagdir, $(TAGDIRS), ${tagdir}/fennel)
TAGDOCS := $(foreach tagdir, $(TAGDIRS), $(foreach file, index.html init.lua repl.fnl fennelview.lua generate.lua, ${tagdir}/${file}))
TAGDOCS := $(foreach tagdir, $(TAGDIRS), \
	$(foreach file, index.html init.lua repl.fnl fennelview.lua generate.lua, \
		${tagdir}/${file}))

build: html lua tagdocs
html: $(HTML) index.html


@@ 50,12 68,12 @@ upload: $(HTML) $(LUA) $(TAGDIRS) index.html init.lua repl.fnl fennel.css \
		fengari-web.js .htaccess fennel
	rsync -r $^ fenneler@fennel-lang.org:fennel-lang.org/

conf/%.html: conf/%.fnl ; fennel/fennel $^ > $@
conf/%.html: conf/%.fnl fennel/fennel ; fennel/fennel $< > $@

conf/thanks.html: conf/thanks.fnl ; fennel/fennel $^ > $@
conf/signup.cgi: conf/signup.fnl
conf/thanks.html: conf/thanks.fnl fennel/fennel ; fennel/fennel $< > $@
conf/signup.cgi: conf/signup.fnl fennel/fennel
	echo "#!/usr/bin/env lua" > $@
	fennel/fennel --compile $^ >> $@
	fennel/fennel --compile $< >> $@
	chmod 755 $@

uploadconf: conf/*.html conf/*.jpg conf/.htaccess fennelview.lua conf/signup.cgi