[PATCH] libpayload: rename config.h to libpayload-config.h

Rename the generated config file to libpayload-config.h to differenciate
it from other config.h files.  Move the default location of the file to
$(src)/include so that LIBPAYLOAD_PREFIX= users can access the file
without staging it.

Signed-off-by: Jordan Crouse <jordan@cosmicpenguin.net>

Index: libpayload/Makefile
===================================================================
--- libpayload.orig/Makefile	2008-11-24 10:06:35.000000000 -0700
+++ libpayload/Makefile	2008-11-24 10:18:41.000000000 -0700
@@ -35,7 +35,7 @@
 export objk := $(src)/build/util/kconfig
 
 export KERNELVERSION      := 0.1.0
-export KCONFIG_AUTOHEADER := $(obj)/config.h
+export KCONFIG_AUTOHEADER := $(src)/include/libpayload-config.h
 export KCONFIG_AUTOCONFIG := $(obj)/auto.conf
 
 CONFIG_SHELL := sh
@@ -132,7 +132,6 @@
 	$(Q)install -m 755 bin/lpgcc $(DESTDIR)/libpayload/bin
 	$(Q)install -m 755 bin/lpas $(DESTDIR)/libpayload/bin
 	$(Q)install -m 644 bin/lp.functions $(DESTDIR)/libpayload/bin
-	$(Q)install -m 644 $(KCONFIG_AUTOHEADER) $(DESTDIR)/libpayload/include/libpayload-config.h
 	$(Q)install -m 644 $(KCONFIG_AUTOCONFIG) $(DESTDIR)/libpayload/libpayload.config
 
 prepare:
@@ -158,6 +157,7 @@
 distclean: clean
 	$(Q)rm -rf build
 	$(Q)rm -f .config .config.old ..config.tmp .kconfig.d .tmpconfig*
+	$(Q)rm -f $(src)/include/libpayload-config.h
 
 # This include must come _before_ the pattern rules below!
 # Order _does_ matter for pattern rules.
Index: libpayload/crypto/sha1.c
===================================================================
--- libpayload.orig/crypto/sha1.c	2008-11-24 10:08:08.000000000 -0700
+++ libpayload/crypto/sha1.c	2008-11-24 10:08:14.000000000 -0700
@@ -20,7 +20,7 @@
  *   34AA973C D4C4DAA4 F61EEB2B DBAD2731 6534016F
  */
 
-#include <config.h>
+#include <libpayload-config.h>
 #include <libpayload.h>
 
 typedef u8 u_int8_t;
Index: libpayload/curses/keyboard.c
===================================================================
--- libpayload.orig/curses/keyboard.c	2008-11-24 10:08:54.000000000 -0700
+++ libpayload/curses/keyboard.c	2008-11-24 10:09:00.000000000 -0700
@@ -37,7 +37,7 @@
  * Actually cook the serial (handle special keys)
  */
 
-#include <config.h>
+#include <libpayload-config.h>
 #include <usb/usb.h>
 #include "local.h"
 
Index: libpayload/curses/local.h
===================================================================
--- libpayload.orig/curses/local.h	2008-11-24 10:08:54.000000000 -0700
+++ libpayload/curses/local.h	2008-11-24 10:09:12.000000000 -0700
@@ -58,7 +58,7 @@
 
 #undef USE_TERMLIB
 
-#include <config.h>
+#include <libpayload-config.h>
 #include <libpayload.h>
 #include <curses.h>
 #include <curses.priv.h>
Index: libpayload/drivers/keyboard.c
===================================================================
--- libpayload.orig/drivers/keyboard.c	2008-11-24 10:09:40.000000000 -0700
+++ libpayload/drivers/keyboard.c	2008-11-24 10:09:49.000000000 -0700
@@ -27,8 +27,8 @@
  * SUCH DAMAGE.
  */
 
+#include <libpayload-config.h>
 #include <libpayload.h>
-#include <config.h>
 #include <curses.h>
 
 #define I8042_CMD_READ_MODE  0x20
Index: libpayload/drivers/nvram.c
===================================================================
--- libpayload.orig/drivers/nvram.c	2008-11-24 10:09:40.000000000 -0700
+++ libpayload/drivers/nvram.c	2008-11-24 10:09:55.000000000 -0700
@@ -39,7 +39,7 @@
  * http://bochs.sourceforge.net/techspec/CMOS-reference.txt
  * http://www.bioscentral.com/misc/cmosmap.htm
  */
-#include <config.h>
+#include <libpayload-config.h>
 #include <libpayload.h>
 
 
Index: libpayload/drivers/serial.c
===================================================================
--- libpayload.orig/drivers/serial.c	2008-11-24 10:09:40.000000000 -0700
+++ libpayload/drivers/serial.c	2008-11-24 10:10:03.000000000 -0700
@@ -28,7 +28,7 @@
  * SUCH DAMAGE.
  */
 
-#include <config.h>
+#include <libpayload-config.h>
 #include <libpayload.h>
 
 #define IOBASE lib_sysinfo.ser_ioport
Index: libpayload/drivers/usb/usb.c
===================================================================
--- libpayload.orig/drivers/usb/usb.c	2008-11-24 10:09:40.000000000 -0700
+++ libpayload/drivers/usb/usb.c	2008-11-24 10:10:09.000000000 -0700
@@ -27,7 +27,7 @@
  * SUCH DAMAGE.
  */
 
-#include <config.h>
+#include <libpayload-config.h>
 #include <usb/usb.h>
 
 hci_t *usb_hcs = 0;
Index: libpayload/drivers/usb/usbinit.c
===================================================================
--- libpayload.orig/drivers/usb/usbinit.c	2008-11-24 10:09:40.000000000 -0700
+++ libpayload/drivers/usb/usbinit.c	2008-11-24 10:10:15.000000000 -0700
@@ -27,7 +27,7 @@
  * SUCH DAMAGE.
  */
 
-#include <config.h>
+#include <libpayload-config.h>
 #include <usb/usb.h>
 #include "uhci.h"
 #include <usb/usbdisk.h>
Index: libpayload/drivers/video/video.c
===================================================================
--- libpayload.orig/drivers/video/video.c	2008-11-24 10:09:40.000000000 -0700
+++ libpayload/drivers/video/video.c	2008-11-24 10:10:24.000000000 -0700
@@ -27,7 +27,7 @@
  * SUCH DAMAGE.
  */
 
-#include <config.h>
+#include <libpayload-config.h>
 #include <libpayload.h>
 #include <video_console.h>
 
Index: libpayload/i386/coreboot.c
===================================================================
--- libpayload.orig/i386/coreboot.c	2008-11-24 10:10:46.000000000 -0700
+++ libpayload/i386/coreboot.c	2008-11-24 10:11:10.000000000 -0700
@@ -27,7 +27,7 @@
  * SUCH DAMAGE.
  */
 
-#include <config.h>
+#include <libpayload-config.h>
 #include <libpayload.h>
 #include <coreboot_tables.h>
 
Index: libpayload/i386/multiboot.c
===================================================================
--- libpayload.orig/i386/multiboot.c	2008-11-24 10:10:46.000000000 -0700
+++ libpayload/i386/multiboot.c	2008-11-24 10:11:02.000000000 -0700
@@ -27,7 +27,7 @@
  * SUCH DAMAGE.
  */
 
-#include <config.h>
+#include <libpayload-config.h>
 #include <libpayload.h>
 #include <multiboot_tables.h>
 
Index: libpayload/i386/sysinfo.c
===================================================================
--- libpayload.orig/i386/sysinfo.c	2008-11-24 10:11:47.000000000 -0700
+++ libpayload/i386/sysinfo.c	2008-11-24 10:11:55.000000000 -0700
@@ -27,7 +27,7 @@
  * SUCH DAMAGE.
  */
 
-#include <config.h>
+#include <libpayload-config.h>
 #include <libpayload.h>
 #include <multiboot_tables.h>
 
Index: libpayload/libc/console.c
===================================================================
--- libpayload.orig/libc/console.c	2008-11-24 10:10:47.000000000 -0700
+++ libpayload/libc/console.c	2008-11-24 10:11:24.000000000 -0700
@@ -27,7 +27,7 @@
  * SUCH DAMAGE.
  */
 
-#include <config.h>
+#include <libpayload-config.h>
 #include <libpayload.h>
 #include <usb/usb.h>
 
Index: libpayload/libc/exec.c
===================================================================
--- libpayload.orig/libc/exec.c	2008-11-24 10:10:47.000000000 -0700
+++ libpayload/libc/exec.c	2008-11-24 10:11:32.000000000 -0700
@@ -27,7 +27,7 @@
  * SUCH DAMAGE.
  */
 
-#include <config.h>
+#include <libpayload-config.h>
 #include <libpayload.h>
 
 #ifdef CONFIG_TARGET_I386
Index: libpayload/libc/time.c
===================================================================
--- libpayload.orig/libc/time.c	2008-11-24 10:10:47.000000000 -0700
+++ libpayload/libc/time.c	2008-11-24 10:11:17.000000000 -0700
@@ -32,7 +32,7 @@
  * General time functions
  */
 
-#include <config.h>
+#include <libpayload-config.h>
 #include <libpayload.h>
 #include <arch/rdtsc.h>
 
Index: libpayload/sample/hello.c
===================================================================
--- libpayload.orig/sample/hello.c	2008-11-24 10:15:56.000000000 -0700
+++ libpayload/sample/hello.c	2008-11-24 10:16:02.000000000 -0700
@@ -29,6 +29,7 @@
 
 /* Example file for libpayload. */
 
+#include <libpayload-config.h>
 #include <libpayload.h>
 
 int main(void)
