Skip to contentSkip to conversation

Cleanup some build cruft in xfs-cmds GNUmakefile

PATCH In review Barry Naujok 2 participants 2 messages Feb 19, 2007

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Cleanup some build cruft in xfs-cmds GNUmakefile

Clean up some old SGI specific stuff in the root xfs-cmds GNUmakefile, and be able to set final location for the RPM packages from the environment.

GNUmakefile +10 -25
@@ -1,16 +1,16 @@
 #
-# Copyright (c) 2002 Silicon Graphics, Inc.  All Rights Reserved.
+# Copyright (c) 2002-2007 Silicon Graphics, Inc.  All Rights Reserved.
 #
-# Top-level makefile for all of xfs-cmds (with specific bits for LBS)
+# Top-level makefile for all of xfs-cmds
 #
 
 XFS_CMDS_DIR := $(shell pwd)
 
-# This is true for both LBS and 2.4.x-xfs builds... for now...
-TOP=..
-
 ARCH := $(shell uname -m | sed -e s/i.86/i386/)
 
+RPM_OUT_DIR ?= $(XFS_CMDS_DIR)/RPMS/$(ARCH)
+SRPM_OUT_DIR ?= $(XFS_CMDS_DIR)/SRPMS
+
 COMMANDS = attr acl xfsprogs dmapi xfsdump
 
 # We'd like to be able to satisfy dependencies from within the
@@ -50,37 +50,22 @@
 		( cd $(XFS_CMDS_DIR)/$$d && ./Makepkgs ) || exit 1; \
 	done
 	for d in $(COMMANDS); do \
-		( cd $(XFS_CMDS_DIR) && /bin/cp $$d/build/rpm/*.src.rpm SRPMS ) \
+		( cd $(XFS_CMDS_DIR) && /bin/cp $$d/build/rpm/*.src.rpm $(SRPM_OUT_DIR) ) \
 	done
 	for d in $(COMMANDS); do \
-		( cd $(XFS_CMDS_DIR) && /bin/cp $$d/build/rpm/*.$(ARCH).rpm RPMS/$(ARCH) ) \
+		( cd $(XFS_CMDS_DIR) && /bin/cp $$d/build/rpm/*.$(ARCH).rpm $(RPM_OUT_DIR) ) \
 	done
 
-	# If this is an LBS build ($(TOP)/sgi-install/SGI/RPMS exists)
-	# then copy the RPMs over to sgi-install after they're built
-	([ -d $(TOP)/sgi-install/SGI/RPMS ] && \
-		( /bin/cp $(XFS_CMDS_DIR)/RPMS/$(ARCH)/*.rpm $(TOP)/sgi-install/SGI/RPMS )) || \
-		echo
-
-	([ -d $(TOP)/sgi-install/SGI/SRPMS ] && \
-		( /bin/cp $(XFS_CMDS_DIR)/SRPMS/*.src.rpm $(TOP)/sgi-install/SGI/SRPMS )) || \
-		echo
-
 builddirs:
 	echo "cmd builddirs"
-	([ -d $(XFS_CMDS_DIR)/BUILD ] || mkdir $(XFS_CMDS_DIR)/BUILD)
-	([ -d $(XFS_CMDS_DIR)/SRPMS ] || mkdir $(XFS_CMDS_DIR)/SRPMS)
-	([ -d $(XFS_CMDS_DIR)/RPMS/$(ARCH) ] || mkdir -p $(XFS_CMDS_DIR)/RPMS/$(ARCH))
+	([ -d $(SRPM_OUT_DIR) ] || mkdir -p $(SRPM_OUT_DIR))
+	([ -d $(RPM_OUT_DIR) ] || mkdir -p $(RPM_OUT_DIR))
 
 clean:
-	rm -rf RPMS SRPMS BUILD SOURCES
+	rm -rf $(SRPM_OUT_DIR) $(RPM_OUT_DIR)
 	for d in $(COMMANDS); do \
 		( cd $(XFS_CMDS_DIR)/$$d && make -i clean ) \
 	done
 
 realclean: clean
 	for d in $(COMMANDS); do ( cd $(XFS_CMDS_DIR)/$$d && make realclean ) done
-
-clean-lbs:    realclean
-
-build-lbs:    cmds-install
#1 lore raw
Quoted 2 lines · Barry Naujok

Clean up some old SGI specific stuff in the root xfs-cmds GNUmakefile, and be able to set final location for the RPM packages from the environment.

looks good to me.