FAMOUS= assaf_schuster orna_agmon_ben-yehuda ahuva_mualem ELECTURES=index projects haifau ELECTURES:=$(ELECTURES) $(FAMOUS) HLECTURES= $(patsubst %, hebrew/%,$(ELECTURES)) %LECTURES:= $(ELECTURES) $(HLECTURES) LECTURES:= $(ELECTURES) LECTURES_HTM:= $(patsubst %, %.htm, $(LECTURES)) #HTM must be evaluated after the htm files were created EHTM:=$(wildcard *.htm) HHTM:=$(wildcard hebrew/*.htm) HTM:= $(wildcard *.htm) $(wildcard hebrew/*.htm) HTML:= $(patsubst %.htm, ../%.html, $(EHTM)) $(patsubst hebrew/%.htm, ../hebrew/%.html, $(HHTM)) $LECTURES_HTML:=$(patsubst %.htm, %.html, $(LECTURES_HTM)) everything: clean ../hebrew $(LECTURES_HTM) index.html make html ./allhebrew hebrew/%.htm: hebrew/% ./combine_lectures.pl $(basename $<) hebrew/%.htm: hebrew/%.1 ./combine_lectures.pl $(basename $<) hebrew/%.htm:%.1 ./combine_lectures.pl hebrew/$(basename $<) #hebrew/%.htm:lectures %.htm:% # ./combine_lectures.pl $(basename $<) %.htm:%.1 ./combine_lectures.pl $(basename $<) #%.htm:lectures $(LECTURES_HTM): lectures #mv hebrew files - do not move the whole directory #because there may be links in the public hebrew directory, #that we wish to preserve. #the hebrew html target must come before the regular one, or the regular one #will be taken for hebrew files. ../hebrew/%.html: hebrew/%.htm #make_site.pl outline.pl ./make_site.pl $< \mv -f ./gen/hebrew/$(@F) $@ #dummy dependency, till we get make updated $(HTML):make_site.pl outline.html #I am not sure lectures dir should be here, maybe we should have hardlinks instead of symlinks. ../%.html:%.htm# make_site.pl outline.pl ./make_site.pl $< \mv -f ./gen/$(@F) $@ html:$(HTML) echo_html: echo $(HTML) .phony: clean everything html #generate an index for the source directory index.html:. ./gen_index.pl clean: \rm -f */*~ */*/*~ *~ ../hebrew: mkdir -p ../hebrew