Skip to content

Commit

Permalink
fix makefile and filename
Browse files Browse the repository at this point in the history
  • Loading branch information
tyrchen committed Nov 11, 2019
1 parent c5b869f commit 8e94334
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
19 changes: 9 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ SRC=src
RES=resources
SRC_DIRS=$(basename $(shell find src -maxdepth 1 -mindepth 1 -type d))
RES_DIRS=$(basename $(shell find resources -maxdepth 1 -mindepth 1 -type d))
DOCS=$(shell find src -name "*.md")
DOCS=$(shell find src -name "*.md" | sort)
RDOCS=$(DOCS:$(SRC)/%.md=$(OUTPUT)/%.md)
RES_DOCS=$(shell find resources -name "*.md")
RES_DOCS=$(shell find resources -name "*.md" | sort)
OUTPUT_DIRS=$(SRC_DIRS:$(SRC)/%=$(OUTPUT)/%) $(RES_DIRS:$(RES)/%=$(OUTPUT)/%)
HTMLS=$(RDOCS:%.md=%.html)
RESOURCES=$(RES_DOCS:$(RES)/%.md=$(OUTPUT)/%.html)
Expand Down Expand Up @@ -78,22 +78,21 @@ run:
@http-server $(OUTPUT) -p 8000 -c-1

$(BOOK_HTML):$(RDOCS)
@echo $(RDOCS)
$(PANDOC) $(RDOCS) -o $(BOOK_HTML)
@$(PANDOC) $(RDOCS) -o $(BOOK_HTML)

$(DIRECTORIES):$(OUTPUT)/%:$(SRC)

$(RDOCS):$(OUTPUT)/%.md:$(SRC)/%.md
@echo "Creating revised doc $@ with file $<."
@$(TRANSFORM) -i $< -o $@
@echo "Creating revised doc $@ with file $<."
@$(TRANSFORM) -i $< -o $@

$(HTMLS):%.html:%.md
@echo "Creating doc $@ with file $<."
-@$(PANDOC) $< -o $@
@echo "Creating doc $@ with file $<."
-@$(PANDOC) $< -o $@

$(RESOURCES):$(OUTPUT)/%.html:$(RES)/%.md
@echo "Creating doc $@ with file $<."
-@$(PANDOC) $< -o $@
@echo "Creating doc $@ with file $<."
-@$(PANDOC) $< -o $@


include .makefiles/*.mk
Expand Down
7 changes: 4 additions & 3 deletions SUMMARY.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Summary

* [Introduction](README.md)
* [前言](src/intro.md)
* [前言](src/0-intro.md)
* 19 年第 45 周(11/04)
* [WireGuard:简约之美](src/2019/w45/wireguard.md)
* [长日无痕(5):天叔奇谈](src/2019/w45/no-title-5.md)
* [WireGuard:简约之美](src/2019/w45/1-wireguard.md)
* [长日无痕(5):天叔奇谈](src/2019/w45/2-no-title-5.md)
* 19 年第 46 周(11/11)
* 19 年第 47 周(11/18)
* 19 年第 48 周(11/25)
Expand All @@ -13,3 +13,4 @@
* 19 年第 51 周(12/16)
* 19 年第 52 周(12/23)
* 19 年第 53 周/20 年第 1 周(12/30)

File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 8e94334

Please sign in to comment.