From: Garrett C. <yab...@us...> - 2010-02-03 07:44:26
|
Update of /cvsroot/ltp/ltp In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv32648 Modified Files: Makefile Log Message: Avoid accidental rm -Rf / regression in last release by calling $(*abspath) on $(INSTALL_DIR) beforehand -- sure it sets it to $(abs_top_srcdir), but it's a lot safer safety net to not clean as opposed to blowing away /. Signed-off-by: Garrett Cooper <yan...@gm...> Index: Makefile =================================================================== RCS file: /cvsroot/ltp/ltp/Makefile,v retrieving revision 1.63 retrieving revision 1.64 diff -C2 -d -r1.63 -r1.64 *** Makefile 2 Feb 2010 08:25:09 -0000 1.63 --- Makefile 3 Feb 2010 07:44:18 -0000 1.64 *************** *** 95,98 **** --- 95,105 ---- INSTALL_DIR := $(DESTDIR)/$(prefix) + # DO NOT REMOVE THIS CALL (see clean_install_dir call below...)!!!! + ifdef MAKE_3_80_COMPAT + INSTALL_DIR := $(call MAKE_3_80_abspath,$(INSTALL_DIR)) + else + INSTALL_DIR := $(abspath $(INSTALL_DIR)) + endif + # build tree bootstrap targets and $(INSTALL_DIR) target. $(sort $(addprefix $(abs_top_builddir)/,$(BOOTSTRAP_TARGETS)) $(INSTALL_DIR) $(DESTDIR)/$(bindir)): *************** *** 142,148 **** # Clean the directory if the build-tree is properly configured and not set to # the srcdir. ! #ifeq ($(filter $(BUILD_TREE_STATE),$(BUILD_TREE_SRCDIR_INSTALL) $(BUILD_TREE_UNCONFIGURED)),) ! #CLEAN_TARGETS += clean_install_dir ! #endif clean:: $(CLEAN_TARGETS) --- 149,158 ---- # Clean the directory if the build-tree is properly configured and not set to # the srcdir. ! ifeq ($(filter $(BUILD_TREE_STATE),$(BUILD_TREE_SRCDIR_INSTALL) $(BUILD_TREE_UNCONFIGURED)),) ! # Make sure that we don't whack `/'!!!!! ! ifneq ($(INSTALL_DIR),/) ! CLEAN_TARGETS += clean_install_dir ! endif ! endif clean:: $(CLEAN_TARGETS) |