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/>

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Wien mailing list
[email protected]
http://zeus.theochem.tuwien.ac.at/mailman/listinfo/wien
SEARCH the MAILING-LIST at:  
http://www.mail-archive.com/[email protected]/index.html

Reply via email to