From 98d8268d082fc22dc145d23c5417d24fe928119c Mon Sep 17 00:00:00 2001 From: Neil Williams Date: Fri, 9 Dec 2011 10:20:18 -0800 Subject: [PATCH] Make sure to remove static file symlinks before overwriting. Fixes issue with RTL stylesheet not being rebuilt properly. --- r2/Makefile | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/r2/Makefile b/r2/Makefile index 4b3463296..2ecb704d0 100644 --- a/r2/Makefile +++ b/r2/Makefile @@ -108,15 +108,19 @@ CSS_OUTPUTS = $(PROCESSED_STYLESHEETS) $(RTL_STYLESHEETS) $(SPRITES) css: $(CSS_OUTPUTS) $(MINIFIED_OTHER_STYLESHEETS): $(STATIC_DIR)/%.css: $(CSS_SOURCE_DIR)/%.css + # when static file names are mangled, the original becomes a symlink to the mangled name + # remove the original file here in case it's a symlink so we don't just rewrite the old file + rm -f $@ $(CAT) $< | $(CSS_COMPRESS) > $@ $(STATIC_DIR)/sprite-%.png $(STATIC_DIR)/%.css: $(CSS_SOURCE_DIR)/%.css - # when static file names are mangled, the original becomes a symlink to the mangled name - # remove the original file here in case it's a symlink so we don't just rewrite the old file - rm -f $(STATIC_DIR)/$*.css + # see above + rm -f $(STATIC_DIR)/sprite-$*.png $(STATIC_DIR)/$*.css $(PYTHON) r2/lib/nymph.py $< $(STATIC_DIR)/sprite-$*.png | $(CSS_COMPRESS) > $(STATIC_DIR)/$*.css $(RTL_STYLESHEETS): %-rtl.css : %.css + # see above + rm -f $@ $(SED) -e "s/left/>########