Changeset 1109 for trunk/src/kmk/read.c
- Timestamp:
- Sep 24, 2007, 4:27:14 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kmk/read.c
r1022 r1109 1519 1519 1520 1520 /* Interpret conditional commands "ifdef", "ifndef", "ifeq", 1521 "ifneq", " else" and "endif".1521 "ifneq", "if1of", "ifn1of", "else" and "endif". 1522 1522 LINE is the input line, with the command as its first word. 1523 1523 … … 1534 1534 { 1535 1535 char *cmdname; 1536 #ifdef CONFIG_WITH_SET_CONDITIONALS 1537 enum { c_ifdef, c_ifndef, c_ifeq, c_ifneq, c_if1of, c_ifn1of, c_else, c_endif } cmdtype; 1538 #else 1536 1539 enum { c_ifdef, c_ifndef, c_ifeq, c_ifneq, c_else, c_endif } cmdtype; 1540 #endif 1537 1541 unsigned int i; 1538 1542 unsigned int o; … … 1547 1551 else chkword ("ifeq", c_ifeq) 1548 1552 else chkword ("ifneq", c_ifneq) 1553 #ifdef CONFIG_WITH_SET_CONDITIONALS 1554 else chkword ("if1of", c_if1of) 1555 else chkword ("ifn1of", c_ifn1of) 1556 #endif 1549 1557 else chkword ("else", c_else) 1550 1558 else chkword ("endif", c_endif) … … 1687 1695 else 1688 1696 { 1697 #ifdef CONFIG_WITH_SET_CONDITIONALS 1698 /* "ifeq", "ifneq", "if1of" or "ifn1of". */ 1699 #else 1689 1700 /* "ifeq" or "ifneq". */ 1701 #endif 1690 1702 char *s1, *s2; 1691 1703 unsigned int l; … … 1776 1788 1777 1789 s2 = variable_expand (s2); 1790 #ifdef CONFIG_WITH_SET_CONDITIONALS 1791 if (cmdtype == c_if1of || cmdtype == c_ifn1of) 1792 { 1793 const char *s1_cur; 1794 unsigned int s1_len; 1795 const char *s1_iterator = s1; 1796 1797 conditionals->ignoring[o] = (cmdtype == c_if1of); /* if not found */ 1798 while ((s1_cur = find_next_token (&s1_iterator, &s1_len)) != 0) 1799 { 1800 const char *s2_cur; 1801 unsigned int s2_len; 1802 const char *s2_iterator = s2; 1803 while ((s2_cur = find_next_token (&s2_iterator, &s2_len)) != 0) 1804 if (s2_len == s1_len 1805 && strneq (s2_cur, s1_cur, s1_len) ) 1806 { 1807 conditionals->ignoring[o] = (cmdtype != c_if1of); /* found */ 1808 break; 1809 } 1810 } 1811 } 1812 else 1813 conditionals->ignoring[o] = (streq (s1, s2) == (cmdtype == c_ifneq)); 1814 #else 1778 1815 conditionals->ignoring[o] = (streq (s1, s2) == (cmdtype == c_ifneq)); 1816 #endif 1779 1817 } 1780 1818 … … 2069 2107 cmp timestamp maybe.h || cp -f timestamp maybe.h 2070 2108 2071 This is implemented in remake.c where we don't consider the mtime of 2109 This is implemented in remake.c where we don't consider the mtime of 2072 2110 the maybe-updated targets. */ 2073 2111 if (multi_mode != m_no && name[0] == '+'
Note:
See TracChangeset
for help on using the changeset viewer.