Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
1cccb559
Commit
1cccb559
authored
Feb 05, 2014
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
makedep: Generate rules for bitmap fonts based on pragmas in the .sfd file.
parent
00aeadc6
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
109 additions
and
240 deletions
+109
-240
Makefile.in
fonts/Makefile.in
+4
-212
courier.sfd
fonts/courier.sfd
+1
-0
fixedsys.sfd
fonts/fixedsys.sfd
+1
-0
fixedsys_jp.sfd
fonts/fixedsys_jp.sfd
+1
-0
ms_sans_serif.sfd
fonts/ms_sans_serif.sfd
+1
-0
small_fonts.sfd
fonts/small_fonts.sfd
+1
-0
small_fonts_jp.sfd
fonts/small_fonts_jp.sfd
+1
-0
system.sfd
fonts/system.sfd
+1
-0
makedep.c
tools/makedep.c
+98
-28
No files found.
fonts/Makefile.in
View file @
1cccb559
...
...
@@ -12,58 +12,6 @@ FONT_SRCS = \
tahomabd.sfd
\
wingding.sfd
BITMAP_FONTS
=
\
coue1255.fon
\
coue1256.fon
\
coue1257.fon
\
coure.fon
\
couree.fon
\
coureg.fon
\
courer.fon
\
couret.fon
\
cvgasys.fon
\
hvgasys.fon
\
jsmalle.fon
\
jvgafix.fon
\
jvgasys.fon
\
smalle.fon
\
smallee.fon
\
smalleg.fon
\
smaller.fon
\
smallet.fon
\
smae1255.fon
\
smae1256.fon
\
smae1257.fon
\
sserife.fon
\
sserifee.fon
\
sserifeg.fon
\
sserifer.fon
\
sserifet.fon
\
sseriff.fon
\
sseriffe.fon
\
sseriffg.fon
\
sseriffr.fon
\
sserifft.fon
\
ssee1255.fon
\
ssee1256.fon
\
ssee1257.fon
\
ssee874.fon
\
ssef1255.fon
\
ssef1256.fon
\
ssef1257.fon
\
ssef874.fon
\
svgasys.fon
\
vgafix.fon
\
vgasys.fon
\
vgasyse.fon
\
vgasysg.fon
\
vgasysr.fon
\
vgasyst.fon
\
vgas1255.fon
\
vgas1256.fon
\
vgas1257.fon
\
vgas874.fon
TRUETYPE_FONTS
=
\
marlett.ttf
\
symbol.ttf
\
...
...
@@ -71,168 +19,12 @@ TRUETYPE_FONTS = \
tahomabd.ttf
\
wingding.ttf
EXTRA_TARGETS
=
$(BITMAP_FONTS)
all
:
$(BITMAP_FONTS)
coure.fon
:
$(srcdir)/courier.ttf
$(SFNT2FNT)
-o
$@
-d
128
$(srcdir)
/courier.ttf 13,1252,8
couree.fon
:
$(srcdir)/courier.ttf
$(SFNT2FNT)
-o
$@
-d
128
$(srcdir)
/courier.ttf 13,1250,8
courer.fon
:
$(srcdir)/courier.ttf
$(SFNT2FNT)
-o
$@
-d
128
$(srcdir)
/courier.ttf 13,1251,8
coureg.fon
:
$(srcdir)/courier.ttf
$(SFNT2FNT)
-o
$@
-d
128
$(srcdir)
/courier.ttf 13,1253,8
couret.fon
:
$(srcdir)/courier.ttf
$(SFNT2FNT)
-o
$@
-d
128
$(srcdir)
/courier.ttf 13,1254,8
coue1255.fon
:
$(srcdir)/courier.ttf
$(SFNT2FNT)
-o
$@
-d
128
$(srcdir)
/courier.ttf 13,1255,8
coue1256.fon
:
$(srcdir)/courier.ttf
$(SFNT2FNT)
-o
$@
-d
128
$(srcdir)
/courier.ttf 13,1256,8
coue1257.fon
:
$(srcdir)/courier.ttf
$(SFNT2FNT)
-o
$@
-d
128
$(srcdir)
/courier.ttf 13,1257,8
vgafix.fon
:
$(srcdir)/fixedsys.ttf
$(SFNT2FNT)
-o
$@
-d
128
$(srcdir)
/fixedsys.ttf 15,1252,8
jvgafix.fon
:
$(srcdir)/fixedsys_jp.ttf
$(SFNT2FNT)
-o
$@
-d
160
$(srcdir)
/fixedsys_jp.ttf 18,932,8
sserife.fon
:
$(srcdir)/ms_sans_serif.ttf
$(SFNT2FNT)
-o
$@
-d
129
$(srcdir)
/ms_sans_serif.ttf 13,1252,5 16,1252,7 20,1252,8
sseriff.fon
:
$(srcdir)/ms_sans_serif.ttf
$(SFNT2FNT)
-o
$@
-r
120
-d
129
$(srcdir)
/ms_sans_serif.ttf 16,1252,7 20,1252,8
sserifee.fon
:
$(srcdir)/ms_sans_serif.ttf
$(SFNT2FNT)
-o
$@
-d
129
$(srcdir)
/ms_sans_serif.ttf 13,1250,5 16,1250,7
sseriffe.fon
:
$(srcdir)/ms_sans_serif.ttf
$(SFNT2FNT)
-o
$@
-r
120
-d
129
$(srcdir)
/ms_sans_serif.ttf 16,1250,7
sserifer.fon
:
$(srcdir)/ms_sans_serif.ttf
$(SFNT2FNT)
-o
$@
-d
129
$(srcdir)
/ms_sans_serif.ttf 13,1251,5 16,1251,7 20,1251,8
sseriffr.fon
:
$(srcdir)/ms_sans_serif.ttf
$(SFNT2FNT)
-o
$@
-r
120
-d
129
$(srcdir)
/ms_sans_serif.ttf 16,1251,7 20,1251,8
sserifeg.fon
:
$(srcdir)/ms_sans_serif.ttf
$(SFNT2FNT)
-o
$@
-d
129
$(srcdir)
/ms_sans_serif.ttf 13,1253,5 16,1253,7 20,1253,8
sseriffg.fon
:
$(srcdir)/ms_sans_serif.ttf
$(SFNT2FNT)
-o
$@
-r
120
-d
129
$(srcdir)
/ms_sans_serif.ttf 16,1253,7 20,1253,8
sserifet.fon
:
$(srcdir)/ms_sans_serif.ttf
$(SFNT2FNT)
-o
$@
-d
129
$(srcdir)
/ms_sans_serif.ttf 13,1254,5 16,1254,7 20,1254,8
sserifft.fon
:
$(srcdir)/ms_sans_serif.ttf
$(SFNT2FNT)
-o
$@
-r
120
-d
129
$(srcdir)
/ms_sans_serif.ttf 16,1254,7 20,1254,8
ssee1255.fon
:
$(srcdir)/ms_sans_serif.ttf
$(SFNT2FNT)
-o
$@
-d
129
$(srcdir)
/ms_sans_serif.ttf 13,1255,5 16,1255,7 20,1255,8
ssef1255.fon
:
$(srcdir)/ms_sans_serif.ttf
$(SFNT2FNT)
-o
$@
-r
120
-d
129
$(srcdir)
/ms_sans_serif.ttf 16,1255,7 20,1255,8
ssee1256.fon
:
$(srcdir)/ms_sans_serif.ttf
$(SFNT2FNT)
-o
$@
-d
129
$(srcdir)
/ms_sans_serif.ttf 13,1256,5 16,1256,7 20,1256,8
ssef1256.fon
:
$(srcdir)/ms_sans_serif.ttf
$(SFNT2FNT)
-o
$@
-r
120
-d
129
$(srcdir)
/ms_sans_serif.ttf 16,1256,7 20,1256,8
ssee1257.fon
:
$(srcdir)/ms_sans_serif.ttf
$(SFNT2FNT)
-o
$@
-d
129
$(srcdir)
/ms_sans_serif.ttf 13,1257,5 16,1257,7 20,1257,8
ssef1257.fon
:
$(srcdir)/ms_sans_serif.ttf
$(SFNT2FNT)
-o
$@
-r
120
-d
129
$(srcdir)
/ms_sans_serif.ttf 16,1257,7 20,1257,8
ssee874.fon
:
$(srcdir)/ms_sans_serif.ttf
$(SFNT2FNT)
-o
$@
-d
129
$(srcdir)
/ms_sans_serif.ttf 13,874,5 16,874,7 20,874,8
ssef874.fon
:
$(srcdir)/ms_sans_serif.ttf
$(SFNT2FNT)
-o
$@
-r
120
-d
129
$(srcdir)
/ms_sans_serif.ttf 16,874,7 20,874,8
smalle.fon
:
$(srcdir)/small_fonts.ttf
$(SFNT2FNT)
-o
$@
-d
128
$(srcdir)
/small_fonts.ttf 11,1252,5
smallee.fon
:
$(srcdir)/small_fonts.ttf
$(SFNT2FNT)
-o
$@
-d
128
$(srcdir)
/small_fonts.ttf 11,1250,5
smaller.fon
:
$(srcdir)/small_fonts.ttf
$(SFNT2FNT)
-o
$@
-d
128
$(srcdir)
/small_fonts.ttf 11,1251,5
smalleg.fon
:
$(srcdir)/small_fonts.ttf
$(SFNT2FNT)
-o
$@
-d
128
$(srcdir)
/small_fonts.ttf 11,1253,5
smallet.fon
:
$(srcdir)/small_fonts.ttf
$(SFNT2FNT)
-o
$@
-d
128
$(srcdir)
/small_fonts.ttf 11,1254,5
smae1255.fon
:
$(srcdir)/small_fonts.ttf
$(SFNT2FNT)
-o
$@
-d
128
$(srcdir)
/small_fonts.ttf 11,1255,5
smae1256.fon
:
$(srcdir)/small_fonts.ttf
$(SFNT2FNT)
-o
$@
-d
128
$(srcdir)
/small_fonts.ttf 11,1256,5
smae1257.fon
:
$(srcdir)/small_fonts.ttf
$(SFNT2FNT)
-o
$@
-d
128
$(srcdir)
/small_fonts.ttf 11,1257,5
jsmalle.fon
:
$(srcdir)/small_fonts_jp.ttf
$(SFNT2FNT)
-o
$@
-d
128
$(srcdir)
/small_fonts_jp.ttf 11,932,7
vgasys.fon
:
$(srcdir)/system.ttf
$(SFNT2FNT)
-o
$@
-d
128
$(srcdir)
/system.ttf 16,1252,7
vgasyse.fon
:
$(srcdir)/system.ttf
$(SFNT2FNT)
-o
$@
-d
128
$(srcdir)
/system.ttf 16,1250,7
vgasysr.fon
:
$(srcdir)/system.ttf
$(SFNT2FNT)
-o
$@
-d
128
$(srcdir)
/system.ttf 16,1251,7
vgasysg.fon
:
$(srcdir)/system.ttf
$(SFNT2FNT)
-o
$@
-d
128
$(srcdir)
/system.ttf 16,1253,7
vgasyst.fon
:
$(srcdir)/system.ttf
$(SFNT2FNT)
-o
$@
-d
128
$(srcdir)
/system.ttf 16,1254,7
vgas1255.fon
:
$(srcdir)/system.ttf
$(SFNT2FNT)
-o
$@
-d
128
$(srcdir)
/system.ttf 16,1255,7
vgas1256.fon
:
$(srcdir)/system.ttf
$(SFNT2FNT)
-o
$@
-d
128
$(srcdir)
/system.ttf 16,1256,7
vgas1257.fon
:
$(srcdir)/system.ttf
$(SFNT2FNT)
-o
$@
-d
128
$(srcdir)
/system.ttf 16,1257,7
vgas874.fon
:
$(srcdir)/system.ttf
$(SFNT2FNT)
-o
$@
-d
128
$(srcdir)
/system.ttf 16,874,7
jvgasys.fon
:
$(srcdir)/system.ttf
$(SFNT2FNT)
-o
$@
-d
128
$(srcdir)
/system.ttf 18,932,8
svgasys.fon
:
$(srcdir)/system.ttf
$(SFNT2FNT)
-o
$@
-d
128
$(srcdir)
/system.ttf 16,936,7 16,1252,7
hvgasys.fon
:
$(srcdir)/system.ttf
$(SFNT2FNT)
-o
$@
-d
128
$(srcdir)
/system.ttf 16,949,7
cvgasys.fon
:
$(srcdir)/system.ttf
$(SFNT2FNT)
-o
$@
-d
128
$(srcdir)
/system.ttf 16,950,7 16,1252,7
$(BITMAP_FONTS)
:
$(SFNT2FNT)
.PHONY
:
install install-lib uninstall
# Make sure that make_makefiles sees the generated rules
clean
::
install install-lib
::
$(BITMAP_FONTS)
for
i
in
$(BITMAP_FONTS)
;
do
$(INSTALL_DATA)
$$
i
$(DESTDIR)$(fontdir)
/
$$
i
||
exit
1
;
done
install install-lib
::
for
i
in
$(TRUETYPE_FONTS)
;
do
$(INSTALL_DATA)
$(srcdir)
/
$$
i
$(DESTDIR)$(fontdir)
/
$$
i
||
exit
1
;
done
uninstall
::
-
cd
$(DESTDIR)$(fontdir)
&&
$(RM)
$(
BITMAP_FONTS)
$(
TRUETYPE_FONTS)
-
cd
$(DESTDIR)$(fontdir)
&&
$(RM)
$(TRUETYPE_FONTS)
-
rmdir
$(DESTDIR)$(fontdir)
fonts/courier.sfd
View file @
1cccb559
...
...
@@ -4,6 +4,7 @@ FullName: Courier
FamilyName: Courier
Weight: Medium
Copyright: Copyright (C) 2004 Huw D M Davies, Dmitry Timoshkov
UComments: "#pragma makedep font coue1255.fon -d 128 13,1255,8+AAoA#pragma makedep font coue1256.fon -d 128 13,1256,8+AAoA#pragma makedep font coue1257.fon -d 128 13,1257,8+AAoA#pragma makedep font coure.fon -d 128 13,1252,8+AAoA#pragma makedep font couree.fon -d 128 13,1250,8+AAoA#pragma makedep font coureg.fon -d 128 13,1253,8+AAoA#pragma makedep font courer.fon -d 128 13,1251,8+AAoA#pragma makedep font couret.fon -d 128 13,1254,8"
Version: 001.000
ItalicAngle: 0
UnderlinePosition: -100
...
...
fonts/fixedsys.sfd
View file @
1cccb559
...
...
@@ -4,6 +4,7 @@ FullName: Fixedsys
FamilyName: Fixedsys
Weight: Medium
Copyright: Copyright (C) 2013 Huw D M Davies, Dmitry Timoshkov, et al.
UComments: "#pragma makedep font vgafix.fon -d 128 15,1252,8"
Version: 001.000
ItalicAngle: 0
UnderlinePosition: -100
...
...
fonts/fixedsys_jp.sfd
View file @
1cccb559
...
...
@@ -4,6 +4,7 @@ FullName: FixedSys
FamilyName: FixedSys
Weight: Medium
Copyright: Copyright (C) 2013 Huw D M Davies, Dmitry Timoshkov, et al.
UComments: "#pragma makedep font jvgafix.fon -d 160 18,932,8"
Version: 001.000
ItalicAngle: 0
UnderlinePosition: -1
...
...
fonts/ms_sans_serif.sfd
View file @
1cccb559
...
...
@@ -4,6 +4,7 @@ FullName: MS Sans Serif
FamilyName: MS Sans Serif
Weight: Medium
Copyright: Copyright (C) 2004 Huw D M Davies, Dmitry Timoshkov
UComments: "#pragma makedep font ssee1255.fon -d 129 13,1255,5 16,1255,7 20,1255,8+AAoA#pragma makedep font ssee1256.fon -d 129 13,1256,5 16,1256,7 20,1256,8+AAoA#pragma makedep font ssee1257.fon -d 129 13,1257,5 16,1257,7 20,1257,8+AAoA#pragma makedep font ssee874.fon -d 129 13,874,5 16,874,7 20,874,8+AAoA#pragma makedep font ssef1255.fon -d 129 -r 120 16,1255,7 20,1255,8+AAoA#pragma makedep font ssef1256.fon -d 129 -r 120 16,1256,7 20,1256,8+AAoA#pragma makedep font ssef1257.fon -d 129 -r 120 16,1257,7 20,1257,8+AAoA#pragma makedep font ssef874.fon -d 129 -r 120 16,874,7 20,874,8+AAoA#pragma makedep font sserife.fon -d 129 13,1252,5 16,1252,7 20,1252,8+AAoA#pragma makedep font sserifee.fon -d 129 13,1250,5 16,1250,7+AAoA#pragma makedep font sserifeg.fon -d 129 13,1253,5 16,1253,7 20,1253,8 +AAoA#pragma makedep font sserifer.fon -d 129 13,1251,5 16,1251,7 20,1251,8+AAoA#pragma makedep font sserifet.fon -d 129 13,1254,5 16,1254,7 20,1254,8+AAoA#pragma makedep font sseriff.fon -d 129 -r 120 16,1252,7 20,1252,8+AAoA#pragma makedep font sseriffe.fon -d 129 -r 120 16,1250,7+AAoA#pragma makedep font sseriffg.fon -d 129 -r 120 16,1253,7 20,1253,8 +AAoA#pragma makedep font sseriffr.fon -d 129 -r 120 16,1251,7 20,1251,8+AAoA#pragma makedep font sserifft.fon -d 129 -r 120 16,1254,7 20,1254,8"
Version: 001.000
ItalicAngle: 0
UnderlinePosition: -100
...
...
fonts/small_fonts.sfd
View file @
1cccb559
...
...
@@ -4,6 +4,7 @@ FullName: Small Fonts
FamilyName: Small Fonts
Weight: Medium
Copyright: Copyright (C) 2006 Huw D M Davies, Dmitry Timoshkov
UComments: "#pragma makedep font smae1255.fon -d 128 11,1255,5+AAoA#pragma makedep font smae1256.fon -d 128 11,1256,5+AAoA#pragma makedep font smae1257.fon -d 128 11,1257,5+AAoA#pragma makedep font smalle.fon -d 128 11,1252,5+AAoA#pragma makedep font smallee.fon -d 128 11,1250,5+AAoA#pragma makedep font smalleg.fon -d 128 11,1253,5+AAoA#pragma makedep font smaller.fon -d 128 11,1251,5+AAoA#pragma makedep font smallet.fon -d 128 11,1254,5"
Version: 001.000
ItalicAngle: 0
UnderlinePosition: -100
...
...
fonts/small_fonts_jp.sfd
View file @
1cccb559
...
...
@@ -4,6 +4,7 @@ FullName: Small Fonts
FamilyName: Small Fonts
Weight: Medium
Copyright: Copyright (C) 2006 Huw D M Davies, Dmitry Timoshkov, Aric Stewart
UComments: "#pragma makedep font jsmalle.fon -d 128 11,932,7"
Version: 001.000
ItalicAngle: 0
UnderlinePosition: -100
...
...
fonts/system.sfd
View file @
1cccb559
...
...
@@ -4,6 +4,7 @@ FullName: System
FamilyName: System
Weight: Bold
Copyright: Copyright (C) 2004 Huw D M Davies, Dmitry Timoshkov
UComments: "#pragma makedep font cvgasys.fon -d 128 16,950,7 16,1252,7+AAoA#pragma makedep font hvgasys.fon -d 128 16,949,7+AAoA#pragma makedep font jvgasys.fon -d 128 18,932,8+AAoA#pragma makedep font svgasys.fon -d 128 16,936,7 16,1252,7+AAoA#pragma makedep font vgas1255.fon -d 128 16,1255,7+AAoA#pragma makedep font vgas1256.fon -d 128 16,1256,7+AAoA#pragma makedep font vgas1257.fon -d 128 16,1257,7+AAoA#pragma makedep font vgas874.fon -d 128 16,874,7+AAoA#pragma makedep font vgasys.fon -d 128 16,1252,7+AAoA#pragma makedep font vgasyse.fon -d 128 16,1250,7+AAoA#pragma makedep font vgasysg.fon -d 128 16,1253,7+AAoA#pragma makedep font vgasysr.fon -d 128 16,1251,7+AAoA#pragma makedep font vgasyst.fon -d 128 16,1254,7"
Version: 001.000
ItalicAngle: 0
UnderlinePosition: -100
...
...
tools/makedep.c
View file @
1cccb559
...
...
@@ -41,6 +41,7 @@ struct incl_file
char
*
name
;
char
*
filename
;
char
*
sourcename
;
/* source file name for generated headers */
char
*
args
;
/* custom arguments for makefile rule */
struct
incl_file
*
included_by
;
/* file that included this one */
int
included_line
;
/* line where this file was included */
unsigned
int
flags
;
/* flags (see below) */
...
...
@@ -635,6 +636,26 @@ found:
/*******************************************************************
* add_generated_source
*
* Add a generated source file to the list.
*/
static
struct
incl_file
*
add_generated_source
(
const
char
*
name
,
const
char
*
filename
)
{
struct
incl_file
*
file
;
if
((
file
=
find_src_file
(
name
)))
return
file
;
/* we already have it */
file
=
xmalloc
(
sizeof
(
*
file
)
);
memset
(
file
,
0
,
sizeof
(
*
file
)
);
file
->
name
=
xstrdup
(
name
);
file
->
filename
=
xstrdup
(
filename
?
filename
:
name
);
file
->
flags
=
FLAG_GENERATED
;
list_add_tail
(
&
sources
,
&
file
->
entry
);
return
file
;
}
/*******************************************************************
* open_file
*/
static
FILE
*
open_file
(
const
char
*
path
)
...
...
@@ -869,6 +890,19 @@ static void parse_pragma_directive( struct incl_file *source, char *str )
{
if
(
!
strcmp
(
flag
,
"po"
))
source
->
flags
|=
FLAG_RC_PO
;
}
else
if
(
strendswith
(
source
->
name
,
".sfd"
))
{
if
(
!
strcmp
(
flag
,
"font"
))
{
struct
incl_file
*
file
;
char
*
obj
=
strtok
(
NULL
,
"
\t
"
);
if
(
!
strendswith
(
obj
,
".fon"
))
return
;
file
=
add_generated_source
(
obj
,
NULL
);
file
->
sourcename
=
replace_extension
(
source
->
name
,
".sfd"
,
".ttf"
);
file
->
args
=
xstrdup
(
strtok
(
NULL
,
""
));
return
;
}
}
else
if
(
!
strcmp
(
flag
,
"implib"
))
source
->
flags
|=
FLAG_C_IMPLIB
;
}
}
...
...
@@ -1045,7 +1079,45 @@ static void parse_in_file( struct incl_file *source, FILE *file )
if
(
!
(
p
=
strtok
(
buffer
,
"
\t
"
)))
continue
;
/* .TH */
if
(
!
(
p
=
strtok
(
NULL
,
"
\t
"
)))
continue
;
/* program name */
if
(
!
(
p
=
strtok
(
NULL
,
"
\t
"
)))
continue
;
/* man section */
source
->
sourcename
=
xstrdup
(
p
);
/* abuse source name to store section */
source
->
args
=
xstrdup
(
p
);
return
;
}
}
/*******************************************************************
* parse_sfd_file
*/
static
void
parse_sfd_file
(
struct
incl_file
*
source
,
FILE
*
file
)
{
char
*
p
,
*
eol
,
*
buffer
;
input_line
=
0
;
while
((
buffer
=
get_line
(
file
)))
{
if
(
strncmp
(
buffer
,
"UComments:"
,
10
))
continue
;
p
=
buffer
+
10
;
while
(
*
p
==
' '
)
p
++
;
if
(
p
[
0
]
==
'"'
&&
p
[
1
]
&&
buffer
[
strlen
(
buffer
)
-
1
]
==
'"'
)
{
p
++
;
buffer
[
strlen
(
buffer
)
-
1
]
=
0
;
}
while
((
eol
=
strstr
(
p
,
"+AAoA"
)))
{
*
eol
=
0
;
while
(
*
p
&&
isspace
(
*
p
))
p
++
;
if
(
*
p
++
==
'#'
)
{
while
(
*
p
&&
isspace
(
*
p
))
p
++
;
if
(
!
strncmp
(
p
,
"pragma"
,
6
))
parse_pragma_directive
(
source
,
p
+
6
);
}
p
=
eol
+
5
;
}
while
(
*
p
&&
isspace
(
*
p
))
p
++
;
if
(
*
p
++
!=
'#'
)
return
;
while
(
*
p
&&
isspace
(
*
p
))
p
++
;
if
(
!
strncmp
(
p
,
"pragma"
,
6
))
parse_pragma_directive
(
source
,
p
+
6
);
return
;
}
}
...
...
@@ -1083,6 +1155,8 @@ static void parse_file( struct incl_file *source, int src )
parse_rc_file
(
source
,
file
);
else
if
(
strendswith
(
source
->
filename
,
".in"
))
parse_in_file
(
source
,
file
);
else
if
(
strendswith
(
source
->
filename
,
".sfd"
))
parse_sfd_file
(
source
,
file
);
fclose
(
file
);
input_file_name
=
NULL
;
}
...
...
@@ -1252,26 +1326,6 @@ static void parse_makefile(void)
/*******************************************************************
* add_generated_source
*
* Add a generated source file to the list.
*/
static
struct
incl_file
*
add_generated_source
(
const
char
*
name
,
const
char
*
filename
)
{
struct
incl_file
*
file
;
if
((
file
=
find_src_file
(
name
)))
return
file
;
/* we already have it */
file
=
xmalloc
(
sizeof
(
*
file
)
);
memset
(
file
,
0
,
sizeof
(
*
file
)
);
file
->
name
=
xstrdup
(
name
);
file
->
filename
=
xstrdup
(
filename
?
filename
:
name
);
file
->
flags
=
FLAG_GENERATED
;
list_add_tail
(
&
sources
,
&
file
->
entry
);
return
file
;
}
/*******************************************************************
* add_generated_sources
*/
static
void
add_generated_sources
(
void
)
...
...
@@ -1550,26 +1604,26 @@ static struct strarray output_sources(void)
}
else
if
(
!
strcmp
(
ext
,
"in"
))
/* .in file or man page */
{
if
(
strendswith
(
obj
,
".man"
)
&&
source
->
sourcename
)
if
(
strendswith
(
obj
,
".man"
)
&&
source
->
args
)
{
char
*
dir
,
*
dest
=
replace_extension
(
obj
,
".man"
,
""
);
char
*
lang
=
strchr
(
dest
,
'.'
);
char
*
section
=
source
->
args
;
if
(
lang
)
{
*
lang
++
=
0
;
dir
=
strmake
(
"$(DESTDIR)$(mandir)/%s/man%s"
,
lang
,
s
ource
->
sourcename
);
dir
=
strmake
(
"$(DESTDIR)$(mandir)/%s/man%s"
,
lang
,
s
ection
);
}
else
dir
=
strmake
(
"$(DESTDIR)$(mandir)/man%s"
,
s
ource
->
sourcename
);
else
dir
=
strmake
(
"$(DESTDIR)$(mandir)/man%s"
,
s
ection
);
output
(
"install-man-pages:: %s
\n
"
,
obj
);
output
(
"
\t
$(INSTALL_DATA) %s %s/%s.%s
\n
"
,
obj
,
dir
,
dest
,
source
->
sourcename
);
output
(
"
\t
$(INSTALL_DATA) %s %s/%s.%s
\n
"
,
obj
,
dir
,
dest
,
section
);
output
(
"uninstall::
\n
"
);
output
(
"
\t
$(RM) %s/%s.%s
\n
"
,
dir
,
dest
,
source
->
sourcename
);
output
(
"
\t
$(RM) %s/%s.%s
\n
"
,
dir
,
dest
,
section
);
free
(
dest
);
free
(
dir
);
strarray_add
(
&
all_targets
,
xstrdup
(
obj
)
);
strarray_add_uniq
(
&
phony_targets
,
"install-man-pages"
);
strarray_add_uniq
(
&
phony_targets
,
"uninstall"
);
}
else
strarray_add
(
&
clean_files
,
xstrdup
(
obj
)
);
output
(
"%s: %s
\n
"
,
obj
,
source
->
filename
);
...
...
@@ -1588,6 +1642,22 @@ static struct strarray output_sources(void)
free
(
fontforge
);
continue
;
/* no dependencies */
}
else
if
(
!
strcmp
(
ext
,
"fon"
))
/* bitmap font file */
{
strarray_add
(
&
all_targets
,
source
->
name
);
output
(
"%s.fon: %s %s
\n
"
,
obj
,
tools_dir_path
(
"sfnt2fnt"
),
src_dir_path
(
source
->
sourcename
));
output
(
"
\t
%s -o $@ %s %s
\n
"
,
tools_dir_path
(
"sfnt2fnt"
),
src_dir_path
(
source
->
sourcename
),
source
->
args
);
output
(
"install install-lib:: %s
\n
"
,
source
->
name
);
output
(
"
\t
$(INSTALL_DATA) %s $(DESTDIR)$(fontdir)/%s
\n
"
,
source
->
name
,
source
->
name
);
output
(
"uninstall::
\n
"
);
output
(
"
\t
$(RM) $(DESTDIR)$(fontdir)/%s
\n
"
,
source
->
name
);
strarray_add_uniq
(
&
phony_targets
,
"install"
);
strarray_add_uniq
(
&
phony_targets
,
"install-lib"
);
strarray_add_uniq
(
&
phony_targets
,
"uninstall"
);
continue
;
/* no dependencies */
}
else
if
(
!
strcmp
(
ext
,
"svg"
))
/* svg file */
{
char
*
convert
=
get_expanded_make_variable
(
"CONVERT"
);
...
...
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