Commit 6556c273 authored by Mike Frysinger's avatar Mike Frysinger

build: use -- with rm

Some of the globs might expand into files that start with a dash, so
pass -- everywhere to keep problems from showing up.  Some call sites
don't actually need this, but better to be consistent.
parent c5a91aa5
...@@ -102,33 +102,33 @@ install: all savebin installbin installdata ...@@ -102,33 +102,33 @@ install: all savebin installbin installdata
update: all installbin installdata update: all installbin installdata
mostlyclean: mostlyclean:
rm -f *.o DEADJOE config.new *~ *.orig lib/*.o rm -f -- *.o DEADJOE config.new *~ *.orig lib/*.o
clean: mostlyclean clean: mostlyclean
rm -f $(PROGS) rm -f -- $(PROGS)
@for i in $(SUBDIRS); do (cd $$i && $(MAKE) clean) ; done @for i in $(SUBDIRS); do (cd $$i && $(MAKE) clean) ; done
@cd po && $(MAKE) clean @cd po && $(MAKE) clean
cleanconfig: cleanconfig:
rm -f config.h rm -f -- config.h
clobber: clean clobber: clean
rm -f $(PROGS) config.h version.h config.status config.make rm -f -- $(PROGS) config.h version.h config.status config.make
@for i in $(SUBDIRS); do (cd $$i && $(MAKE) clobber) ; done @for i in $(SUBDIRS); do (cd $$i && $(MAKE) clobber) ; done
dist: dist:
rm -rf net-tools-$(RELEASE) rm -rf -- net-tools-$(RELEASE)
git archive --prefix=net-tools-$(RELEASE)/ HEAD | tar xf - git archive --prefix=net-tools-$(RELEASE)/ HEAD | tar xf -
$(MAKE) -C net-tools-$(RELEASE)/po $@ $(MAKE) -C net-tools-$(RELEASE)/po $@
tar cf - net-tools-$(RELEASE)/ | xz > net-tools-$(RELEASE).tar.xz tar cf - net-tools-$(RELEASE)/ | xz > net-tools-$(RELEASE).tar.xz
rm -rf net-tools-$(RELEASE) rm -rf -- net-tools-$(RELEASE)
distcheck: dist distcheck: dist
tar xf net-tools-$(RELEASE).tar.xz tar xf net-tools-$(RELEASE).tar.xz
yes "" | $(MAKE) -C net-tools-$(RELEASE) config yes "" | $(MAKE) -C net-tools-$(RELEASE) config
$(MAKE) -C net-tools-$(RELEASE) $(MAKE) -C net-tools-$(RELEASE)
rm -rf net-tools-$(RELEASE) rm -rf -- net-tools-$(RELEASE)
@printf "\nThe tarball is ready to go:\n%s\n" "`du -b net-tools-$(RELEASE).tar.xz`" @printf "\nThe tarball is ready to go:\n%s\n" "`du -b net-tools-$(RELEASE).tar.xz`"
config.h: config.in Makefile config.h: config.in Makefile
......
...@@ -45,14 +45,14 @@ all: lib$(NET_LIB_NAME).a # lib$(NET_LIB_NAME).so ...@@ -45,14 +45,14 @@ all: lib$(NET_LIB_NAME).a # lib$(NET_LIB_NAME).so
lib$(NET_LIB_NAME).a: Makefile $(TOPDIR)/config.h $(OBJS) lib$(NET_LIB_NAME).a: Makefile $(TOPDIR)/config.h $(OBJS)
@echo Building $@ @echo Building $@
@rm -f $@ @rm -f -- $@
@$(AR) rcs $@ $(OBJS) @$(AR) rcs $@ $(OBJS)
.a.so:; .a.so:;
$(CC) -o $@ -shared -Wl,--whole-archive -Wl,--soname -Wl,$(SONAME) -nostdlib -nostartfiles $< $(CC) -o $@ -shared -Wl,--whole-archive -Wl,--soname -Wl,$(SONAME) -nostdlib -nostartfiles $<
clean: clean:
rm -f *.o *~ *.orig lib$(NET_LIB_NAME).a lib$(NET_LIB_NAME).so rm -f -- *.o *~ *.orig lib$(NET_LIB_NAME).a lib$(NET_LIB_NAME).so
clobber: clean clobber: clean
......
...@@ -42,8 +42,8 @@ endif ...@@ -42,8 +42,8 @@ endif
all: all:
clean: clean:
rm -f DEADJOE *~ *.orig rm -f -- DEADJOE *~ *.orig
rm -f */DEADJOE */*~ */*.orig rm -f -- */DEADJOE */*~ */*.orig
clobber: clean clobber: clean
......
...@@ -44,7 +44,7 @@ $(NLSPACKAGE).pot: $(POTFILES) ...@@ -44,7 +44,7 @@ $(NLSPACKAGE).pot: $(POTFILES)
xgettext --default-domain=$(NLSPACKAGE) \ xgettext --default-domain=$(NLSPACKAGE) \
--add-comments --keyword=_ --keyword=N_ $(POTFILES) --add-comments --keyword=_ --keyword=N_ $(POTFILES)
if cmp -s $(NLSPACKAGE).po $(NLSPACKAGE).pot; then \ if cmp -s $(NLSPACKAGE).po $(NLSPACKAGE).pot; then \
rm -f $(NLSPACKAGE).po; \ rm -f -- $(NLSPACKAGE).po; \
else \ else \
mv $(NLSPACKAGE).po $(NLSPACKAGE).pot; \ mv $(NLSPACKAGE).po $(NLSPACKAGE).pot; \
fi fi
...@@ -58,21 +58,21 @@ update-po: Makefile ...@@ -58,21 +58,21 @@ update-po: Makefile
mv $$lang.po $$lang.old.po; \ mv $$lang.po $$lang.old.po; \
echo "$$lang:"; \ echo "$$lang:"; \
if $(TUPDATE) $$lang.old.po $(NLSPACKAGE).pot > $$lang.po; then \ if $(TUPDATE) $$lang.old.po $(NLSPACKAGE).pot > $$lang.po; then \
rm -f $$lang.old.po; \ rm -f -- $$lang.old.po; \
else \ else \
echo "tupdate for $$cat failed!"; \ echo "tupdate for $$cat failed!"; \
rm -f $$lang.po; \ rm -f -- $$lang.po; \
mv $$lang.old.po $$lang.po; \ mv $$lang.old.po $$lang.po; \
fi; \ fi; \
done done
clean: clean:
rm -f *mo rm -f -- *mo
dist: $(ALL_CATALOGS) dist: $(ALL_CATALOGS)
distclean: clean distclean: clean
rm -f .depend Makefile rm -f -- .depend Makefile
depend: depend:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment