diff --git a/Makefile b/Makefile index 9dc2ccb..148b73b 100644 --- a/Makefile +++ b/Makefile @@ -15,20 +15,23 @@ MD_FILES = $(SOURCES:%=$(OUT_DIR)/%.md) HTML_FILES = $(MD_FILES:.md=.html) # Default target -all: Makefile $(HTML_FILES) $(OUT_DIR)/learning.html +all: Makefile convert.py $(HTML_FILES) $(OUT_DIR)/learning.html Makefile: $(SRC_DIR)/0026.txt cmm print -f $< -S | sed "s/ `printf ' /\t/g'`" >$@ +convert.py: $(SRC_DIR)/0003.txt Makefile + cmm print -f $< -S >$@ + # Rule to create a markdown file from a source file $(OUT_DIR)/%.md: $(SRC_DIR)/%.txt cmm print -f $< -a > $@ # Rule to create an HTML file from a markdown file -$(OUT_DIR)/%.html: $(OUT_DIR)/%.md +$(OUT_DIR)/%.html: $(OUT_DIR)/%.md convert.py python convert.py $< -$(OUT_DIR)/learning.html: $(SRC_DIR)/0015.txt +$(OUT_DIR)/learning.html: $(SRC_DIR)/0015.txt $(SRC_FILES) Makefile cmm print -f $< -S | \ awk "/LINKS_LINE/ { \ split(\"$(SOURCES)\", sources, \" \"); \ diff --git a/db/.next b/db/.next new file mode 100644 index 0000000..d99e90e --- /dev/null +++ b/db/.next @@ -0,0 +1 @@ +29 \ No newline at end of file diff --git a/db/0026.txt b/db/0026.txt index 1fa39d1..9aa6c18 100644 --- a/db/0026.txt +++ b/db/0026.txt @@ -22,20 +22,23 @@ MD_FILES = $(SOURCES:%=$(OUT_DIR)/%.md) HTML_FILES = $(MD_FILES:.md=.html) # Default target -all: Makefile $(HTML_FILES) $(OUT_DIR)/learning.html +all: Makefile convert.py $(HTML_FILES) $(OUT_DIR)/learning.html Makefile: $(SRC_DIR)/0026.txt cmm print -f $< -S | sed "s/ `printf ' /\t/g'`" >$@ +convert.py: $(SRC_DIR)/0003.txt Makefile + cmm print -f $< -S >$@ + # Rule to create a markdown file from a source file $(OUT_DIR)/%.md: $(SRC_DIR)/%.txt cmm print -f $< -a > $@ # Rule to create an HTML file from a markdown file -$(OUT_DIR)/%.html: $(OUT_DIR)/%.md +$(OUT_DIR)/%.html: $(OUT_DIR)/%.md convert.py python convert.py $< -$(OUT_DIR)/learning.html: $(SRC_DIR)/0015.txt +$(OUT_DIR)/learning.html: $(SRC_DIR)/0015.txt $(SRC_FILES) Makefile cmm print -f $< -S | \ awk "/LINKS_LINE/ { \ split(\"$(SOURCES)\", sources, \" \"); \