lkml.org 
[lkml]   [1996]   [Dec]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
SubjectRe: source dependencies cleanup?
Date
Paul Flinders wrote:
> [ stuff deleted related to using "gcc -MD" to make dependencies ]
> Ok but don't anyone hold their breath - I'm not sure when I'll get
> time

If that can help you, I made the necessary changes for MkLinux
(Linux on top of the OSF Mach3 microkernel). I've been using
this for a few months now without any problem.

You can find the MkLinux sources at:
ftp://ftp.mklinux.apple.com/pub/MkLinux_DR2/Beta/mklinux-1.0DR2.linux2.0.src.tgz
and other mirror sites listed on:
http://www.mklinux.apple.com/info/ftp.html
if you want to do a general diff on all the Makefiles.

I include the patches I made to the following files (on a 2.0.21 tree):
./Makefile
./Rules.make
./drivers/char/Makefile
There might be other files that need to be adjusted but I can't
remember
which ones and anyway that's only minor adjustments (like the one in
drivers/char/Makefile).

[ Francois ]
--
+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
| Francois BARBOU DES PLACES | | e-mail : barbou@gr.osf.org |
| The Open Group Research Institute | | or : barbou@ri.osf.fr |
| (Open Software Foundation R.I.) | | http://www.gr.osf.org/~barbou |
| 2 avenue de Vignate | | phone : (+33) 4.76.63.48.74 |
| 38610 GIERES FRANCE | | fax : (+33) 4.76.51.05.32 |
+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
--- Makefile.ORIG Wed Dec 4 16:18:13 1996
+++ Makefile Wed Dec 4 16:24:48 1996
@@ -31,6 +31,11 @@

CROSS_COMPILE =

+# define FAST_DEPENDENCIES if you don't want to use real dependencies
+# generated at compile time by the compiler. FAST_DEPENDENCIES might
+# be faster but are less accurate.
+#FAST_DEPENDENCIES =
+
AS =$(CROSS_COMPILE)as
LD =$(CROSS_COMPILE)ld
CC =$(CROSS_COMPILE)gcc -D__KERNEL__ -I$(HPATH)
@@ -88,6 +93,9 @@
#

CFLAGS = -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -fno-strength-reduce
+ifndef FAST_DEPENDENCIES
+CFLAGS += -MD
+endif

ifdef CONFIG_CPP
CFLAGS := $(CFLAGS) -x c++
@@ -235,9 +243,17 @@

init/version.o: init/version.c include/linux/compile.h
$(CC) $(CFLAGS) -DUTS_MACHINE='"$(ARCH)"' -c -o init/version.o init/version.c
+ifndef FAST_DEPENDENCIES
+ sed 's:^version.o:init/version.o:' < version.d > ,version.d
+ mv ,version.d version.d
+endif

init/main.o: init/main.c
$(CC) $(CFLAGS) $(PROFILING) -c -o $*.o $<
+ifndef FAST_DEPENDENCIES
+ sed 's:^main.o:init/main.o:' < main.d > ,main.d
+ mv ,main.d main.d
+endif

fs: dummy
$(MAKE) linuxsubdirs SUBDIRS=fs
@@ -328,6 +344,9 @@
rm -f include/asm
rm -f .depend `find . -name .depend -print`
rm -f .hdepend scripts/mkdep
+ifndef FAST_DEPENDENCIES
+ rm -f `find . -name '*.d' -print`
+endif
rm -f $(TOPDIR)/include/linux/modversions.h
rm -f $(TOPDIR)/include/linux/modules/*

@@ -356,7 +375,12 @@
MODVERFILE := $(TOPDIR)/include/linux/modversions.h
endif

+ifdef FAST_DEPENDENCIES
depend dep: dep-files $(MODVERFILE)
+else
+depend dep:
+ touch .depend
+endif

ifdef CONFIGURATION
..$(CONFIGURATION):
--- Rules.make.ORIG Wed Dec 4 16:17:51 1996
+++ Rules.make Wed Dec 4 15:21:14 1996
@@ -34,8 +34,9 @@
#
# Get things started.
#
-first_rule: sub_dirs
- $(MAKE) all_targets
+#first_rule: sub_dirs
+# $(MAKE) all_targets
+first_rule: sub_dirs all_targets

#
# Common rules
@@ -196,3 +197,5 @@
ifeq ($(TOPDIR)/.hdepend,$(wildcard $(TOPDIR)/.hdepend))
include $(TOPDIR)/.hdepend
endif
+
+-include ./*.d
--- drivers/char/Makefile.ORIG Wed Dec 4 16:20:16 1996
+++ drivers/char/Makefile Wed Dec 4 16:21:53 1996
@@ -231,3 +231,5 @@

uni_hash.tbl: $(FONTMAPFILE) conmakehash
./conmakehash $(FONTMAPFILE) > uni_hash.tbl
+
+consolemap.c: uni_hash.tbl
\
 
 \ /
  Last update: 2005-03-22 13:38    [W:0.032 / U:0.144 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site