[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Follow-up
From: |
Rob Holbert |
Subject: |
Follow-up |
Date: |
Mon, 11 Jul 2011 15:24:18 -0400 |
Wanted to followup to my earlier email. Attached is the smallest makefile I could create to demonsterate the issue.
or
#does not sort lexically like expected
LIST = $(sort widget.c main.c ad.c Buzzer.c)
#target
all: list
list:
@echo $(LIST)
.PHONY: all list
Previous email:
Hello,
I ran across perhaps a bug or need for another feature at least. If a list of items has words beginning with both upper and lower case letters, the resulting $(sort $(LIST)) will result in all capital letter words coming before the lower case words. In this case, Zebra.c would appear before apple.c. This is dictated by the ASCII chart of course. However, it is not lexical order as the manual explains the function is. Lexical would be apple.c Zebra.c.
This is solved easily by making the sort comparison convert all alphas to lower case before comparing, leaving the original string case unchanged.
I like to use sort to put my sources in order. This way it is easier to see if an object file is missing for instance.
Best Regards,
Rob
Makefile
Description: Binary data
- Follow-up,
Rob Holbert <=
- $(sort) - what is "lexical order"? (was RE: Follow-up), Martin Dorey, 2011/07/12
- Message not available
- RE: $(sort) - what is "lexical order"? (was RE: Follow-up), Martin Dorey, 2011/07/18
- Message not available
- RE: $(sort) - what is "lexical order"? (was RE: Follow-up), Martin Dorey, 2011/07/19
- RE: $(sort) - what is "lexical order"? (was RE: Follow-up), Paul Smith, 2011/07/19
- Re: $(sort) - what is "lexical order"? (was RE: Follow-up), David Boyce, 2011/07/19
- RE: $(sort) - what is "lexical order"? (was RE: Follow-up), Martin Dorey, 2011/07/19
- Re: $(sort) - what is "lexical order"? (was RE: Follow-up), Edward Welbourne, 2011/07/19
- Message not available
- Re: $(sort) - what is "lexical order"? (was RE: Follow-up), Paul Smith, 2011/07/19