Commit 780bc5ca authored by Kai Germaschewski's avatar Kai Germaschewski

kbuild: Remove now unnecessary usages of $(TOPDIR)

Since we now always have $(TOPDIR) = `pwd`, some usages of $(TOPDIR)
can go away.
parent 9f64ae7f
...@@ -142,7 +142,7 @@ NM = $(CROSS_COMPILE)nm ...@@ -142,7 +142,7 @@ NM = $(CROSS_COMPILE)nm
STRIP = $(CROSS_COMPILE)strip STRIP = $(CROSS_COMPILE)strip
OBJCOPY = $(CROSS_COMPILE)objcopy OBJCOPY = $(CROSS_COMPILE)objcopy
OBJDUMP = $(CROSS_COMPILE)objdump OBJDUMP = $(CROSS_COMPILE)objdump
MAKEFILES = $(TOPDIR)/.config MAKEFILES = .config
GENKSYMS = /sbin/genksyms GENKSYMS = /sbin/genksyms
DEPMOD = /sbin/depmod DEPMOD = /sbin/depmod
KALLSYMS = /sbin/kallsyms KALLSYMS = /sbin/kallsyms
...@@ -387,17 +387,17 @@ targets += arch/$(ARCH)/vmlinux.lds.s ...@@ -387,17 +387,17 @@ targets += arch/$(ARCH)/vmlinux.lds.s
# Single targets # Single targets
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
%.s: %.c FORCE %.s: %.c scripts FORCE
+@$(call descend,$(@D),$@) +@$(call descend,$(@D),$@)
%.i: %.c FORCE %.i: %.c scripts FORCE
+@$(call descend,$(@D),$@) +@$(call descend,$(@D),$@)
%.o: %.c FORCE %.o: %.c scripts FORCE
+@$(call descend,$(@D),$@) +@$(call descend,$(@D),$@)
%.lst: %.c FORCE %.lst: %.c scripts FORCE
+@$(call descend,$(@D),$@) +@$(call descend,$(@D),$@)
%.s: %.S FORCE %.s: %.S scripts FORCE
+@$(call descend,$(@D),$@) +@$(call descend,$(@D),$@)
%.o: %.S FORCE %.o: %.S scripts FORCE
+@$(call descend,$(@D),$@) +@$(call descend,$(@D),$@)
# FIXME: The asm symlink changes when $(ARCH) changes. That's # FIXME: The asm symlink changes when $(ARCH) changes. That's
...@@ -881,7 +881,7 @@ if_changed_dep = $(if $(strip $? $(filter-out FORCE $(wildcard $^),$^)\ ...@@ -881,7 +881,7 @@ if_changed_dep = $(if $(strip $? $(filter-out FORCE $(wildcard $^),$^)\
@set -e; \ @set -e; \
$(if $($(quiet)cmd_$(1)),echo ' $($(quiet)cmd_$(1))';) \ $(if $($(quiet)cmd_$(1)),echo ' $($(quiet)cmd_$(1))';) \
$(cmd_$(1)); \ $(cmd_$(1)); \
$(TOPDIR)/scripts/fixdep $(depfile) $@ $(TOPDIR) '$(cmd_$(1))' > $(@D)/.$(@F).tmp; \ scripts/fixdep $(depfile) $@ '$(cmd_$(1))' > $(@D)/.$(@F).tmp; \
rm -f $(depfile); \ rm -f $(depfile); \
mv -f $(@D)/.$(@F).tmp $(@D)/.$(@F).cmd) mv -f $(@D)/.$(@F).tmp $(@D)/.$(@F).cmd)
......
...@@ -209,10 +209,10 @@ define rule_cc_ver_c ...@@ -209,10 +209,10 @@ define rule_cc_ver_c
$(if $($(quiet)cmd_cc_ver_c),echo ' $($(quiet)cmd_cc_ver_c)';) \ $(if $($(quiet)cmd_cc_ver_c),echo ' $($(quiet)cmd_cc_ver_c)';) \
$(cmd_cc_ver_c); \ $(cmd_cc_ver_c); \
if [ ! -r $(depfile) ]; then exit 1; fi; \ if [ ! -r $(depfile) ]; then exit 1; fi; \
$(TOPDIR)/scripts/fixdep $(depfile) $@ $(TOPDIR) '$(cmd_cc_ver_c)' > $(@D)/.$(@F).tmp; \ scripts/fixdep $(depfile) $@ '$(cmd_cc_ver_c)' > $(@D)/.$(@F).tmp; \
rm -f $(depfile); \ rm -f $(depfile); \
if [ ! -r $@ ] || cmp -s $@ $@.tmp; then \ if [ ! -r $@ ] || cmp -s $@ $@.tmp; then \
touch $(TOPDIR)/include/linux/modversions.h; \ touch include/linux/modversions.h; \
fi; \ fi; \
mv -f $@.tmp $@ mv -f $@.tmp $@
mv -f $(@D)/.$(@F).tmp $(@D)/.$(@F).cmd mv -f $(@D)/.$(@F).tmp $(@D)/.$(@F).cmd
...@@ -561,7 +561,7 @@ if_changed_dep = $(if $(strip $? $(filter-out FORCE $(wildcard $^),$^)\ ...@@ -561,7 +561,7 @@ if_changed_dep = $(if $(strip $? $(filter-out FORCE $(wildcard $^),$^)\
@set -e; \ @set -e; \
$(if $($(quiet)cmd_$(1)),echo ' $($(quiet)cmd_$(1))';) \ $(if $($(quiet)cmd_$(1)),echo ' $($(quiet)cmd_$(1))';) \
$(cmd_$(1)); \ $(cmd_$(1)); \
$(TOPDIR)/scripts/fixdep $(depfile) $@ $(TOPDIR) '$(cmd_$(1))' > $(@D)/.$(@F).tmp; \ scripts/fixdep $(depfile) $@ '$(cmd_$(1))' > $(@D)/.$(@F).tmp; \
rm -f $(depfile); \ rm -f $(depfile); \
mv -f $(@D)/.$(@F).tmp $(@D)/.$(@F).cmd) mv -f $(@D)/.$(@F).tmp $(@D)/.$(@F).cmd)
......
...@@ -61,7 +61,7 @@ ...@@ -61,7 +61,7 @@
* *
* It is invoked as * It is invoked as
* *
* fixdep <depfile> <target> <topdir> <cmdline> * fixdep <depfile> <target> <cmdline>
* *
* and will read the dependency file <depfile> * and will read the dependency file <depfile>
* *
...@@ -111,7 +111,6 @@ ...@@ -111,7 +111,6 @@
#define INT_NFIG ntohl(0x4e464947) #define INT_NFIG ntohl(0x4e464947)
#define INT_FIG_ ntohl(0x4649475f) #define INT_FIG_ ntohl(0x4649475f)
char *topdir;
char *target; char *target;
char *depfile; char *depfile;
char *cmdline; char *cmdline;
...@@ -119,7 +118,7 @@ char *cmdline; ...@@ -119,7 +118,7 @@ char *cmdline;
void usage(void) void usage(void)
{ {
fprintf(stderr, "Usage: fixdep <depfile> <target> <topdir> <cmdline>\n"); fprintf(stderr, "Usage: fixdep <depfile> <target> <cmdline>\n");
exit(1); exit(1);
} }
...@@ -364,13 +363,12 @@ int main(int argc, char *argv[]) ...@@ -364,13 +363,12 @@ int main(int argc, char *argv[])
{ {
traps(); traps();
if (argc != 5) if (argc != 4)
usage(); usage();
depfile = argv[1]; depfile = argv[1];
target = argv[2]; target = argv[2];
topdir = argv[3]; cmdline = argv[3];
cmdline = argv[4];
print_cmdline(); print_cmdline();
print_deps(); print_deps();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment