2001-03-03 18:16:28

by Andrew Morton

[permalink] [raw]
Subject: [patch] 2.4.3-pre1 dependencies are broken

mkdep has got itself a new feature, but the makefiles haven't
been updated.

We're getting zero-length .depend files.

I assume something like this was intended:



--- linux-2.4.3-pre1/Makefile Sat Mar 3 20:52:23 2001
+++ linux-akpm/Makefile Sun Mar 4 05:13:01 2001
@@ -440,8 +440,8 @@
find . -type f -print | sort | xargs sum > .SUMS

dep-files: scripts/mkdep archdep include/linux/version.h
- scripts/mkdep init/*.c > .depend
- scripts/mkdep `find $(FINDHPATH) -name SCCS -prune -o -follow -name \*.h ! -name modversions.h -print` > .hdepend
+ scripts/mkdep -- init/*.c > .depend
+ scripts/mkdep -- `find $(FINDHPATH) -name SCCS -prune -o -follow -name \*.h ! -name modversions.h -print` > .hdepend
$(MAKE) $(patsubst %,_sfdep_%,$(SUBDIRS)) _FASTDEP_ALL_SUB_DIRS="$(SUBDIRS)"
ifdef CONFIG_MODVERSIONS
$(MAKE) update-modverfile
--- linux-2.4.3-pre1/Rules.make Sat Dec 30 09:07:19 2000
+++ linux-akpm/Rules.make Sun Mar 4 05:11:25 2001
@@ -123,7 +123,7 @@
# This make dependencies quickly
#
fastdep: dummy
- $(TOPDIR)/scripts/mkdep $(wildcard *.[chS] local.h.master) > .depend
+ $(TOPDIR)/scripts/mkdep -- $(wildcard *.[chS] local.h.master) > .depend
ifdef ALL_SUB_DIRS
$(MAKE) $(patsubst %,_sfdep_%,$(ALL_SUB_DIRS)) _FASTDEP_ALL_SUB_DIRS="$(ALL_SUB_DIRS)"
endif


2001-03-03 23:09:09

by Keith Owens

[permalink] [raw]
Subject: Re: [patch] 2.4.3-pre1 dependencies are broken

On Sun, 04 Mar 2001 05:16:37 +1100,
Andrew Morton <[email protected]> wrote:
>mkdep has got itself a new feature, but the makefiles haven't
>been updated.

Linus took the change to mkdep.c but missed the associated Makefile and
Rules.Make changes. This patch brings 2.4.3-pre1 up to date with my
mkdep changes.

Index: 3-pre1.1/drivers/acpi/Makefile
--- 3-pre1.1/drivers/acpi/Makefile Tue, 23 Jan 2001 13:26:27 +1100 kaos (linux-2.4/s/b/51_Makefile 1.2 644)
+++ 3-pre1.1(w)/drivers/acpi/Makefile Sun, 04 Mar 2001 10:02:07 +1100 kaos (linux-2.4/s/b/51_Makefile 1.3 644)
@@ -20,14 +20,6 @@ EXTRA_CFLAGS += -I./include

EXTRA_CFLAGS += $(ACPI_CFLAGS)

-# genksyms only reads $(CFLAGS), it should really read $(EXTRA_CFLAGS) as well.
-# Without EXTRA_CFLAGS the gcc pass for genksyms fails, resulting in an empty
-# include/linux/modules/acpi_ksyms.ver. Changing genkyms to use EXTRA_CFLAGS
-# will hit everything, too risky in 2.4.0-prerelease. Bandaid by tweaking
-# CFLAGS only for .ver targets. Review after 2.4.0 release. KAO
-
-$(MODINCL)/%.ver: CFLAGS := -I./include $(CFLAGS)
-
acpi-subdirs := common dispatcher events hardware \
interpreter namespace parser resources tables

Index: 3-pre1.1/Rules.make
--- 3-pre1.1/Rules.make Fri, 05 Jan 2001 13:42:29 +1100 kaos (linux-2.4/T/c/47_Rules.make 1.1 644)
+++ 3-pre1.1(w)/Rules.make Sun, 04 Mar 2001 10:02:09 +1100 kaos (linux-2.4/T/c/47_Rules.make 1.2 644)
@@ -123,7 +123,7 @@ endif
# This make dependencies quickly
#
fastdep: dummy
- $(TOPDIR)/scripts/mkdep $(wildcard *.[chS] local.h.master) > .depend
+ $(TOPDIR)/scripts/mkdep $(CFLAGS) $(EXTRA_CFLAGS) -- $(wildcard *.[chS]) > .depend
ifdef ALL_SUB_DIRS
$(MAKE) $(patsubst %,_sfdep_%,$(ALL_SUB_DIRS)) _FASTDEP_ALL_SUB_DIRS="$(ALL_SUB_DIRS)"
endif
@@ -222,9 +222,9 @@ endif

$(MODINCL)/%.ver: %.c
@if [ ! -r $(MODINCL)/$*.stamp -o $(MODINCL)/$*.stamp -ot $< ]; then \
- echo '$(CC) $(CFLAGS) -E -D__GENKSYMS__ $<'; \
+ echo '$(CC) $(CFLAGS) $(EXTRA_CFLAGS) -E -D__GENKSYMS__ $<'; \
echo '| $(GENKSYMS) $(genksyms_smp_prefix) -k $(VERSION).$(PATCHLEVEL).$(SUBLEVEL) > [email protected]'; \
- $(CC) $(CFLAGS) -E -D__GENKSYMS__ $< \
+ $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -E -D__GENKSYMS__ $< \
| $(GENKSYMS) $(genksyms_smp_prefix) -k $(VERSION).$(PATCHLEVEL).$(SUBLEVEL) > [email protected]; \
if [ -r $@ ] && cmp -s $@ [email protected]; then echo $@ is unchanged; rm -f [email protected]; \
else echo mv [email protected] $@; mv -f [email protected] $@; fi; \
Index: 3-pre1.1/Makefile
--- 3-pre1.1/Makefile Sun, 04 Mar 2001 09:56:10 +1100 kaos (linux-2.4/T/c/50_Makefile 1.1.2.15.1.2.2.1 644)
+++ 3-pre1.1(w)/Makefile Sun, 04 Mar 2001 10:03:18 +1100 kaos (linux-2.4/T/c/50_Makefile 1.1.2.16 644)
@@ -440,8 +440,8 @@ sums:
find . -type f -print | sort | xargs sum > .SUMS

dep-files: scripts/mkdep archdep include/linux/version.h
- scripts/mkdep init/*.c > .depend
- scripts/mkdep `find $(FINDHPATH) -name SCCS -prune -o -follow -name \*.h ! -name modversions.h -print` > .hdepend
+ scripts/mkdep -- init/*.c > .depend
+ scripts/mkdep -- `find $(FINDHPATH) -name SCCS -prune -o -follow -name \*.h ! -name modversions.h -print` > .hdepend
$(MAKE) $(patsubst %,_sfdep_%,$(SUBDIRS)) _FASTDEP_ALL_SUB_DIRS="$(SUBDIRS)"
ifdef CONFIG_MODVERSIONS
$(MAKE) update-modverfile