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
e2db7946
Commit
e2db7946
authored
Jun 12, 2011
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
makefiles: Add a more generic handling of makefile generation flags.
parent
59d76dd3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
85 additions
and
75 deletions
+85
-75
aclocal.m4
aclocal.m4
+12
-8
configure
configure
+0
-0
configure.ac
configure.ac
+47
-47
make_makefiles
tools/make_makefiles
+26
-20
No files found.
aclocal.m4
View file @
e2db7946
...
...
@@ -203,6 +203,7 @@ wine_fn_config_makefile ()
{
ac_dir=$[1]
ac_enable=$[2]
ac_flags=$[3]
AS_VAR_IF([$ac_enable],[no],[return 0])
wine_fn_all_dir_rules $ac_dir Make.rules
...
...
@@ -224,6 +225,7 @@ uninstall:: $ac_dir/Makefile
wine_fn_config_lib ()
{
ac_name=$[1]
ac_flags=$[2]
ac_dir=dlls/$ac_name
wine_fn_all_dir_rules $ac_dir dlls/Makeimplib.rules
wine_fn_append_rule ALL_MAKEFILE_DEPENDS \
...
...
@@ -390,6 +392,7 @@ wine_fn_config_test ()
{
ac_dir=$[1]
ac_name=$[2]
ac_flags=$[3]
wine_fn_append_file ALL_TEST_RESOURCES $ac_name.res
wine_fn_all_dir_rules $ac_dir Maketest.rules
...
...
@@ -419,6 +422,7 @@ $ac_dir/__crosstest__: $ac_dir/Makefile __builddeps__ dummy
wine_fn_config_tool ()
{
ac_dir=$[1]
ac_flags=$[2]
AS_VAR_IF([enable_tools],[no],[return 0])
wine_fn_all_dir_rules $ac_dir Make.rules
...
...
@@ -517,11 +521,11 @@ AC_CONFIG_FILES([$1])])
dnl **** Create a makefile from config.status ****
dnl
dnl Usage: WINE_CONFIG_MAKEFILE(file,enable)
dnl Usage: WINE_CONFIG_MAKEFILE(file,enable
,flags
)
dnl
AC_DEFUN([WINE_CONFIG_MAKEFILE],[AC_REQUIRE([WINE_CONFIG_HELPERS])dnl
AS_VAR_PUSHDEF([ac_enable],m4_default([$2],[enable_]$1))dnl
wine_fn_config_makefile [$1] ac_enable
[
]dnl
wine_fn_config_makefile [$1] ac_enable
[$3
]dnl
AS_VAR_POPDEF([ac_enable])])
dnl **** Create a dll makefile from config.status ****
...
...
@@ -544,28 +548,28 @@ AS_VAR_POPDEF([ac_enable])])
dnl **** Create a test makefile from config.status ****
dnl
dnl Usage: WINE_CONFIG_TEST(dir)
dnl Usage: WINE_CONFIG_TEST(dir
,flags
)
dnl
AC_DEFUN([WINE_CONFIG_TEST],[AC_REQUIRE([WINE_CONFIG_HELPERS])dnl
m4_pushdef([ac_suffix],m4_if(m4_substr([$1],0,9),[programs/],[.exe_test],[_test]))dnl
m4_pushdef([ac_name],[m4_bpatsubst([$1],[.*/\(.*\)/tests$],[\1])])dnl
wine_fn_config_test $1 ac_name[]ac_suffix
[
]dnl
wine_fn_config_test $1 ac_name[]ac_suffix
[$2
]dnl
m4_popdef([ac_suffix])dnl
m4_popdef([ac_name])])
dnl **** Create a static lib makefile from config.status ****
dnl
dnl Usage: WINE_CONFIG_LIB(name)
dnl Usage: WINE_CONFIG_LIB(name
,flags
)
dnl
AC_DEFUN([WINE_CONFIG_LIB],[AC_REQUIRE([WINE_CONFIG_HELPERS])dnl
wine_fn_config_lib
$1
])
wine_fn_config_lib
[$1] [$2]
])
dnl **** Create a tool makefile from config.status ****
dnl
dnl Usage: WINE_CONFIG_TOOL(name)
dnl Usage: WINE_CONFIG_TOOL(name
,flags
)
dnl
AC_DEFUN([WINE_CONFIG_TOOL],[AC_REQUIRE([WINE_CONFIG_HELPERS])dnl
wine_fn_config_tool
$1
])
wine_fn_config_tool
[$1] [$2]
])
dnl **** Add a message to the list displayed at the end ****
dnl
...
...
configure
View file @
e2db7946
This diff is collapsed.
Click to expand it.
configure.ac
View file @
e2db7946
This diff is collapsed.
Click to expand it.
tools/make_makefiles
View file @
e2db7946
...
...
@@ -312,13 +312,19 @@ sub parse_makefile($)
}
if
(
/^\s*(MODULE|IMPORTLIB|TESTDLL)\s*=\s*(.*)/
)
{
$make
{
$1
}
=
$2
;
my
$var
=
$1
;
$make
{
$var
}
=
$2
;
push
@
{
$make
{
"=flags"
}},
"implib"
if
$var
eq
"IMPORTLIB"
;
next
;
}
if
(
/^\s*(BISON_SRCS|LEX_SRCS|IDL_[CHIPRS]_SRCS|IDL_TLB_SRCS|IMPLIB_SRCS|C_SRCS|MC_SRCS|RC_SRCS|PO_SRCS|SVG_SRCS|PROGRAMS)\s*=\s*(.*)/
)
{
my
$var
=
$1
;
my
@list
=
split
(
/\s+/
,
$2
);
$make
{
$1
}
=
\
@list
;
$make
{
$var
}
=
\
@list
;
push
@
{
$make
{
"=flags"
}},
"mc"
if
$var
eq
"MC_SRCS"
;
push
@
{
$make
{
"=flags"
}},
"po"
if
$var
eq
"PO_SRCS"
;
push
@
{
$make
{
"=flags"
}},
"staticimplib"
if
$var
eq
"IMPLIB_SRCS"
;
next
;
}
if
(
/^\s*(TOPSRCDIR|TOPOBJDIR|SRCDIR|VPATH)\s*=\s*(.*)/
)
...
...
@@ -326,6 +332,13 @@ sub parse_makefile($)
die
"Variable $1 in $file.in is obsolete"
;
}
}
if
(
$file
=~
/^programs\/([^\/]+)\/Makefile/
)
{
push
@
{
$make
{
"=flags"
}},
"install"
unless
$dont_install
{
$1
};
push
@
{
$make
{
"=flags"
}},
"installbin"
if
$bin_install
{
$1
};
}
return
%
make
;
}
...
...
@@ -412,8 +425,8 @@ sub update_makefiles(@)
my
%
make
=
%
{
$makefiles
{
$file
}};
my
$rules
=
$make
{
"=rules"
};
my
$args
=
""
;
my
@flags
;
my
$is_win16
=
$make
{
"MODULE"
}
&&
(
$make
{
"MODULE"
}
=~
/16$/
||
$modules16
{
$make
{
"MODULE"
}});
my
$flag_args
=
defined
$make
{
"=flags"
}
?
",["
.
join
(
","
,
sort
@
{
$make
{
"=flags"
}})
.
"]"
:
""
;
if
(
$rules
eq
$makerules
{
"MAKE_DLL_RULES"
})
{
(
my
$name
=
$file
)
=~
s/^dlls\/(.*)\/Makefile/$1/
;
...
...
@@ -426,13 +439,9 @@ sub update_makefiles(@)
die
"Invalid MODULE in $file"
unless
$make
{
"MODULE"
}
eq
"$name.dll"
;
}
my
$implib
=
$make
{
"IMPORTLIB"
}
||
""
;
push
@flags
,
"mc"
if
defined
$make
{
"MC_SRCS"
};
push
@flags
,
"po"
if
defined
$make
{
"PO_SRCS"
};
push
@flags
,
"implib"
if
$implib
;
push
@flags
,
"staticimplib"
if
defined
(
$make
{
"IMPLIB_SRCS"
});
$args
.=
","
if
$is_win16
||
@flags
;
$args
.=
","
if
$is_win16
||
defined
$make
{
"=flags"
};
$args
.=
"enable_win16"
if
$is_win16
;
$args
.=
",["
.
join
(
","
,
@flags
)
.
"]"
if
@fla
gs
;
$args
.=
$flag_ar
gs
;
$args
.=
",[$implib]"
if
$implib
&&
$implib
ne
$name
;
push
@lines
,
"WINE_CONFIG_DLL($name$args)\n"
;
}
...
...
@@ -447,34 +456,31 @@ sub update_makefiles(@)
{
die
"Invalid MODULE in $file"
unless
$make
{
"MODULE"
}
eq
"$name.exe"
;
}
push
@flags
,
"mc"
if
defined
$make
{
"MC_SRCS"
};
push
@flags
,
"po"
if
defined
$make
{
"PO_SRCS"
};
push
@flags
,
"install"
unless
$dont_install
{
$name
};
push
@flags
,
"installbin"
if
$bin_install
{
$name
};
$args
.=
","
if
$is_win16
||
@flags
;
$args
.=
","
if
$is_win16
||
defined
$make
{
"=flags"
};
$args
.=
"enable_win16"
if
$is_win16
;
$args
.=
",["
.
join
(
","
,
@flags
)
.
"]"
if
@flags
;
push
@lines
,
"WINE_CONFIG_PROGRAM($name$args)\n"
;
push
@lines
,
"WINE_CONFIG_PROGRAM($name$args$flag_args)\n"
;
}
elsif
(
$rules
eq
$makerules
{
"MAKE_TEST_RULES"
})
{
(
my
$dir
=
$file
)
=~
s/^(.*)\/Makefile/$1/
;
push
@lines
,
"WINE_CONFIG_TEST($dir)\n"
;
push
@lines
,
"WINE_CONFIG_TEST($dir
$flag_args
)\n"
;
}
elsif
(
$rules
eq
$makerules
{
"MAKE_IMPLIB_RULES"
})
{
(
my
$name
=
$file
)
=~
s/^dlls\/(.*)\/Makefile/$1/
;
push
@lines
,
"WINE_CONFIG_LIB($name)\n"
;
push
@lines
,
"WINE_CONFIG_LIB($name
$flag_args
)\n"
;
}
elsif
(
$file
=~
/^tools.*\/Makefile$/
)
{
(
my
$name
=
$file
)
=~
s/^(.*)\/Makefile/$1/
;
push
@lines
,
"WINE_CONFIG_TOOL($name)\n"
;
push
@lines
,
"WINE_CONFIG_TOOL($name
$flag_args
)\n"
;
}
elsif
(
$file
=~
/\/Makefile$/
)
{
(
my
$name
=
$file
)
=~
s/^(.*)\/Makefile/$1/
;
push
@lines
,
"WINE_CONFIG_MAKEFILE([$name])\n"
;
$args
=
"[$name]"
;
$args
.=
","
if
defined
$make
{
"=flags"
};
push
@lines
,
"WINE_CONFIG_MAKEFILE($args$flag_args)\n"
;
}
}
...
...
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