patch for make clean and make depend

Andries.Brouwer@cwi.nl
Thu, 22 Jan 1998 00:30:31 +0100 (MET)


I intend to slowly start a series of patches
intended to make a kdev_t a pointer to a driver struct,
and to introduce 64-bit device numbers.

The first stage is getting the source to compile.

The very first stage is getting "make clean" and "make depend"
to work. Below a patch that accomplishes this on my machine.
Comments:
(i) `gentbl' is compiled by HOSTCC; include file conflicts arise
when it includes <linux/hfmodem.h>, which again includes <linux/types.h>.
(ii) For an oldfashioned `rm', an empty parameter list is an error.
Thus, the construction "rm -f `find something`" produces error
messages when something is not found.

Andries

P.S. Compiling the source yields lots of error messages,
the first of which complain about the type of pseudo_root
for UMSDOS. Is it well-known that UMSDOS doesn't work?

diff -u --recursive --new-file ../linux-2.1.80/linux/Makefile ./linux/Makefile
--- ../linux-2.1.80/linux/Makefile Wed Jan 14 20:25:15 1998
+++ ./linux/Makefile Wed Jan 21 23:55:47 1998
@@ -343,14 +343,16 @@

clean: archclean
rm -f kernel/ksyms.lst include/linux/compile.h
- rm -f `find . -name '*.[oas]' ! -regex '.*lxdialog/.*' -print`
- rm -f `find . -type f -name 'core' -print`
- rm -f `find . -name '.*.flags' -print`
+ rm -f core `find . -name '*.[oas]' ! -regex '.*lxdialog/.*' -print`
+ rm -f core `find . -type f -name 'core' -print`
+ rm -f core `find . -name '.*.flags' -print`
rm -f vmlinux System.map
rm -f .tmp*
rm -f drivers/char/consolemap_deftbl.c drivers/char/conmakehash
rm -f drivers/sound/bin2hex drivers/sound/hex2hex
- rm -f `find modules/ -type f -print`
+ if [ -d modules ]; then \
+ rm -f core `find modules/ -type f -print`; \
+ fi
rm -f submenu*

mrproper: clean
diff -u --recursive --new-file ../linux-2.1.80/linux/drivers/char/hfmodem/gentbl.c ./linux/drivers/char/hfmodem/gentbl.c
--- ../linux-2.1.80/linux/drivers/char/hfmodem/gentbl.c Tue Aug 5 18:48:55 1997
+++ ./linux/drivers/char/hfmodem/gentbl.c Wed Jan 21 23:32:16 1998
@@ -25,8 +25,8 @@
*/

/*****************************************************************************/
-
-#include <linux/hfmodem.h>
+
+/* This is compiled with HOSTCC - do not include any <linux/foo.h> headers. */
#include <math.h>
#include <stdio.h>