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
update: all installbin installdata
mostlyclean:
rm -f *.o DEADJOE config.new *~ *.orig lib/*.o
rm -f -- *.o DEADJOE config.new *~ *.orig lib/*.o
clean: mostlyclean
rm -f $(PROGS)
rm -f -- $(PROGS)
@for i in $(SUBDIRS); do (cd $$i && $(MAKE) clean) ; done
@cd po && $(MAKE) clean
cleanconfig:
rm -f config.h
rm -f -- config.h
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
dist:
rm -rf net-tools-$(RELEASE)
rm -rf -- net-tools-$(RELEASE)
git archive --prefix=net-tools-$(RELEASE)/ HEAD | tar xf -
$(MAKE) -C net-tools-$(RELEASE)/po $@
tar cf - net-tools-$(RELEASE)/ | xz > net-tools-$(RELEASE).tar.xz
rm -rf net-tools-$(RELEASE)
rm -rf -- net-tools-$(RELEASE)
distcheck: dist
tar xf net-tools-$(RELEASE).tar.xz
yes "" | $(MAKE) -C net-tools-$(RELEASE) config
$(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`"
config.h: config.in Makefile
......
......@@ -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)
@echo Building $@
@rm -f $@
@rm -f -- $@
@$(AR) rcs $@ $(OBJS)
.a.so:;
$(CC) -o $@ -shared -Wl,--whole-archive -Wl,--soname -Wl,$(SONAME) -nostdlib -nostartfiles $<
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
......
......@@ -42,8 +42,8 @@ endif
all:
clean:
rm -f DEADJOE *~ *.orig
rm -f */DEADJOE */*~ */*.orig
rm -f -- DEADJOE *~ *.orig
rm -f -- */DEADJOE */*~ */*.orig
clobber: clean
......
......@@ -44,7 +44,7 @@ $(NLSPACKAGE).pot: $(POTFILES)
xgettext --default-domain=$(NLSPACKAGE) \
--add-comments --keyword=_ --keyword=N_ $(POTFILES)
if cmp -s $(NLSPACKAGE).po $(NLSPACKAGE).pot; then \
rm -f $(NLSPACKAGE).po; \
rm -f -- $(NLSPACKAGE).po; \
else \
mv $(NLSPACKAGE).po $(NLSPACKAGE).pot; \
fi
......@@ -58,21 +58,21 @@ update-po: Makefile
mv $$lang.po $$lang.old.po; \
echo "$$lang:"; \
if $(TUPDATE) $$lang.old.po $(NLSPACKAGE).pot > $$lang.po; then \
rm -f $$lang.old.po; \
rm -f -- $$lang.old.po; \
else \
echo "tupdate for $$cat failed!"; \
rm -f $$lang.po; \
rm -f -- $$lang.po; \
mv $$lang.old.po $$lang.po; \
fi; \
done
clean:
rm -f *mo
rm -f -- *mo
dist: $(ALL_CATALOGS)
distclean: clean
rm -f .depend Makefile
rm -f -- .depend Makefile
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