# Check that $(HARFBUZZ) is defined before trying to use it. ifndef HARFBUZZ $(error $$HARFBUZZ is not defined) endif # Check that we're getting the expected $(HARFBUZZ) value (approximately) and # give a meaningful error message. ifeq (,$(wildcard $(HARFBUZZ)/configure)) $(error 'configure' not found in path given by $$HARFBUZZ: $(HARFBUZZ)) endif # If the timestamp on the files below is incorrect (because git does not # preserve timestamps), then the configure script will incorrectly try to # regenerate them. We `touch` these files to prevent this. # # Most files are generated by autoconf. See # https://github.com/servo/rust-harfbuzz/issues/54 for an error. # # hb-version.h should not be regenerated from hb-version.h.in. If it is, it can # cause `cargo package` to complain about file modifications. TOUCH_FILES = $(wildcard \ $(HARFBUZZ)/config.h.in \ $(HARFBUZZ)/configure.ac \ $(HARFBUZZ)/m4/*.m4 \ $(HARFBUZZ)/aclocal.m4 \ $(HARFBUZZ)/Makefile.* \ $(HARFBUZZ)/*/Makefile.* \ $(HARFBUZZ)/*/*/Makefile.* \ $(HARFBUZZ)/*/*/*/Makefile.* \ $(HARFBUZZ)/*/*/*/*/Makefile.* \ $(HARFBUZZ)/gtk-doc.make \ $(HARFBUZZ)/src/hb-version.* \ ) # Avoid requiring Ragel to be installed: https://github.com/servo/servo/issues/24611 TOUCH_FILES += $(wildcard \ $(HARFBUZZ)/src/*.rl \ $(HARFBUZZ)/src/*.hh \ ) touch: touch -r $(HARFBUZZ)/configure $(TOUCH_FILES) .PHONY: touch