diff options
-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; |