diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2006-04-08 16:05:48 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2006-04-08 16:05:48 -0300 |
commit | f5a63349b2b9e0daf5c7a993792af521e3dda46f (patch) | |
tree | 5bfbf09f341e064d30d3fd5ba62b7b3ea1310637 /v4l | |
parent | b664cece1c397677d509fa9a41874464f5a44214 (diff) | |
download | mediapointer-dvb-s2-f5a63349b2b9e0daf5c7a993792af521e3dda46f.tar.gz mediapointer-dvb-s2-f5a63349b2b9e0daf5c7a993792af521e3dda46f.tar.bz2 |
Some cleanups at make install/make remove
From: Mauro Carvalho Chehab <mchehab@infradead.org>
Now, it won't generate errors for non-compiled objects.
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'v4l')
-rwxr-xr-x | v4l/scripts/make_makefile.pl | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/v4l/scripts/make_makefile.pl b/v4l/scripts/make_makefile.pl index 1063617a1..17ef048e7 100755 --- a/v4l/scripts/make_makefile.pl +++ b/v4l/scripts/make_makefile.pl @@ -114,25 +114,32 @@ open_makefile ("../linux/drivers/media/Makefile"); # Creating Install rule printf OUT "install::\n"; -printf OUT "\t@strip --strip-debug \$(inst-m)\n\n"; +#printf OUT "\t@strip --strip-debug \$(inst-m)\n\n"; while ( my ($key, $value) = each(%instdir) ) { - printf OUT "\t\@echo -e \"\\nInstalling \$(KDIR26)/$key files\"\n"; - printf OUT "\t-install -d \$(KDIR26)/$key\n"; + printf OUT "\t\@echo -e \"\\nInstalling \$(KDIR26)/$key files:\"\n"; + printf OUT "\t\@install -d \$(KDIR26)/$key\n"; printf OUT "\t\@files='$value'; "; - printf OUT "for i in \$\$files; do install -m 644 -c \$\$i \$(KDIR26)/$key; done\n\n"; + printf OUT "for i in \$\$files;do if [ -e \$\$i ]; then echo -n \"\$\$i \";"; + printf OUT " install -m 644 -c \$\$i \$(KDIR26)/$key; fi; done; echo;\n\n"; } # Creating Remove rule -printf OUT "remove::\n"; +printf OUT "remove rminstall::\n"; printf OUT "\t\@echo -e \"\\nRemoving old \$(DEST) files\\n\"\n"; -printf OUT "\t-rm -r \$(DEST)\n\n"; while ( my ($key, $value) = each(%instdir) ) { - printf OUT "\t\@echo -e \"\\nRemoving old \$(KDIR26)/$key files\\n\"\n"; + printf OUT "\t\@echo -e \"\\nRemoving old \$(KDIR26)/$key files:\"\n"; printf OUT "\t\@files='$value'; "; - printf OUT "for i in \$\$files; do rm \$(KDIR26)/$key/\$\$i; done\n\n"; + + printf OUT "for i in \$\$files;do if [ -e \$(KDIR26)/$key/\$\$i ]; then "; + printf OUT "echo -n \"\$\$i \";"; + printf OUT " rm \$(KDIR26)/$key/\$\$i; fi; done; "; + + printf OUT "for i in \$\$files;do if [ -e \$(KDIR26)/$key/\$\$i.gz ]; then "; + printf OUT "echo -n \"\$\$i.gz \";"; + printf OUT " rm \$(KDIR26)/$key/\$\$i.gz; fi; done; echo;\n\n"; } close OUT; |