summaryrefslogtreecommitdiff
path: root/v4l/scripts/make_makefile.pl
diff options
context:
space:
mode:
Diffstat (limited to 'v4l/scripts/make_makefile.pl')
-rwxr-xr-xv4l/scripts/make_makefile.pl14
1 files changed, 7 insertions, 7 deletions
diff --git a/v4l/scripts/make_makefile.pl b/v4l/scripts/make_makefile.pl
index e1e08b578..8711cc5a8 100755
--- a/v4l/scripts/make_makefile.pl
+++ b/v4l/scripts/make_makefile.pl
@@ -134,12 +134,12 @@ print OUT "\t\@strip --strip-debug \$(inst-m)\n\n";
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";
}
-print OUT "\t/sbin/depmod -a \${KERNELRELEASE}\n\n";
+print OUT "\t/sbin/depmod -a \$(KERNELRELEASE) \$(if \$(DESTDIR),-b \$(DESTDIR))\n\n";
# Creating Remove rule
print OUT "media-rminstall::\n";
@@ -149,13 +149,13 @@ while ( my ($dir, $files) = each(%instdir) ) {
print OUT "\t\@echo -e \"\\nRemoving old \$(KDIR26)/$dir files:\"\n";
print OUT "\t\@files='", join(' ', keys %$files), "'; ";
- print OUT "for i in \$\$files;do if [ -e \$(KDIR26)/$dir/\$\$i ]; then ";
+ print OUT "for i in \$\$files;do if [ -e \$(DESTDIR)\$(KDIR26)/$dir/\$\$i ]; then ";
print OUT "echo -n \"\$\$i \";";
- print OUT " rm \$(KDIR26)/$dir/\$\$i; fi; done; ";
+ print OUT " rm \$(DESTDIR)\$(KDIR26)/$dir/\$\$i; fi; done; ";
- print OUT "for i in \$\$files;do if [ -e \$(KDIR26)/$dir/\$\$i.gz ]; then ";
+ print OUT "for i in \$\$files;do if [ -e \$(DESTDIR)\$(KDIR26)/$dir/\$\$i.gz ]; then ";
print OUT "echo -n \"\$\$i.gz \";";
- print OUT " rm \$(KDIR26)/$dir/\$\$i.gz; fi; done; echo;\n\n";
+ print OUT " rm \$(DESTDIR)\$(KDIR26)/$dir/\$\$i.gz; fi; done; echo;\n\n";
}
# Print dependencies of Makefile.media