It seems make(1) does or does not retain the effect of cd(1) between
commands depending on whether or not the -j option is used. This
behavior is not documented. Is it expected?
The target in question is on line 671:
$(DOCDIR)/userguide/index.htm:
After the "# try jade" comment, it calls cd and jade. After that, in
case jade failed or couldn't be used, it would generate a stub ... and
does, unless -j2 is used. Without -j2, the working directory reverts
to what it was before cd was called. With -j2, it persists.
The "echo pwd is" line produced these results with and without -j2:
$ grep 'pwd is' make.*log
make.1.log:pwd is /home/jklowden/freetds/build/doc
make.j2.log:pwd
is /home/jklowden/freetds/build/doc/doc/freetds-0.92.dev.20111109/userguide
$ uname -a
NetBSD oak.schemamania.org 5.0.2 NetBSD 5.0.2 (GENERIC) #0: Sat Feb 6
13:44:19 UTC 2010
builds%b8.netbsd.org@localhost:/home/builds/ab/netbsd-5-0-2-RELEASE/amd64/201002061851Z-obj/home/builds/ab/netbsd-5-0-2-RELEASE/src/sys/arch/amd64/compile/GENERIC
amd64
Bug or feature?
--jkl
Attachment:
Makefile
Description: Binary data