1

I have following text in a Makefile.tg

#(subsystem static,distance_from_main_i686__tam-tg)

This is file is indexed by OpenGrok (hopefully).

I tried full search to look for that text in Makefile but failed for every query.

Some queries that i tried: /*tam-tg*/ , tam-tg, *tam-tg*, .*tam-tg.*, .tam-tg., tam\-tg ( other combinations of escaped hyphen )

How to search for this? Is makefile even indexed by OpenGrok? Note that OpenGrok is not under my control

JamesWebbTelescopeAlien
  • 3,547
  • 2
  • 30
  • 51
  • is there anything that's missing in my explanation of why that's the behaviour is as described? If yes, please clarify what's missing. If no, I'd appreciate if you could accept and upvote my answer. – cnst Jul 11 '16 at 17:15
  • is there anything that's missing from the answer? If not, could you kindly accept/upvote? Else, please clarify what's left to be addressed. – cnst Dec 11 '16 at 22:16

1 Answers1

2

As per the /help.jsp file in OpenGrok:

you cannot use a * or ? symbol as the first character of a search (unless enabled using indexer option -a).

Note that, traditionally in UNIX, a dash (-) is a word separator, whereas an underscore (_) is a valid character in a single identifier (Identifier = [a-zA-Z_] [a-zA-Z0-9_]*).

As such, your sample shell script (Makefile support in OpenGrok is generally detected as a mere shell script) doesn't have any "words" starting at tam-tg -- the word containing tam is most likely distance_from_main_i686__tam.

You can also search for multiple words at once, so, a search for distance_from_main_i686__tam-tg should also succeed, as should a prefix search for distance_from_*.

cnst
  • 25,870
  • 6
  • 90
  • 122