Skip to contentSkip to conversation

Weird code in scripts/kconfig/Makefile

DISCUSSION Pete Zaitcev 3 participants 3 messages Dec 13, 2006

lore
Share & tools
lore
#0 lore raw

Hi, Roman & All:

In 2.6.19 (and Linus' curent tree), I found the following:

          libpath=$$dir/lib; lib=qt; osdir=""; \
          $(HOSTCXX) -print-multi-os-directory > /dev/null 2>&1 && \
            osdir=x$$($(HOSTCXX) -print-multi-os-directory); \
          test -d $$libpath/$$osdir && libpath=$$libpath/$$osdir; \

What does the little 'x' do in front of $$(foo)? It looks suspiciously like a typo to me.

I think Jason caught it, but I didn't see a correction sent out.

-- Pete

#1 lore raw
Quoted 9 lines · Pete Zaitcev

Hi, Roman & All:

In 2.6.19 (and Linus' curent tree), I found the following:

          libpath=$$dir/lib; lib=qt; osdir=""; \
          $(HOSTCXX) -print-multi-os-directory > /dev/null 2>&1 && \
            osdir=x$$($(HOSTCXX) -print-multi-os-directory); \
          test -d $$libpath/$$osdir && libpath=$$libpath/$$osdir; \
Quoted 5 lines

What does the little 'x' do in front of $$(foo)? It looks suspiciously like a typo to me.

I think Jason caught it, but I didn't see a correction sent out.

yes. looks like an error to me too...i left it out of an internal patch to this code. Since we are testing for the existence of the directory, it has probably gone unnoticed.

#2 lore raw
In reply to Pete Zaitcev

Hi,

Quoted 9 lines · Pete Zaitcev

In 2.6.19 (and Linus' curent tree), I found the following:

          libpath=$$dir/lib; lib=qt; osdir=""; \
          $(HOSTCXX) -print-multi-os-directory > /dev/null 2>&1 && \
            osdir=x$$($(HOSTCXX) -print-multi-os-directory); \
          test -d $$libpath/$$osdir && libpath=$$libpath/$$osdir; \

What does the little 'x' do in front of $$(foo)? It looks suspiciously like a typo to me.

Indeed, it looks like it. It's the fallback path nowadays, so I guess it wasn't noticed so far.

bye, Roman