# # file: rules.mk # created: pasha oct 7 2000 # modified: pasha jan 27 2010 # modification: process .htaccess with STRIP_COMMENTS rule # # SRC and TARGET vars should be determined before processing this Makefile # SRC - directory in the source tree # TARGET - corresponding dir in the target tree include rules-common.mk # file with .asis suffix copied "as is", omitting that suffix; # this is useful, for example, when we want just to copy files which otherwsie # would be processed (like html or perl) $(TARGET)/%: $(SRC)/%.asis $(CP_RULE) $(TARGET)/%: $(SRC)/%.pl $(YAEP) $< | $(HTMLPOSTPROCESS) --pagedir=$( $@; \ if (( $${PIPESTATUS[0]} || $${PIPESTATUS[1]} )); then rm -f $@; exit 1; fi @if ! [ -s $@ ]; then rm -f $@; echo zero output file $@; exit 1; fi $(TARGET)/%.html: $(SRC)/%.php (php -f $< | $(HTMLPOSTPROCESS) --pagedir=$( $@) || (rm -f $@; exit 1) @if ! [ -s $@ ]; then rm -f $@; echo zero output file $@; exit 1; fi $(TARGET)/%.html: $(SRC)/%.html $(HTML_RULE) $(TARGET)/.htaccess: $(SRC)/.htaccess $(STRIP_COMMENTS) $(TARGET)/%: $(SRC)/% $(CP_RULE) # end of rules.mk