Commit 536de1dd authored by Josip Rodin's avatar Josip Rodin

depending on HTMLDIR is wrong, because make not only checks for its existence,...

depending on HTMLDIR is wrong, because make not only checks for its existence, it checks for its date, and we don't want that. just silently test for it in the install file rules, that's nicer, even though a bit more resource wasteful (all those stat()s or something :)

CVS version numbers

Makefile.common: 1.43 -> 1.44 
english/News/weekly/Makefile: 1.37 -> 1.38
parent a5d1876e
......@@ -52,7 +52,7 @@ all:: $(HTMLFILES) $(existing-SUBS)
$(existing-SUBS):
-$(MAKE) -C $@
install:: $(HTMLDIR) $(HTMLDESTFILES) $(IMGDESTFILES) $(existing-SUBS-install)
install:: $(HTMLDESTFILES) $(IMGDESTFILES) $(existing-SUBS-install)
$(existing-SUBS-install):
-$(MAKE) -C $(subst -install,,$@) install
......@@ -98,11 +98,9 @@ ifneq "$(findstring /international/,$(CURDIR)/)" ""
endif
endif
$(HTMLDIR):
test -d $(HTMLDIR) || mkdir -m g+w -p $(HTMLDIR)
ifndef NOGENERICINSTDEP
$(HTMLDIR)/%.$(LANGUAGE).html: %.$(LANGUAGE).html $(HTMLDIR)
$(HTMLDIR)/%.$(LANGUAGE).html: %.$(LANGUAGE).html
@test -d $(HTMLDIR) || mkdir -m g+w -p $(HTMLDIR)
@echo copying $(@F) to $(HTMLDIR)
-@install -m 664 -p $(@F) $(HTMLDIR)
ifeq ($(LANGUAGE),en)
......@@ -111,7 +109,8 @@ ifeq ($(LANGUAGE),en)
endif
endif
$(IMGDESTFILES): $(HTMLDIR)/%: % $(HTMLDIR)
$(IMGDESTFILES): $(HTMLDIR)/%: %
@test -d $(HTMLDIR) || mkdir -m g+w -p $(HTMLDIR)
install -m 664 -p $< $(HTMLDIR)
ifeq "$(LANGUAGE)" "en"
[ -f "$(HTMLDIR)/$(basename $(basename $<))$(suffix $<)" ] || ln -s $< $(HTMLDIR)/$(basename $(basename $<))$(suffix $<)
......
......@@ -81,7 +81,7 @@ endif
@mv -f $*.zh-tw.html.tmp $*.zh-tw.html
@$(TOTW) $*.zh-tw.html
install:: $(HTMLDIR) $(HTMLDESTFILES) $(PNGDESTFILES)
install:: $(HTMLDESTFILES) $(PNGDESTFILES)
ifeq "$(LANGUAGE)" "en"
# Set up current issue symlink. In case you're wondering, the only
# reason we use ..../current/issue instead of ...../current is
......@@ -94,7 +94,8 @@ endif
# This is used by the install rule, and I had to hack on it, overriding
# Make.common to allow installation of files into subdirectories.
$(HTMLDIR)/%.$(LANGUAGE).html: %.$(LANGUAGE).html $(HTMLDIR)
$(HTMLDIR)/%.$(LANGUAGE).html: %.$(LANGUAGE).html
@test -d $(HTMLDIR) || mkdir -m g+w -p $(HTMLDIR)
@echo copying $(@F) to $(@D)
-@install -m 664 -p $(<) $(@D)
ifeq "$(LANGUAGE)" "en"
......@@ -103,18 +104,22 @@ ifeq "$(LANGUAGE)" "en"
endif
# Handle images
$(HTMLDIR)/%.png: %.png $(HTMLDIR)
$(HTMLDIR)/%.png: %.png
@test -d $(HTMLDIR) || mkdir -m g+w -p $(HTMLDIR)
@echo copying $(@F) to $(@D)
-@install -m 664 -p $(<) $(@D)
# Special case for Chinese
$(HTMLDIR)/%.zh-cn.html: %.zh-cn.html $(HTMLDIR)
$(HTMLDIR)/%.zh-cn.html: %.zh-cn.html
@test -d $(HTMLDIR) || mkdir -m g+w -p $(HTMLDIR)
@echo copying $(@F) to $(@D)
-@install -m 664 -p $(<) $(@D)
$(HTMLDIR)/%.zh-hk.html: %.zh-hk.html $(HTMLDIR)
$(HTMLDIR)/%.zh-hk.html: %.zh-hk.html
@test -d $(HTMLDIR) || mkdir -m g+w -p $(HTMLDIR)
@echo copying $(@F) to $(@D)
-@install -m 664 -p $(<) $(@D)
$(HTMLDIR)/%.zh-tw.html: %.zh-tw.html $(HTMLDIR)
$(HTMLDIR)/%.zh-tw.html: %.zh-tw.html
@test -d $(HTMLDIR) || mkdir -m g+w -p $(HTMLDIR)
@echo copying $(@F) to $(@D)
-@install -m 664 -p $(<) $(@D)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment