[Wien] w2w compilation problem during siteconfig

Elias Assmann elias.assmann at gmail.com
Wed Dec 21 19:21:17 CET 2016


My memory may be feeble, but the Internet remembers All.

It turns out that I had this exact problem three years ago.  I even
asked a question about it on StackOverflow [1], where a helpful user
pointed out that this is a known bug in make 3.82 [2] and suggested the
solution

.SECONDEXPANSION:

%.o: $$(wildcard %.[fF])
    $(FC) $(FFLAGS) -c $< -o $@

(splitting the rule should still also work, of course).

Since this problem was fixed in later versions of make and is easy to
circumvent if you are affected, I will leave my Makefiles as they are.

It remains a puzzle though that I cannot now reproduce the problem with
make 3.82 (neither with a make 3.81 that I found elsewhere).  Maybe
RedHat backported the fix?  ‘make -v’ says

GNU Make 3.82
Built for x86_64-redhat-linux-gnu


	Elias


[1] http://stackoverflow.com/questions/21193024/wildcard-in-a-pattern-rule
[2] https://savannah.gnu.org/bugs/?func=detailitem&item_id=31621

-- 
Elias Assmann
Institute of Theoretical and Computational Physics
TU Graz                   <https://itp.tugraz.at/>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 880 bytes
Desc: OpenPGP digital signature
URL: <http://zeus.theochem.tuwien.ac.at/pipermail/wien/attachments/20161221/e1bbb6f3/attachment.asc>


More information about the Wien mailing list