[linux-dvb] [PATCH] v4l-dvb: add $DESTDIR support
Trent Piepho
xyzzy at speakeasy.org
Wed Mar 7 21:12:28 CET 2007
> Following patch adds $DESTDIR support so one can install the kernel
> modules into a directory other than / as non-root user. That's
> useful when building an rpm or compiling for a different machine.
>
> Signed-off-by: Ludwig Nussel <ludwig.nussel at suse.de>
>
> diff -r 44676649301d v4l/scripts/make_makefile.pl
> --- a/v4l/scripts/make_makefile.pl Tue Mar 06 19:15:19 2007 +0100
> +++ b/v4l/scripts/make_makefile.pl Wed Mar 07 14:35:40 2007 +0100
> @@ -134,12 +134,12 @@ print OUT "\t\@strip --strip-debug \$(in
>
> while (my ($dir, $files) = each %instdir) {
> print OUT "\t\@echo -e \"\\nInstalling \$(KDIR26)/$dir files:\"\n";
> - print OUT "\t\@install -d \$(KDIR26)/$dir\n";
> + print OUT "\t\@install -d \$(DESTDIR)\$(KDIR26)/$dir\n";
> print OUT "\t\@for i in ", join(' ', keys %$files), ";do ";
> print OUT "if [ -e \"\$\$i\" ]; then echo -n \"\$\$i \";";
> - print OUT " install -m 644 -c \$\$i \$(KDIR26)/$dir; fi; done; echo;\n\n";
> + print OUT " install -m 644 -c \$\$i \$(DESTDIR)\$(KDIR26)/$dir; fi; done; echo;\n\n";
> }
This part looks ok.
> -print OUT "\t/sbin/depmod -a \${KERNELRELEASE}\n\n";
> +print OUT "\tif [ -w / ]; then /sbin/depmod -a \${KERNELRELEASE}; fi\n\n";
This doesn't seem correct. Shouldn't it be:
print OUT "\t/sbin/depmod -a \$(KERNELRELEASE) \$(if \$(DESTDIR),-b \$(DESTDIR))\n\n";
> # Creating Remove rule
> print OUT "media-rminstall::\n";
Seems like the rminstall rule should use DESTDIR too.
More information about the linux-dvb
mailing list