Hi:
I could not get help on the help-make list. Please let me know if I should explain the issue further ..


We are using GNU make 3.79.1.

There is a GNUmakefile in /user/u/src that has a rule like this:

install_scripts: ../install/scripts/scr.pl

        ../install/%: %
                install -m 444 $(<) $(@)

We have a file like so : /user/u/src/scripts/scr.pl

The master project is in /user/p/src. There is a copy of the same makefile in this directory and the script is installed in this tree also at /user/p/install/scripts/scr.pl.

The problem is when gmake is run in /user/u/src.

1. VPATH is set to /user/p/src.
2. If /user/u/install/scripts/scr.pl exists and if the file /user/u/src/scripts/scr.pl is older then, it is installed. As expected.
3. However, if /user/u/install/scripts/scr.pl does not exist and if the file /user/u/src/scripts/scr.pl is NOT older that /user/p/install/scripts/scr.pl, then it is not installed in /user/u/install.


gmake says (when run with -d) because of the VPATH setting , it is looking at /user/p/src/../install/scripts/scr.pl and since it is older there is no need to run the rule. However it runs the rule if /user/u/install/scripts/scr.pl exists.

Why does it behave differently depending on the existence of a file in the install tree and take VPATH into consider in one instance and not do so every time?

Thanks,
Harsha

[EMAIL PROTECTED] 212.762.4165

This communication is intended for the addressee(s) and may contain confidential and legally privileged information. We do not waive confidentiality or privilege by mis-transmission. If you have received this communication in error, any use, dissemination, printing or copying is strictly prohibited; please destroy all electronic and paper copies and notify the sender immediately.



_______________________________________________
Bug-make mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-make

Reply via email to