$(CSRC) $(HSRC) $(SCRIPTSRC):
	test -f $(SRCDIR)/$@ && ln -s $(SRCDIR)/$@

$(DUPDIR):
	test -d $(SRCDIR)/$(DUPDIR) && mkdir $(DUPDIR) && cp -p $(SRCDIR)/$(DUPDIR)/* $(DUPDIR)

$(OBJDIR)/Makefile: Makefile
	test -d $(OBJDIR) || mkdir $(OBJDIR)
	test -f $(OBJDIR)/Makefile && mv $(OBJDIR)/Makefile $(OBJDIR)/Makefile~ ||:
	cp -p Makefile $(OBJDIR)/Makefile

coverage:
	X () { test -f $$1 || return 0; gcov $$*; }; X *.gc??


depend: Makefile $(CSRC)
	echo $(CSRC) | xargs gcc -MM $(CPREFLAGS) > depend
	tail -n `wc -l < depend` Makefile | diff - depend

$(CSRC) $(HSRC) $(SCRIPTSRC):
	test -f $(SRCDIR)/$@ && ln -s $(SRCDIR)/$@

$(DUPDIR):
	test -d $(SRCDIR)/$(DUPDIR) && mkdir $(DUPDIR) && cp -p $(SRCDIR)/$(DUPDIR)/* $(DUPDIR)

$(OBJDIR)/Makefile: Makefile
	test -d $(OBJDIR) || mkdir $(OBJDIR)
	test -f $(OBJDIR)/Makefile && mv $(OBJDIR)/Makefile $(OBJDIR)/Makefile~ ||:
	cp -p Makefile $(OBJDIR)/Makefile

coverage:
	X () { test -f $$1 || return 0; gcov $$*; }; X *.gc??


depend: Makefile $(CSRC)
	for i in $(CSRC); do gcc -MM $(CPREFLAGS) $$i; done > depend
	tail -n `wc -l < depend` Makefile | diff - depend

Use a shell for loop instead of xargs to accomplish the desired goal of successfully doing nothing with no input. It turns out that the POSIX xargs always executes its command at least once.
Use a shell for loop instead of xargs to accomplish the desired goal of successfully doing nothing with no input. It turns out that the POSIX xargs always executes its command at least once.


