diff options
Diffstat (limited to 'v4l/Makefile')
-rw-r--r-- | v4l/Makefile | 69 |
1 files changed, 30 insertions, 39 deletions
diff --git a/v4l/Makefile b/v4l/Makefile index f77822ecf..8ee72293f 100644 --- a/v4l/Makefile +++ b/v4l/Makefile @@ -134,64 +134,55 @@ default:: linux media $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules -install:: - strip --strip-debug $(inst-m) +install:: rminstall + @echo -e "\nInstalling new V4L modules at corresponding Kernel dir..." + @strip --strip-debug $(inst-m) + -install -d $(KDIR26)/common - -rm $(addprefix $(KDIR26)/common/, $(addsuffix .gz,$(inst_common))) 2>/dev/null -install -m 644 -c $(inst_common) $(KDIR26)/common -install -d $(KDIR26)/dvb/frontends - -rm $(addprefix $(KDIR26)/dvb/frontends/, $(addsuffix .gz,$(inst_frontends))) 2>/dev/null -install -m 644 -c $(inst_frontends) $(KDIR26)/dvb/frontends -install -d $(KDIR26)/video - -rm $(addprefix $(KDIR26)/video/, $(addsuffix .gz,$(inst_video))) 2>/dev/null -install -m 644 -c $(inst_video) $(KDIR26)/video -install -d $(KDIR26)/video/cx88 - -rm $(addprefix $(KDIR26)/video/cx88/, $(addsuffix .gz,$(inst_cx88))) 2>/dev/null -install -m 644 -c $(inst_cx88) $(KDIR26)/video/cx88 -install -d $(KDIR26)/video/saa7134 - -rm $(addprefix $(KDIR26)/video/saa7134/, $(addsuffix .gz,$(inst_saa7134))) 2>/dev/null -install -m 644 -c $(inst_saa7134) $(KDIR26)/video/saa7134 - -rm -r $(DEST) - /sbin/depmod -a -v4l_install:: - strip --strip-debug $(inst-m) - - -rm $(addprefix $(KDIR26)/common/, $(inst_common)) 2>/dev/null - -rm $(addprefix $(KDIR26)/common/, $(addsuffix .gz,$(inst_common))) 2>/dev/null - -rm $(addprefix $(KDIR26)/dvb/frontends/, $(inst_frontends)) 2>/dev/null - -rm $(addprefix $(KDIR26)/dvb/frontends/, $(addsuffix .gz,$(inst_frontends))) 2>/dev/null - -rm $(addprefix $(KDIR26)/video/, $(inst_video)) 2>/dev/null - -rm $(addprefix $(KDIR26)/video/, $(addsuffix .gz,$(inst_video))) 2>/dev/null - -rm $(addprefix $(KDIR26)/video/cx88/, $(inst_cx88)) 2>/dev/null - -rm $(addprefix $(KDIR26)/video/cx88/, $(addsuffix .gz,$(inst_cx88))) 2>/dev/null - -rm $(addprefix $(KDIR26)/video/saa7134/, $(inst_saa7134)) 2>/dev/null - -rm $(addprefix $(KDIR26)/video/saa7134/, $(addsuffix .gz,$(inst_saa7134))) 2>/dev/null - -mkdir -p $(DEST) - -cp -v $(inst-m) $(DEST) + +v4l_install:: rminstall + @echo -e "\nInstalling new V4L modules at $(DEST)..." + + @strip --strip-debug $(inst-m) + + -install -d $(DEST) + install -m 644 -c $(inst-m) $(DEST) + /sbin/depmod -a -rminstall: - -rm -r $(DEST) - - -rm $(addprefix $(KDIR26)/common/, $(inst_common)) 2>/dev/null - -rm $(addprefix $(KDIR26)/common/, $(addsuffix .gz,$(inst_common))) 2>/dev/null - -rm $(addprefix $(KDIR26)/dvb/frontends/, $(inst_frontends)) 2>/dev/null - -rm $(addprefix $(KDIR26)/dvb/frontends/, $(addsuffix .gz,$(inst_frontends))) 2>/dev/null - -rm $(addprefix $(KDIR26)/video/, $(inst_video)) 2>/dev/null - -rm $(addprefix $(KDIR26)/video/, $(addsuffix .gz,$(inst_video))) 2>/dev/null - -rm $(addprefix $(KDIR26)/video/cx88/, $(inst_cx88)) 2>/dev/null - -rm $(addprefix $(KDIR26)/video/cx88/, $(addsuffix .gz,$(inst_cx88))) 2>/dev/null - -rm $(addprefix $(KDIR26)/video/saa7134/, $(inst_saa7134)) 2>/dev/null - -rm $(addprefix $(KDIR26)/video/saa7134/, $(addsuffix .gz,$(inst_saa7134))) 2>/dev/null - -rmmodules: +rminstall:: + @echo -e "\nEliminating old V4L modules (errors on this step is not a problem).." + + -@rm -r $(DEST) \ + $(addprefix $(KDIR26)/common/, $(inst_common)) \ + $(addprefix $(KDIR26)/dvb/frontends/, $(inst_frontends)) \ + $(addprefix $(KDIR26)/video/, $(inst_video)) \ + $(addprefix $(KDIR26)/video/cx88/, $(inst_cx88)) \ + $(addprefix $(KDIR26)/video/saa7134/, $(inst_saa7134)) \ + $(addprefix $(KDIR26)/common/, $(addsuffix .gz,$(inst_common))) \ + $(addprefix $(KDIR26)/dvb/frontends/, $(addsuffix .gz,$(inst_frontends))) \ + $(addprefix $(KDIR26)/video/, $(addsuffix .gz,$(inst_video))) \ + $(addprefix $(KDIR26)/video/cx88/, $(addsuffix .gz,$(inst_cx88))) \ + $(addprefix $(KDIR26)/video/saa7134/, $(addsuffix .gz,$(inst_saa7134))) 2>/dev/null + @echo + +rmmodules:: rmmod -w $(shell echo "$(v4l_modules)"|sed s,' ','\n',g|sed s,'-','_',g|sort|uniq -d) clean:: |