Quellcode durchsuchen

:wrench: Add assets in distributable files

DricomDragon vor 1 Jahr
Ursprung
Commit
99a6eef581
1 geänderte Dateien mit 15 neuen und 1 gelöschten Zeilen
  1. 15 1
      makefile

+ 15 - 1
makefile

@@ -5,7 +5,13 @@ GEN_HTMLS := $(SRC_HTMLS:%.src.html=%.gen.html)
 GEN_MDS := $(SRC_MDS:%.src.md=%.gen.html)
 GEN_FILES := $(GEN_HTMLS) $(GEN_MDS)
 
-DIST_FILES := $(GEN_FILES:src/%.gen.html=dist/%.html)
+INCLUDED_FILES := $(shell find src/include -type f)
+DOWNLOAD_FILES := $(shell find src/download -type f)
+
+DIST_GEN_FILES := $(GEN_FILES:src/%.gen.html=dist/%.html)
+DIST_INC_FILES := $(INCLUDED_FILES:src/%=dist/%)
+DIST_DWN_FILES := $(DOWNLOAD_FILES:src/%=dist/%)
+DIST_FILES := $(DIST_GEN_FILES) $(DIST_INC_FILES) $(DIST_DWN_FILES)
 
 PANDOC_GEN := pandoc --standalone --wrap=none --template src/templates/main.html --metadata-file src/meta.yml
 
@@ -22,6 +28,14 @@ build: $(GEN_FILES)
 dist: $(DIST_FILES)
 	$(info Distributed folder generated)
 
+dist/include/%: src/include/%
+	mkdir --parents $(dir $@)
+	cp $< $@
+
+dist/download/%: src/download/%
+	mkdir --parents $(dir $@)
+	cp $< $@
+
 dist/%.html: src/%.gen.html
 	mkdir --parents $(dir $@)
 	cp $< $@