PATCH; tidy up make rpm

From: Alan Cox (alan@lxorguk.ukuu.org.uk)
Date: Fri Mar 21 2003 - 15:04:43 EST


diff -u --new-file --recursive --exclude-from /usr/src/exclude linux-2.5.65/Makefile linux-2.5.65-ac2/Makefile
--- linux-2.5.65/Makefile 2003-03-18 16:46:45.000000000 +0000
+++ linux-2.5.65-ac2/Makefile 2003-03-20 18:02:29.000000000 +0000
@@ -164,6 +164,8 @@
 OBJCOPY = $(CROSS_COMPILE)objcopy
 OBJDUMP = $(CROSS_COMPILE)objdump
 AWK = awk
+RPM := $(shell if [ -x "/usr/bin/rpmbuild" ]; then echo rpmbuild; \
+ else echo rpm; fi)
 GENKSYMS = scripts/genksyms/genksyms
 DEPMOD = /sbin/depmod
 KALLSYMS = scripts/kallsyms
@@ -768,9 +770,7 @@
         rm $(KERNELPATH) ; \
         cd $(TOPDIR) ; \
         $(CONFIG_SHELL) $(srctree)/scripts/mkversion > .version ; \
- RPM=`which rpmbuild`; \
- if [ -z "$$RPM" ]; then RPM=rpm; fi; \
- $$RPM -ta $(TOPDIR)/../$(KERNELPATH).tar.gz ; \
+ $(RPM) -ta $(TOPDIR)/../$(KERNELPATH).tar.gz ; \
         rm $(TOPDIR)/../$(KERNELPATH).tar.gz
 
 # Brief documentation of the typical targets used
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sun Mar 23 2003 - 22:00:38 EST