Commit 83859fba authored by Linus Torvalds's avatar Linus Torvalds

Merge http://linux-isdn.bkbits.net/linux-2.5.make

into home.transmeta.com:/home/torvalds/v2.5/linux
parents e618013a 1a3fbb1f
...@@ -222,10 +222,10 @@ cmd_link_vmlinux = $(LD) $(LINKFLAGS) $(HEAD) $(INIT) \ ...@@ -222,10 +222,10 @@ cmd_link_vmlinux = $(LD) $(LINKFLAGS) $(HEAD) $(INIT) \
define rule_link_vmlinux define rule_link_vmlinux
set -e set -e
echo Generating build number echo ' Generating build number'
. scripts/mkversion > .tmpversion . scripts/mkversion > .tmpversion
mv -f .tmpversion .version mv -f .tmpversion .version
$(MAKE) -C init +$(MAKE) -C init
$(call cmd,cmd_link_vmlinux) $(call cmd,cmd_link_vmlinux)
$(cmd_link_vmlinux) $(cmd_link_vmlinux)
echo 'cmd_$@ := $(cmd_link_vmlinux)' > $(@D)/.$(@F).cmd echo 'cmd_$@ := $(cmd_link_vmlinux)' > $(@D)/.$(@F).cmd
...@@ -243,14 +243,14 @@ $(sort $(vmlinux-objs)): $(SUBDIRS) ; ...@@ -243,14 +243,14 @@ $(sort $(vmlinux-objs)): $(SUBDIRS) ;
# Handle descending into subdirectories listed in $(SUBDIRS) # Handle descending into subdirectories listed in $(SUBDIRS)
.PHONY: $(SUBDIRS) .PHONY: $(SUBDIRS)
$(SUBDIRS): .hdepend prepare include/config/MARKER $(SUBDIRS): .hdepend prepare
@$(MAKE) -C $@ @$(MAKE) -C $@
# Things we need done before we descend to build or make # Things we need done before we descend to build or make
# module versions are listed in "prepare" # module versions are listed in "prepare"
.PHONY: prepare .PHONY: prepare
prepare: include/linux/version.h include/asm prepare: include/linux/version.h include/asm include/config/MARKER
# Single targets # Single targets
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
...@@ -273,13 +273,13 @@ prepare: include/linux/version.h include/asm ...@@ -273,13 +273,13 @@ prepare: include/linux/version.h include/asm
# before switching between archs anyway. # before switching between archs anyway.
include/asm: include/asm:
@echo 'Making asm->asm-$(ARCH) symlink' @echo ' Making asm->asm-$(ARCH) symlink'
@ln -s asm-$(ARCH) $@ @ln -s asm-$(ARCH) $@
# Split autoconf.h into include/linux/config/* # Split autoconf.h into include/linux/config/*
include/config/MARKER: scripts/split-include include/linux/autoconf.h include/config/MARKER: scripts/split-include include/linux/autoconf.h
@echo 'Splitting include/linux/autoconf.h -> include/config' @echo ' SPLIT include/linux/autoconf.h -> include/config/*'
@scripts/split-include include/linux/autoconf.h include/config @scripts/split-include include/linux/autoconf.h include/config
@touch $@ @touch $@
...@@ -306,7 +306,7 @@ include/linux/version.h: Makefile ...@@ -306,7 +306,7 @@ include/linux/version.h: Makefile
echo '"$(KERNELRELEASE)" exceeds $(uts_len) characters' >&2; \ echo '"$(KERNELRELEASE)" exceeds $(uts_len) characters' >&2; \
exit 1; \ exit 1; \
fi; fi;
@echo -n 'Generating $@' @echo -n ' Generating $@'
@(echo \#define UTS_RELEASE \"$(KERNELRELEASE)\"; \ @(echo \#define UTS_RELEASE \"$(KERNELRELEASE)\"; \
echo \#define LINUX_VERSION_CODE `expr $(VERSION) \\* 65536 + $(PATCHLEVEL) \\* 256 + $(SUBLEVEL)`; \ echo \#define LINUX_VERSION_CODE `expr $(VERSION) \\* 65536 + $(PATCHLEVEL) \\* 256 + $(SUBLEVEL)`; \
echo '#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))'; \ echo '#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))'; \
...@@ -349,11 +349,11 @@ ifdef CONFIG_MODVERSIONS ...@@ -349,11 +349,11 @@ ifdef CONFIG_MODVERSIONS
include/linux/modversions.h: scripts/fixdep prepare FORCE include/linux/modversions.h: scripts/fixdep prepare FORCE
@rm -rf .tmp_export-objs @rm -rf .tmp_export-objs
@$(MAKE) $(patsubst %,_sfdep_%,$(SUBDIRS)) @$(MAKE) $(patsubst %,_sfdep_%,$(SUBDIRS))
@echo -n 'Generating $@' @echo -n ' Generating $@'
@( echo "#ifndef _LINUX_MODVERSIONS_H";\ @( echo "#ifndef _LINUX_MODVERSIONS_H";\
echo "#define _LINUX_MODVERSIONS_H"; \ echo "#define _LINUX_MODVERSIONS_H"; \
echo "#include <linux/modsetver.h>"; \ echo "#include <linux/modsetver.h>"; \
for f in `cd .tmp_export-objs; find modules -name \*.ver -print`; do \ for f in `cd .tmp_export-objs; find modules -name \*.ver -print | sort`; do \
echo "#include <linux/$${f}>"; \ echo "#include <linux/$${f}>"; \
done; \ done; \
echo "#endif"; \ echo "#endif"; \
...@@ -574,9 +574,8 @@ make_with_config: .config ...@@ -574,9 +574,8 @@ make_with_config: .config
# files removed with 'make clean' # files removed with 'make clean'
CLEAN_FILES += \ CLEAN_FILES += \
kernel/ksyms.lst include/linux/compile.h \ include/linux/compile.h \
vmlinux System.map \ vmlinux System.map \
.tmp* \
drivers/char/consolemap_deftbl.c drivers/video/promcon_tbl.c \ drivers/char/consolemap_deftbl.c drivers/video/promcon_tbl.c \
drivers/char/conmakehash \ drivers/char/conmakehash \
drivers/char/drm/*-mod.c \ drivers/char/drm/*-mod.c \
...@@ -616,9 +615,11 @@ MRPROPER_FILES += \ ...@@ -616,9 +615,11 @@ MRPROPER_FILES += \
.hdepend scripts/split-include scripts/docproc \ .hdepend scripts/split-include scripts/docproc \
scripts/fixdep $(TOPDIR)/include/linux/modversions.h \ scripts/fixdep $(TOPDIR)/include/linux/modversions.h \
tags TAGS kernel.spec \ tags TAGS kernel.spec \
.tmpversion
# directories removed with 'make mrproper' # directories removed with 'make mrproper'
MRPROPER_DIRS += \ MRPROPER_DIRS += \
.tmp_export-objs \
include/config \ include/config \
$(TOPDIR)/include/linux/modules $(TOPDIR)/include/linux/modules
...@@ -631,7 +632,7 @@ clean: archclean ...@@ -631,7 +632,7 @@ clean: archclean
@find . \( -name \*.[oas] -o -name core -o -name .\*.cmd -o \ @find . \( -name \*.[oas] -o -name core -o -name .\*.cmd -o \
-name .\*.tmp -o -name .\*.d \) -type f -print \ -name .\*.tmp -o -name .\*.d \) -type f -print \
| grep -v lxdialog/ | xargs rm -f | grep -v lxdialog/ | xargs rm -f
@rm -rf $(CLEAN_FILES) @rm -f $(CLEAN_FILES)
@$(MAKE) -C Documentation/DocBook clean @$(MAKE) -C Documentation/DocBook clean
mrproper: clean archmrproper mrproper: clean archmrproper
......
This diff is collapsed.
...@@ -22,5 +22,5 @@ $(TOPDIR)/include/linux/compile.h: ../include/linux/compile.h ; ...@@ -22,5 +22,5 @@ $(TOPDIR)/include/linux/compile.h: ../include/linux/compile.h ;
# actual file if its content has changed. # actual file if its content has changed.
../include/linux/compile.h: FORCE ../include/linux/compile.h: FORCE
@echo -n 'Generating $@' @echo -n ' Generating $@'
@../scripts/mkcompile_h $@ "$(ARCH)" "$(CONFIG_SMP)" "$(CC) $(CFLAGS)" @../scripts/mkcompile_h $@ "$(ARCH)" "$(CONFIG_SMP)" "$(CC) $(CFLAGS)"
...@@ -22,7 +22,7 @@ TAIL=tail.tk ...@@ -22,7 +22,7 @@ TAIL=tail.tk
# Config.in files to depend on anyways. So I'll force it to remake. # Config.in files to depend on anyways. So I'll force it to remake.
kconfig.tk: $(TOPDIR)/arch/$(ARCH)/config.in tkparse $(HEADER) $(TAIL) FORCE kconfig.tk: $(TOPDIR)/arch/$(ARCH)/config.in tkparse $(HEADER) $(TAIL) FORCE
@echo Generating $@ @echo ' Generating $@'
@( \ @( \
if [ -f /usr/local/bin/wish ]; then \ if [ -f /usr/local/bin/wish ]; then \
echo '#!'"/usr/local/bin/wish -f"; \ echo '#!'"/usr/local/bin/wish -f"; \
......
...@@ -61,9 +61,9 @@ ...@@ -61,9 +61,9 @@
* *
* It is invoked as * It is invoked as
* *
* fixdep <target> <topdir> <cmdline> * fixdep <depfile> <target> <topdir> <cmdline>
* *
* and will read the dependency file ".<target>.d". * and will read the dependency file <depfile>
* *
* The transformed dependency snipped is written to stdout. * The transformed dependency snipped is written to stdout.
* *
...@@ -112,29 +112,20 @@ ...@@ -112,29 +112,20 @@
#define INT_FIG_ ntohl(0x4649475f) #define INT_FIG_ ntohl(0x4649475f)
char *topdir; char *topdir;
char *target;
char *depfile;
char *cmdline;
void usage(void) void usage(void)
{ {
fprintf(stderr, "Usage: fixdep <target> <topdir> <cmdline>\n"); fprintf(stderr, "Usage: fixdep <depfile> <target> <topdir> <cmdline>\n");
exit(1); exit(1);
} }
void print_cmdline(char *target, char *cmdline) void print_cmdline(void)
{ {
char *s = strdup(target); printf("cmd_%s := %s\n\n", target, cmdline);
char *p = s;
if (!s) {
fprintf(stderr, "no mem!\n");
exit(2);
}
while ((p = strchr(p,'/')))
*p = '_';
printf("cmd_%s := %s\n\n", s, cmdline);
free(s);
} }
char * str_config = NULL; char * str_config = NULL;
...@@ -297,11 +288,11 @@ void parse_dep_file(void *map, size_t len) ...@@ -297,11 +288,11 @@ void parse_dep_file(void *map, size_t len)
p = strchr(m, ':'); p = strchr(m, ':');
if (!p) { if (!p) {
fprintf(stderr, "parse error at %d", __LINE__); fprintf(stderr, "fixdep: parse error\n");
exit(1); exit(1);
} }
memcpy(s, m, p-m); s[p-m] = 0; memcpy(s, m, p-m); s[p-m] = 0;
printf("%s: \\\n", s); printf("%s: \\\n", target);
m = p+1; m = p+1;
clear_config(); clear_config();
...@@ -326,22 +317,20 @@ void parse_dep_file(void *map, size_t len) ...@@ -326,22 +317,20 @@ void parse_dep_file(void *map, size_t len)
printf("\n"); printf("\n");
} }
void print_deps(char *target) void print_deps(void)
{ {
char filename[PATH_MAX];
struct stat st; struct stat st;
int fd; int fd;
void *map; void *map;
sprintf(filename, ".%s.d", target); fd = open(depfile, O_RDONLY);
fd = open(filename, O_RDONLY);
if (fd < 0) { if (fd < 0) {
perror(filename); perror(depfile);
exit(2); exit(2);
} }
fstat(fd, &st); fstat(fd, &st);
if (st.st_size == 0) { if (st.st_size == 0) {
fprintf(stderr,"%s is empty\n",filename); fprintf(stderr,"fixdep: %s is empty\n",depfile);
close(fd); close(fd);
return; return;
} }
...@@ -362,7 +351,7 @@ void traps(void) ...@@ -362,7 +351,7 @@ void traps(void)
char *test = "CONF"; char *test = "CONF";
if (*(int *)test != INT_CONF) { if (*(int *)test != INT_CONF) {
fprintf(stderr, "sizeof(int) != 4 or wrong endianess? %#x\n", fprintf(stderr, "fixdep: sizeof(int) != 4 or wrong endianess? %#x\n",
*(int *)test); *(int *)test);
exit(2); exit(2);
} }
...@@ -370,19 +359,18 @@ void traps(void) ...@@ -370,19 +359,18 @@ void traps(void)
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
char *target, *cmdline;
traps(); traps();
if (argc != 4) if (argc != 5)
usage(); usage();
target = argv[1]; depfile = argv[1];
topdir = argv[2]; target = argv[2];
cmdline = argv[3]; topdir = argv[3];
cmdline = argv[4];
print_cmdline(target, cmdline); print_cmdline();
print_deps(target); print_deps();
return 0; return 0;
} }
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