Check-in [a7c6a0dc4b]
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:unsilence stuff and remove messages
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:a7c6a0dc4bb25aa3f63c100232681d299e9a93dc
User & Date: brandon@invergo.net 2013-02-21 09:02:48
Context
2013-02-27
20:13
fix atom links check-in: 04a46df51a user: brandon@invergo.net tags: trunk
2013-02-21
09:02
unsilence stuff and remove messages check-in: a7c6a0dc4b user: brandon@invergo.net tags: trunk
09:01
fix missing parenthesis check-in: 99796fa669 user: brandon@invergo.net tags: trunk
Changes

Changes to Makefile.

48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
sp += # add space
post-sort = $(shell echo -e $(subst $(sp),'\n',$2) | sort $1 --key=1,1 -)
sorted_posts := $(addprefix $(POSTS)/,$(call post-sort,-r,$(notdir $(wildcard $(POSTS)/*.md.m4))))

all: clean-index clean-atom index atom posts pages

posts: $(raw_posts)
	@echo "==> building posts"

pages: $(raw_pages)
	@echo "==> building pages"

$(POSTS)/%.html: $(POSTS)/%.html.m4 $(MACROS) $(MAIN_T) $(POST_T)
	@m4 -P $(MACROS) $< $(POST_T) $(MAIN_T) > $@

$(SRC)/%.html: $(SRC)/%.html.m4 $(MACROS) $(MAIN_T) $(PAGE_T)
	@m4 -P $(MACROS) $< $(PAGE_T) $(MAIN_T) > $@

index: 
	@echo "==> building index"
	@echo "TITLE({\"News\"})" >> $(POSTS)/index.html.m4
	@echo "BODY({\"{\"" >> $(POSTS)/index.html.m4
	@for f in $(sorted_posts); do \
		link="`basename $$f .md.m4`.html";\
		head -n3 $$f | m4 -D "__URL"=$$link  \
			-P $(MACROS) - $(BLOG_T) >> $(POSTS)/index.html.m4; \
	done
	@echo "\"}\"})" >> $(POSTS)/index.html.m4

atom:
	@echo "==> building feed"
	@m4 -P $(MACROS) $(ATOM_T) > $(SRC)/atom.xml
	@for f in $(sorted_posts); do \
		link="`basename $$f .md.m4`.html";\
		$(MARKDOWN) $$f | m4 -D "__URL"=$$link -P $(MACROS) - $(ATOM_E_T) \
			| head -n -4 >> $(SRC)/atom.xml; \
	done
	@echo "</feed>" >> $(SRC)/atom.xml


$(SRC)/%.html.m4: $(SRC)/%.md.m4 
	@$(MARKDOWN) $< > $@

$(SRC)/%: $(SRC)/%.m4 $(MACROS)
	@m4 -P $(MACROS) $< > $@

$(DST)/%: $(SRC)/%
	@install -m 644 -D $< $@

clean-index:
	@echo "==> cleaning index"
	-rm $(POSTS)/index.html.m4

clean-atom:
	@echo "==> cleaning feed"
	-rm $(SRC)/atom.xml

clean: clean-index clean-atom
	@echo "==> cleaning dst"
	@mv $(DST) .old_dst
	@rm -rf .old_dst

new-post:
	@if [[ "$(TITLE)" == "" ]]; then echo "Error: no TITLE set"; fi
	@m4 -DTITLE="$(TITLE)" -P $(TEMPLATES)/new_post.md.m4 > \
		$(POSTS)/$(shell date +%Y-%m-%d)-$(subst $(sp),-,$(TITLE)).md.m4

deploy:
	@$(RSYNC) -avze 'ssh -p $(SSH_PORT)' $(RSYNC_DELETE) $(DST)/ $(SSH_USER):$(DOC_ROOT)

.PHONY = all pages posts index clean-index clean new-post atom clean-atom deploy







<


<


|


|


<
|
|
|




|


<
|
|




|



|


|


|


<



<



<
|
|


|
|



|


48
49
50
51
52
53
54

55
56

57
58
59
60
61
62
63
64

65
66
67
68
69
70
71
72
73
74

75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93

94
95
96

97
98
99

100
101
102
103
104
105
106
107
108
109
110
111
sp += # add space
post-sort = $(shell echo -e $(subst $(sp),'\n',$2) | sort $1 --key=1,1 -)
sorted_posts := $(addprefix $(POSTS)/,$(call post-sort,-r,$(notdir $(wildcard $(POSTS)/*.md.m4))))

all: clean-index clean-atom index atom posts pages

posts: $(raw_posts)


pages: $(raw_pages)


$(POSTS)/%.html: $(POSTS)/%.html.m4 $(MACROS) $(MAIN_T) $(POST_T)
	m4 -P $(MACROS) $< $(POST_T) $(MAIN_T) > $@

$(SRC)/%.html: $(SRC)/%.html.m4 $(MACROS) $(MAIN_T) $(PAGE_T)
	m4 -P $(MACROS) $< $(PAGE_T) $(MAIN_T) > $@

index: 

	echo "TITLE({\"News\"})" >> $(POSTS)/index.html.m4
	echo "BODY({\"{\"" >> $(POSTS)/index.html.m4
	for f in $(sorted_posts); do \
		link="`basename $$f .md.m4`.html";\
		head -n3 $$f | m4 -D "__URL"=$$link  \
			-P $(MACROS) - $(BLOG_T) >> $(POSTS)/index.html.m4; \
	done
	echo "\"}\"})" >> $(POSTS)/index.html.m4

atom:

	m4 -P $(MACROS) $(ATOM_T) > $(SRC)/atom.xml
	for f in $(sorted_posts); do \
		link="`basename $$f .md.m4`.html";\
		$(MARKDOWN) $$f | m4 -D "__URL"=$$link -P $(MACROS) - $(ATOM_E_T) \
			| head -n -4 >> $(SRC)/atom.xml; \
	done
	echo "</feed>" >> $(SRC)/atom.xml


$(SRC)/%.html.m4: $(SRC)/%.md.m4 
	$(MARKDOWN) $< > $@

$(SRC)/%: $(SRC)/%.m4 $(MACROS)
	m4 -P $(MACROS) $< > $@

$(DST)/%: $(SRC)/%
	install -m 644 -D $< $@

clean-index:

	-rm $(POSTS)/index.html.m4

clean-atom:

	-rm $(SRC)/atom.xml

clean: clean-index clean-atom

	mv $(DST) .old_dst
	rm -rf .old_dst

new-post:
	if [[ "$(TITLE)" == "" ]]; then echo "Error: no TITLE set"; fi
	m4 -DTITLE="$(TITLE)" -P $(TEMPLATES)/new_post.md.m4 > \
		$(POSTS)/$(shell date +%Y-%m-%d)-$(subst $(sp),-,$(TITLE)).md.m4

deploy:
	$(RSYNC) -avze 'ssh -p $(SSH_PORT)' $(RSYNC_DELETE) $(DST)/ $(SSH_USER):$(DOC_ROOT)

.PHONY = all pages posts index clean-index clean new-post atom clean-atom deploy