diff options
author | Trent Piepho <xyzzy@speakeasy.org> | 2007-03-09 14:02:18 -0800 |
---|---|---|
committer | Trent Piepho <xyzzy@speakeasy.org> | 2007-03-09 14:02:18 -0800 |
commit | 7b614fddb1b412f6ec17b91907a4473ed08e97de (patch) | |
tree | f2ffd61f5901edac7685b13db65c1440163a42f2 /v4l | |
parent | 83e043633e367fdfebb7dca7cf731ea5c1ade20e (diff) | |
download | mediapointer-dvb-s2-7b614fddb1b412f6ec17b91907a4473ed08e97de.tar.gz mediapointer-dvb-s2-7b614fddb1b412f6ec17b91907a4473ed08e97de.tar.bz2 |
build: Add support for DESTDIR when installing/removing modules
From: Ludwig Nussel <ludwig.nussel@suse.de>
If defined, use $(DESTDIR) as a prefix for installing and removing
modules. depmod will also use $(DESTDIR) as a prefix when it is run as
part of module installation.
Signed-off-by: Ludwig Nussel <ludwig.nussel@suse.de>
Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Diffstat (limited to 'v4l')
-rwxr-xr-x | v4l/scripts/make_makefile.pl | 14 |
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 |