dimitri@cui.UUCP (KONSTANTAS Dimitri) (03/03/88)
Using the make program, I came to case where make behaves differently when executed with the -n option and without. That is with the -n option the actions are listed, as excected, but without it, they are not executed (I get that the target file is up-to-date). Following is a shar file that recreates the case. (the files are empty, but it is the modification dates that count) After unpacking the shar file , just give make -n test and then make test Can anybody explain what is happening? I run the test in both VAX with 4.3 and SUN 3.4 and get the same behavior. Dimitri Konstantas University of Geneva dimitri@cgeuge51.bitnet mcvax!cernvac!cui!dimitri ---- cut here --------------------------------------------- # This is a shell archive. Remove anything before this line, then # unpack it by saving it in a file and typing "sh file". (Files # unpacked will be owned by you and have default permissions.) # # This archive contains: # makefile crf # The files f1.a f2.o f2.c test test.c test.o will also be create echo x - makefile cat > "makefile" << '//E*O*F makefile//' test: f1.a @echo "compiling TEST" f1.a: f2.o @echo "Recompiling f1.a" f2.o: f2.c @echo "recompiling f2.c" //E*O*F makefile// echo x - crf cat > "crf" << '//E*O*F crf//' echo "Please wait a few seconds to recreate the files with correct times" touch test.c ; sleep 1 touch f2.o ; sleep 1 touch f1.a ; sleep 1 touch test.o ; sleep 1 touch test ; sleep 1 touch f2.c //E*O*F crf// sh ./crf exit 0