Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
G
geany
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
geany
Commits
2d31d8f8
Kaydet (Commit)
2d31d8f8
authored
Nis 02, 2015
tarafından
Colomban Wendling
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
make: Support for combined targets
üst
5bed3b58
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
67 additions
and
79 deletions
+67
-79
make.c
tagmanager/ctags/make.c
+52
-78
Makefile.am
tests/ctags/Makefile.am
+1
-0
make-multi-target.mak
tests/ctags/make-multi-target.mak
+8
-0
make-multi-target.mak.tags
tests/ctags/make-multi-target.mak.tags
+5
-0
simple.mak.tags
tests/ctags/simple.mak.tags
+1
-1
No files found.
tagmanager/ctags/make.c
Dosyayı görüntüle @
2d31d8f8
...
@@ -105,42 +105,19 @@ static void newMacro (vString *const name)
...
@@ -105,42 +105,19 @@ static void newMacro (vString *const name)
makeSimpleTag
(
name
,
MakeKinds
,
K_MACRO
);
makeSimpleTag
(
name
,
MakeKinds
,
K_MACRO
);
}
}
static
void
newMacroFromDefine
(
vString
*
const
name
)
{
/* name is something like "define JAVAHPP_RULE", find the space and jump to the next char */
char
*
name_val
=
strchr
(
vStringValue
(
name
),
' '
);
if
(
name_val
!=
NULL
)
{
vStringCopyS
(
name
,
name_val
+
1
);
makeSimpleTag
(
name
,
MakeKinds
,
K_MACRO
);
}
}
static
void
readIdentifier
(
const
int
first
,
vString
*
const
id
)
static
void
readIdentifier
(
const
int
first
,
vString
*
const
id
)
{
{
int
depth
=
0
;
int
depth
=
0
;
int
c
=
first
;
int
c
=
first
;
int
c_prev
=
first
;
int
c_next
=
first
;
vStringClear
(
id
);
vStringClear
(
id
);
while
(
isIdentifier
(
c
)
||
c
==
' '
||
(
depth
>
0
&&
c
!=
EOF
&&
c
!=
'\n'
))
while
(
isIdentifier
(
c
)
||
(
depth
>
0
&&
c
!=
EOF
&&
c
!=
'\n'
))
{
{
c_next
=
nextChar
();
if
(
c
==
'('
||
c
==
'}'
)
if
(
c
==
'('
||
c
==
'}'
)
depth
++
;
depth
++
;
else
if
(
depth
>
0
&&
(
c
==
')'
||
c
==
'}'
))
else
if
(
depth
>
0
&&
(
c
==
')'
||
c
==
'}'
))
depth
--
;
depth
--
;
if
(
depth
<
1
&&
c
==
' '
)
{
vStringPut
(
id
,
c
);
/* add the space character only if the previous and
c
=
nextChar
();
* next character are valid identifiers */
if
(
isIdentifier
(
c_prev
)
&&
isIdentifier
(
c_next
))
vStringPut
(
id
,
c
);
}
else
{
vStringPut
(
id
,
c
);
}
c_prev
=
c
;
c
=
c_next
;
}
}
fileUngetc
(
c
);
fileUngetc
(
c
);
vStringTerminate
(
id
);
vStringTerminate
(
id
);
...
@@ -148,7 +125,7 @@ static void readIdentifier (const int first, vString *const id)
...
@@ -148,7 +125,7 @@ static void readIdentifier (const int first, vString *const id)
static
void
findMakeTags
(
void
)
static
void
findMakeTags
(
void
)
{
{
vString
*
name
=
vString
New
();
stringList
*
identifiers
=
stringList
New
();
boolean
newline
=
TRUE
;
boolean
newline
=
TRUE
;
boolean
in_define
=
FALSE
;
boolean
in_define
=
FALSE
;
boolean
in_rule
=
FALSE
;
boolean
in_rule
=
FALSE
;
...
@@ -169,6 +146,7 @@ static void findMakeTags (void)
...
@@ -169,6 +146,7 @@ static void findMakeTags (void)
else
else
in_rule
=
FALSE
;
in_rule
=
FALSE
;
}
}
stringListClear
(
identifiers
);
variable_possible
=
(
boolean
)(
!
in_rule
);
variable_possible
=
(
boolean
)(
!
in_rule
);
newline
=
FALSE
;
newline
=
FALSE
;
}
}
...
@@ -178,74 +156,70 @@ static void findMakeTags (void)
...
@@ -178,74 +156,70 @@ static void findMakeTags (void)
continue
;
continue
;
else
if
(
c
==
'#'
)
else
if
(
c
==
'#'
)
skipLine
();
skipLine
();
else
if
(
c
==
':'
)
else
if
(
variable_possible
&&
c
==
'?'
)
{
c
=
nextChar
();
fileUngetc
(
c
);
variable_possible
=
(
c
==
'='
);
}
else
if
(
variable_possible
&&
c
==
':'
&&
stringListCount
(
identifiers
)
>
0
)
{
c
=
nextChar
();
fileUngetc
(
c
);
if
(
c
!=
'='
)
{
unsigned
int
i
;
for
(
i
=
0
;
i
<
stringListCount
(
identifiers
);
i
++
)
newTarget
(
stringListItem
(
identifiers
,
i
));
stringListClear
(
identifiers
);
in_rule
=
TRUE
;
}
}
else
if
(
variable_possible
&&
c
==
'='
&&
stringListCount
(
identifiers
)
==
1
)
{
{
variable_possible
=
TRUE
;
newMacro
(
stringListItem
(
identifiers
,
0
));
in_rule
=
TRUE
;
skipLine
();
in_rule
=
FALSE
;
}
}
else
if
(
variable_possible
&&
isIdentifier
(
c
))
else
if
(
variable_possible
&&
isIdentifier
(
c
))
{
{
vString
*
name
=
vStringNew
();
readIdentifier
(
c
,
name
);
readIdentifier
(
c
,
name
);
if
(
strncmp
(
vStringValue
(
name
),
"endef"
,
5
)
==
0
)
stringListAdd
(
identifiers
,
name
);
in_define
=
FALSE
;
else
if
(
in_define
)
if
(
stringListCount
(
identifiers
)
==
1
)
skipLine
();
else
if
(
strncmp
(
vStringValue
(
name
),
"define"
,
6
)
==
0
&&
isIdentifier
(
c
))
{
{
in_define
=
TRUE
;
if
(
in_define
&&
!
strcmp
(
vStringValue
(
name
),
"endef"
))
c
=
skipToNonWhite
();
in_define
=
FALSE
;
newMacroFromDefine
(
name
);
else
if
(
in_define
)
skipLine
();
skipLine
();
}
else
if
(
!
strcmp
(
vStringValue
(
name
),
"define"
))
else
{
c
=
skipToNonWhite
();
if
(
strchr
(
":?+"
,
c
)
!=
NULL
)
{
{
boolean
append
=
(
boolean
)(
c
==
'+'
);
in_define
=
TRUE
;
boolean
was_colon
=
(
c
==
':'
);
c
=
skipToNonWhite
();
c
=
nextChar
();
vStringClear
(
name
);
if
(
was_colon
)
/* all remaining characters on the line are the name -- even spaces */
{
while
(
c
!=
EOF
&&
c
!=
'\n'
)
if
(
c
==
'='
)
{
newMacro
(
name
);
in_rule
=
FALSE
;
skipLine
();
}
else
{
fileUngetc
(
c
);
in_rule
=
TRUE
;
newTarget
(
name
);
}
}
else
if
(
append
)
{
{
skipLine
(
);
vStringPut
(
name
,
c
);
c
ontinue
;
c
=
nextChar
()
;
}
}
else
if
(
c
==
'\n'
)
{
fileUngetc
(
c
);
fileUngetc
(
c
);
}
vStringTerminate
(
name
);
}
vStringStripTrailing
(
name
);
else
if
(
c
==
'='
)
{
newMacro
(
name
);
newMacro
(
name
);
in_rule
=
FALSE
;
skipLine
();
}
else
{
fileUngetc
(
c
);
}
}
else
if
(
!
strcmp
(
vStringValue
(
name
),
"export"
))
stringListClear
(
identifiers
);
}
}
}
}
else
else
variable_possible
=
FALSE
;
variable_possible
=
FALSE
;
}
}
vStringDelete
(
name
);
stringListDelete
(
identifiers
);
}
}
extern
parserDefinition
*
MakefileParser
(
void
)
extern
parserDefinition
*
MakefileParser
(
void
)
...
...
tests/ctags/Makefile.am
Dosyayı görüntüle @
2d31d8f8
...
@@ -200,6 +200,7 @@ test_sources = \
...
@@ -200,6 +200,7 @@ test_sources = \
line_directives.c
\
line_directives.c
\
local.c
\
local.c
\
macros.c
\
macros.c
\
make-multi-target.mak
\
make-target-with-parentheses.mak
\
make-target-with-parentheses.mak
\
make-variable-on-cmdline.mak
\
make-variable-on-cmdline.mak
\
masm.asm
\
masm.asm
\
...
...
tests/ctags/make-multi-target.mak
0 → 100644
Dosyayı görüntüle @
2d31d8f8
all: foo bar
foo bar: baz
echo $@
baz:
echo $@
tests/ctags/make-multi-target.mak.tags
0 → 100644
Dosyayı görüntüle @
2d31d8f8
# format=tagmanager
all160
bar160
baz160
foo160
tests/ctags/simple.mak.tags
Dosyayı görüntüle @
2d31d8f8
...
@@ -8,7 +8,7 @@ E
...
@@ -8,7 +8,7 @@ E
F655360
F655360
G655360
G655360
H655360
H655360
I655360
a.o160
a.o160
b.o160
b.o160
default160
default160
export I655360
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment