lkml.org 
[lkml]   [2000]   [Mar]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subjectbuild system cleanups for BSD
-----BEGIN PGP SIGNED MESSAGE-----

This is my first patch. It:

1) fixes the detection of bash, which was flawed and broke in
the case where bash was not in /bin (ie /usr/local/bin/bash)
2) on systems that have gmake installed, you probably want
it to be the default MAKE (eg, the *BSD's)
3) if you don't have ncurses, at least fall back to curses before
giving up; in the BSD's at least, curses IS ncurses.

Note: the kernel build depends on GNU awk, BSD awk doesn't work.

Jonathan Walther

- --sig--
Real Programmers consider "what you see is what you get" to be
just as bad a concept in Text Editors as it is in women.
No, the Real Programmer wants a "you asked for it, you got it"
text editor -- complicated, cryptic, powerful, unforgiving,
dangerous.

********************* Cut Here *****************************
diff -U2 -r linux.orig/Makefile linux/Makefile
- --- linux.orig/Makefile Sun Mar 19 10:16:36 2000
+++ linux/Makefile Thu Mar 23 07:02:48 2000
@@ -9,6 +9,6 @@

CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \
- - else if [ -x /bin/bash ]; then echo /bin/bash; \
- - else echo sh; fi ; fi)
+ else if [ -z `which bash` ] ; then echo sh; \
+ else echo `which bash`; fi ; fi)
TOPDIR := $(shell if [ "$$PWD" != "" ]; then echo $$PWD; else pwd; fi)

@@ -34,5 +34,6 @@
OBJCOPY = $(CROSS_COMPILE)objcopy
OBJDUMP = $(CROSS_COMPILE)objdump
- -MAKE = make
+MAKE = $(shell if [ -z `which gmake` ] ; then \
+ echo make; else echo gmake; fi )
MAKEFILES = $(TOPDIR)/.config
GENKSYMS = /sbin/genksyms
diff -U2 -r linux.orig/scripts/lxdialog/Makefile linux/scripts/lxdialog/Makefile
- --- linux.orig/scripts/lxdialog/Makefile Sat Oct 2 07:49:30 1999
+++ linux/scripts/lxdialog/Makefile Thu Mar 23 07:49:44 2000
@@ -4,5 +4,7 @@
CFLAGS = $(HOSTCFLAGS) -DLOCALE
LDFLAGS = -s -L .
- -LDLIBS = -lncurses
+LDLIBS = $(shell echo "main() {}" > lxtemp.c; \
+ if $(CC) -lncurses lxtemp.c ; then echo -lncurses ; \
+ else echo -lcurses ; fi ; rm -f lxtemp.c a.out)

ifeq (/usr/include/ncurses/ncurses.h, $(wildcard /usr/include/ncurses/ncurses.h))
@@ -32,5 +34,5 @@
ncurses:
@echo "main() {}" > lxtemp.c
- - @if $(CC) -lncurses lxtemp.c ; then \
+ @if $(CC) $(LDLIBS) lxtemp.c ; then \
rm -f lxtemp.c a.out; \
else \
-----BEGIN PGP SIGNATURE-----
Version: 2.6.3ia
Charset: noconv
iQCVAwUBONpDAMK9HT/YfGeBAQHeUAQAigrQKhVLCjxlB4nJMiymhj/9kK6yNr+z
uvwkz12cO3ZeataOtGJyLtIsaSMAd05Nni6KEr/5B1EyWjeSX37hPlo6JJVLOKQX
F9JTyKUyzg1aQusj4+YqK0HNRhRH2aykZ5fUN5cl/cC1QVaI7sLY3ldmDsIjdsuO
oeznFCl7XA4=
=pCf7
-----END PGP SIGNATURE-----

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:57    [W:0.415 / U:0.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site