I have Makefile like this:
b:
@echo "b"
a:
@echo "a"
@make b
I want this Makefile to print “a\nb” after i execute ‘make a’. It does the
thing, but It also prints “Entering directory” and “Leaving directory”:
$ make a
a
make[1]: Entering directory `/home/bessarabov'
b
make[1]: Leaving directory `/home/bessarabov'
Actually that lines doesn’t disturb me, but I’m not sure that this is the
correct way of running some targets in the end of other targets.
GNU make has a switch to silence the Entering/Leaving messages:
--no-print-directory. usingmakeusually isn’t right, you probably want to change it to $(MAKE).rationale for $(MAKE) versus “make” is given in the GNU make manual here and here