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
echo Generating build number
. scripts/mkversion > .tmpversion
mv -f .tmpversion .version
$(MAKE) -C init
+$(MAKE) -C init
$(call cmd,cmd_link_vmlinux)
$(cmd_link_vmlinux)
echo 'cmd_$@ := $(cmd_link_vmlinux)' > $(@D)/.$(@F).cmd
......@@ -243,14 +243,14 @@ $(sort $(vmlinux-objs)): $(SUBDIRS) ;
# Handle descending into subdirectories listed in $(SUBDIRS)
.PHONY: $(SUBDIRS)
$(SUBDIRS): .hdepend prepare include/config/MARKER
$(SUBDIRS): .hdepend prepare
@$(MAKE) -C $@
# Things we need done before we descend to build or make
# module versions are listed in "prepare"
.PHONY: prepare
prepare: include/linux/version.h include/asm
prepare: include/linux/version.h include/asm include/config/MARKER
# Single targets
# ---------------------------------------------------------------------------
......@@ -353,7 +353,7 @@ include/linux/modversions.h: scripts/fixdep prepare FORCE
@( echo "#ifndef _LINUX_MODVERSIONS_H";\
echo "#define _LINUX_MODVERSIONS_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}>"; \
done; \
echo "#endif"; \
......@@ -574,9 +574,8 @@ make_with_config: .config
# files removed with 'make clean'
CLEAN_FILES += \
kernel/ksyms.lst include/linux/compile.h \
include/linux/compile.h \
vmlinux System.map \
.tmp* \
drivers/char/consolemap_deftbl.c drivers/video/promcon_tbl.c \
drivers/char/conmakehash \
drivers/char/drm/*-mod.c \
......@@ -616,9 +615,11 @@ MRPROPER_FILES += \
.hdepend scripts/split-include scripts/docproc \
scripts/fixdep $(TOPDIR)/include/linux/modversions.h \
tags TAGS kernel.spec \
.tmpversion
# directories removed with 'make mrproper'
MRPROPER_DIRS += \
.tmp_export-objs \
include/config \
$(TOPDIR)/include/linux/modules
......@@ -631,7 +632,7 @@ clean: archclean
@find . \( -name \*.[oas] -o -name core -o -name .\*.cmd -o \
-name .\*.tmp -o -name .\*.d \) -type f -print \
| grep -v lxdialog/ | xargs rm -f
@rm -rf $(CLEAN_FILES)
@rm -f $(CLEAN_FILES)
@$(MAKE) -C Documentation/DocBook clean
mrproper: clean archmrproper
......
This diff is collapsed.
......@@ -61,9 +61,9 @@
*
* 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.
*
......@@ -112,29 +112,20 @@
#define INT_FIG_ ntohl(0x4649475f)
char *topdir;
char *target;
char *depfile;
char *cmdline;
void usage(void)
{
fprintf(stderr, "Usage: fixdep <target> <topdir> <cmdline>\n");
fprintf(stderr, "Usage: fixdep <depfile> <target> <topdir> <cmdline>\n");
exit(1);
}
void print_cmdline(char *target, char *cmdline)
void print_cmdline(void)
{
char *s = strdup(target);
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);
printf("cmd_%s := %s\n\n", target, cmdline);
}
char * str_config = NULL;
......@@ -297,11 +288,11 @@ void parse_dep_file(void *map, size_t len)
p = strchr(m, ':');
if (!p) {
fprintf(stderr, "parse error at %d", __LINE__);
fprintf(stderr, "fixdep: parse error\n");
exit(1);
}
memcpy(s, m, p-m); s[p-m] = 0;
printf("%s: \\\n", s);
printf("%s: \\\n", target);
m = p+1;
clear_config();
......@@ -326,22 +317,20 @@ void parse_dep_file(void *map, size_t len)
printf("\n");
}
void print_deps(char *target)
void print_deps(void)
{
char filename[PATH_MAX];
struct stat st;
int fd;
void *map;
sprintf(filename, ".%s.d", target);
fd = open(filename, O_RDONLY);
fd = open(depfile, O_RDONLY);
if (fd < 0) {
perror(filename);
perror(depfile);
exit(2);
}
fstat(fd, &st);
if (st.st_size == 0) {
fprintf(stderr,"%s is empty\n",filename);
fprintf(stderr,"fixdep: %s is empty\n",depfile);
close(fd);
return;
}
......@@ -362,7 +351,7 @@ void traps(void)
char *test = "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);
exit(2);
}
......@@ -370,19 +359,18 @@ void traps(void)
int main(int argc, char *argv[])
{
char *target, *cmdline;
traps();
if (argc != 4)
if (argc != 5)
usage();
target = argv[1];
topdir = argv[2];
cmdline = argv[3];
depfile = argv[1];
target = argv[2];
topdir = argv[3];
cmdline = argv[4];
print_cmdline(target, cmdline);
print_deps(target);
print_cmdline();
print_deps();
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