Commit d782495d authored by Kai Germaschewski's avatar Kai Germaschewski

Merge linux-isdn@linux-isdn.bkbits.net:linux-2.5.make

into tp1.ruhr-uni-bochum.de:/home/kai/kernel/v2.5/linux-2.5.make
parents 3150c862 0ced6457
...@@ -225,7 +225,7 @@ define rule_link_vmlinux ...@@ -225,7 +225,7 @@ define rule_link_vmlinux
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
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
...@@ -353,7 +353,7 @@ include/linux/modversions.h: scripts/fixdep prepare FORCE ...@@ -353,7 +353,7 @@ include/linux/modversions.h: scripts/fixdep prepare FORCE
@( 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.
...@@ -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