浏览代码

Allan Clark writes:
Quick patch to avoid deleting my directory of RPM Sources.

I tend to use buildroot as "make DL_DIR=/.rh/SOURCES", with the rpm
topdir set to $HOME/.rh in my .rpmmacros -- allows me to build RPMs as
non-root, and share the source with buildroot. Problem is, buildroot
likes to delete my directory :(

Mike Frysinger 20 年之前
父节点
当前提交
5bc1f0c323
共有 1 个文件被更改,包括 4 次插入1 次删除
  1. 4 1
      Makefile

+ 4 - 1
Makefile

@@ -133,7 +133,10 @@ dirclean: $(TARGETS_DIRCLEAN)
 	rm -rf $(STAGING_DIR) $(TARGET_DIR) $(IMAGE)
 
 distclean:
-	rm -rf $(DL_DIR) $(BUILD_DIR) $(LINUX_KERNEL) $(IMAGE)
+ifeq ($(DL_DIR),$(BASE_DIR)/dl)
+	rm -rf $(DL_DIR)
+endif
+	rm -rf $(BUILD_DIR) $(LINUX_KERNEL) $(IMAGE)
 
 sourceball:
 	rm -rf $(BUILD_DIR)