mirror of
https://gitlab.winehq.org/wine/wine.git
synced 2024-11-19 17:06:04 -07:00
makefiles: Generate the top-level .gitignore from configure.
This commit is contained in:
parent
3bcad54fc6
commit
e3fc518e8e
6 changed files with 662 additions and 644 deletions
53
.gitignore
vendored
53
.gitignore
vendored
|
@ -1,53 +0,0 @@
|
|||
# Automatically generated by make_makefiles; DO NOT EDIT!!
|
||||
*.a
|
||||
*.exe
|
||||
*.fake
|
||||
*.so
|
||||
/Make.rules
|
||||
/TAGS
|
||||
/autom4te.cache
|
||||
/config.cache
|
||||
/config.log
|
||||
/config.status
|
||||
/configure.lineno
|
||||
/tags
|
||||
/wine
|
||||
/wine64
|
||||
Makefile
|
||||
dlls/*/*.def
|
||||
dlls/libd3dcompiler.def
|
||||
dlls/libd3dx9.def
|
||||
dlls/libhtmlhelp.def
|
||||
dlls/libkernel.def
|
||||
dlls/libwinspool.def
|
||||
dlls/libxinput.def
|
||||
fonts/*.fon
|
||||
include/config.h
|
||||
include/stamp-h
|
||||
libs/wine/libwine*.dylib
|
||||
libs/wine/libwine.so.*
|
||||
libs/wine/version.c
|
||||
loader/wine
|
||||
loader/wine-installed
|
||||
loader/wine-preloader
|
||||
loader/wine64
|
||||
loader/wine64-preloader
|
||||
po/*.mo
|
||||
programs/winetest/build.nfo
|
||||
programs/winetest/build.rc
|
||||
server/wineserver
|
||||
server/wineserver-installed
|
||||
tools/fnt2fon
|
||||
tools/make_ctests
|
||||
tools/make_xftmpl
|
||||
tools/makedep
|
||||
tools/sfnt2fnt
|
||||
tools/widl/widl
|
||||
tools/wineapploader
|
||||
tools/winebuild/winebuild
|
||||
tools/winedump/winedump
|
||||
tools/winegcc/winecpp
|
||||
tools/winegcc/wineg++
|
||||
tools/winegcc/winegcc
|
||||
tools/wmc/wmc
|
||||
tools/wrc/wrc
|
|
@ -43,7 +43,7 @@ include/stamp-h: $(srcdir)/include/config.h.in config.status
|
|||
|
||||
clean:: __clean__
|
||||
distclean:: clean
|
||||
$(RM) config.* configure.lineno TAGS tags include/config.h include/stamp-h Makefile Make.tmp
|
||||
$(RM) config.* configure.lineno TAGS tags include/config.h include/stamp-h Makefile Make.tmp .gitignore
|
||||
$(RM) -r autom4te.cache
|
||||
|
||||
# Rules for installing
|
||||
|
|
33
aclocal.m4
vendored
33
aclocal.m4
vendored
|
@ -196,6 +196,7 @@ AC_DEFUN([WINE_CONFIG_HELPERS],
|
|||
[wine_rules_file=conf$$rules.make
|
||||
rm -f $wine_rules_file
|
||||
ALL_POT_FILES=""
|
||||
GITIGNORE="# Automatically generated by configure; DO NOT EDIT!!"
|
||||
AC_SUBST(ALL_TEST_RESOURCES,"")
|
||||
|
||||
wine_fn_append_file ()
|
||||
|
@ -203,6 +204,15 @@ wine_fn_append_file ()
|
|||
AS_VAR_APPEND($[1]," \\$as_nl $[2]")
|
||||
}
|
||||
|
||||
wine_fn_ignore_file ()
|
||||
{
|
||||
case "$[1]" in
|
||||
*/*) AS_VAR_APPEND([GITIGNORE],"$as_nl$[1]") ;;
|
||||
\**) AS_VAR_APPEND([GITIGNORE],"$as_nl$[1]") ;;
|
||||
*) AS_VAR_APPEND([GITIGNORE],"$as_nl/$[1]") ;;
|
||||
esac
|
||||
}
|
||||
|
||||
wine_fn_append_rule ()
|
||||
{
|
||||
AS_ECHO("$[1]") >>$wine_rules_file
|
||||
|
@ -500,6 +510,7 @@ dlls/lib$ac_implib.$IMPLIBEXT: $ac_file.$IMPLIBEXT
|
|||
\$(RM) \$[@] && \$(LN_S) $ac_name/lib$ac_implib.$IMPLIBEXT \$[@]
|
||||
clean::
|
||||
\$(RM) dlls/lib$ac_implib.$IMPLIBEXT"
|
||||
wine_fn_ignore_file "dlls/lib$ac_implib.$IMPLIBEXT"
|
||||
if test -n "$CROSSTARGET"
|
||||
then
|
||||
wine_fn_append_rule \
|
||||
|
@ -508,6 +519,7 @@ dlls/lib$ac_implib.cross.a: $ac_file.cross.a
|
|||
\$(RM) \$[@] && \$(LN_S) $ac_name/lib$ac_implib.cross.a \$[@]
|
||||
clean::
|
||||
\$(RM) dlls/lib$ac_implib.cross.a"
|
||||
wine_fn_ignore_file "dlls/lib$ac_implib.cross.a"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
@ -632,6 +644,9 @@ wine_fn_config_tool ()
|
|||
case $ac_dir in
|
||||
tools/winebuild) wine_fn_append_rule "\$(WINEBUILD): $ac_dir" ;;
|
||||
esac
|
||||
case $ac_dir in
|
||||
tools/*) wine_fn_ignore_file $ac_dir/`expr $ac_dir : tools/"\\(.*\\)"`$ac_exeext ;;
|
||||
esac
|
||||
}
|
||||
|
||||
wine_fn_config_makerules ()
|
||||
|
@ -643,6 +658,7 @@ wine_fn_config_makerules ()
|
|||
@./config.status $ac_rules
|
||||
distclean::
|
||||
\$(RM) $ac_rules"
|
||||
wine_fn_ignore_file $ac_rules
|
||||
}
|
||||
|
||||
wine_fn_config_symlink ()
|
||||
|
@ -659,16 +675,10 @@ wine_fn_config_symlink ()
|
|||
@./config.status \$[@]
|
||||
distclean::
|
||||
\$(RM) $ac_links"
|
||||
for f in $ac_links; do wine_fn_ignore_file $f; done
|
||||
test -n "$ac_linkdir" || return
|
||||
wine_fn_append_rule "$ac_linkdir/Makefile $ac_linkdir/depend: $ac_links"
|
||||
}
|
||||
|
||||
if test -z "$CROSSTARGET"
|
||||
then
|
||||
wine_fn_append_rule \
|
||||
"crosstest:
|
||||
@echo \"crosstest is not supported (mingw not installed?)\" && false"
|
||||
fi])
|
||||
}])
|
||||
|
||||
dnl **** Define helper function to append a file to a makefile file list ****
|
||||
dnl
|
||||
|
@ -765,6 +775,13 @@ m4_append_uniq([_AC_USER_OPTS],[enable_tools],[
|
|||
])dnl
|
||||
wine_fn_config_tool [$1] [$2]])
|
||||
|
||||
dnl **** Append a file to the .gitignore list ****
|
||||
dnl
|
||||
dnl Usage: WINE_IGNORE_FILE(file,enable)
|
||||
dnl
|
||||
AC_DEFUN([WINE_IGNORE_FILE],[AC_REQUIRE([WINE_CONFIG_HELPERS])dnl
|
||||
m4_ifval([$2],[test "x$[$2]" = xno || ])wine_fn_ignore_file $1])
|
||||
|
||||
dnl **** Add a message to the list displayed at the end ****
|
||||
dnl
|
||||
dnl Usage: WINE_NOTICE(notice)
|
||||
|
|
66
configure.ac
66
configure.ac
|
@ -682,6 +682,11 @@ WINE_PATH_SONAME_TOOLS
|
|||
wine_binary="wine"
|
||||
test "x$enable_win64" != "xyes" || wine_binary="wine64"
|
||||
|
||||
WINE_IGNORE_FILE("loader/wine")
|
||||
test "$wine_binary" = wine || WINE_IGNORE_FILE("loader/$wine_binary")
|
||||
WINE_IGNORE_FILE("loader/wine-installed")
|
||||
WINE_IGNORE_FILE("libs/wine/version.c")
|
||||
|
||||
AC_SUBST(LOADER_RULES,["
|
||||
all: $wine_binary wine-installed
|
||||
|
||||
|
@ -719,6 +724,8 @@ case $host_os in
|
|||
AC_SUBST(SOCKETLIBS,"-L\$(top_builddir)/dlls/ws2_32 -lws2_32") ;;
|
||||
esac
|
||||
|
||||
WINE_IGNORE_FILE("libs/wine/libwine.dll")
|
||||
WINE_IGNORE_FILE("libs/wine/libwine.a")
|
||||
AC_SUBST(LIBWINE_RULES,["
|
||||
all: libwine.dll libwine.a
|
||||
|
||||
|
@ -846,6 +853,7 @@ clean::
|
|||
AC_MSG_RESULT([[cross-compiling, assuming yes]]))
|
||||
fi
|
||||
|
||||
WINE_IGNORE_FILE("libs/wine/libwine*.dylib")
|
||||
AC_SUBST(LIBWINE_RULES,["
|
||||
all: libwine.dylib
|
||||
|
||||
|
@ -905,6 +913,7 @@ wine-installed: main.o wine_info.plist
|
|||
;;
|
||||
esac
|
||||
|
||||
WINE_IGNORE_FILE("libs/wine/libwine.so")
|
||||
AC_SUBST(LIBWINE_RULES,["
|
||||
all: libwine.so
|
||||
|
||||
|
@ -987,6 +996,7 @@ wine-installed: main.o
|
|||
LDSHARED="\$(CC) -Wl,-G,-h,libwine.so.\$(SOVERSION)"
|
||||
fi
|
||||
fi
|
||||
WINE_IGNORE_FILE("libs/wine/libwine.so*")
|
||||
AC_SUBST(LIBWINE_RULES,["
|
||||
all: libwine.so
|
||||
|
||||
|
@ -1987,6 +1997,8 @@ case $host_os in
|
|||
linux*)
|
||||
case $host_cpu in
|
||||
*i[[3456789]]86*|x86_64*)
|
||||
WINE_IGNORE_FILE("loader/wine-preloader")
|
||||
test "$wine_binary" = wine || WINE_IGNORE_FILE("loader/$wine_binary-preloader")
|
||||
AS_VAR_APPEND([LOADER_RULES],["
|
||||
all: $wine_binary-preloader
|
||||
|
||||
|
@ -2667,6 +2679,15 @@ all: Makefile
|
|||
Makefile: $srcdir/Makefile.in $srcdir/Make.vars.in config.status
|
||||
@./config.status Make.tmp Makefile])
|
||||
|
||||
test "$srcdir" = . && WINE_APPEND_RULE(
|
||||
[all: .gitignore
|
||||
.gitignore: config.status
|
||||
@./config.status .gitignore])
|
||||
|
||||
test -n "$CROSSTARGET" || WINE_APPEND_RULE(
|
||||
[crosstest:
|
||||
@echo \"crosstest is not supported (mingw not installed?)\" && false])
|
||||
|
||||
WINE_CONFIG_SYMLINK(fonts,fonts,[marlett.ttf,symbol.ttf,tahoma.ttf,tahomabd.ttf],enable_fonts)
|
||||
WINE_CONFIG_SYMLINK(loader,loader,[l_intl.nls])
|
||||
WINE_CONFIG_SYMLINK(po,po,[LINGUAS])
|
||||
|
@ -3442,6 +3463,38 @@ zh_TW"])
|
|||
|
||||
dnl End of auto-generated output commands
|
||||
|
||||
dnl Main ignore file
|
||||
|
||||
WINE_IGNORE_FILE("*.a")
|
||||
WINE_IGNORE_FILE("*.exe")
|
||||
test -n "$DLLEXT" && WINE_IGNORE_FILE("*$DLLEXT")
|
||||
test -n "$DLLEXT" && WINE_IGNORE_FILE("*.fake")
|
||||
WINE_IGNORE_FILE(".gitignore")
|
||||
WINE_IGNORE_FILE("Makefile")
|
||||
WINE_IGNORE_FILE("TAGS")
|
||||
WINE_IGNORE_FILE("tags")
|
||||
WINE_IGNORE_FILE("autom4te.cache")
|
||||
WINE_IGNORE_FILE("config.cache")
|
||||
WINE_IGNORE_FILE("config.log")
|
||||
WINE_IGNORE_FILE("config.status")
|
||||
WINE_IGNORE_FILE("configure.lineno")
|
||||
WINE_IGNORE_FILE("include/config.h")
|
||||
WINE_IGNORE_FILE("include/stamp-h")
|
||||
WINE_IGNORE_FILE("dlls/*/*.def")
|
||||
WINE_IGNORE_FILE("fonts/*.fon",enable_fonts)
|
||||
WINE_IGNORE_FILE("programs/winetest/build.nfo",enable_winetest)
|
||||
WINE_IGNORE_FILE("programs/winetest/build.rc",enable_winetest)
|
||||
WINE_IGNORE_FILE("server/wineserver",enable_server)
|
||||
WINE_IGNORE_FILE("server/wineserver-installed",enable_server)
|
||||
WINE_IGNORE_FILE("tools/fnt2fon$ac_exeext",enable_tools)
|
||||
WINE_IGNORE_FILE("tools/make_ctests$ac_exeext",enable_tools)
|
||||
WINE_IGNORE_FILE("tools/make_xftmpl$ac_exeext",enable_tools)
|
||||
WINE_IGNORE_FILE("tools/makedep$ac_exeext",enable_tools)
|
||||
WINE_IGNORE_FILE("tools/sfnt2fnt$ac_exeext",enable_tools)
|
||||
WINE_IGNORE_FILE("tools/wineapploader$ac_exeext",enable_tools)
|
||||
WINE_IGNORE_FILE("tools/winegcc/winecpp$ac_exeext",enable_tools)
|
||||
WINE_IGNORE_FILE("tools/winegcc/wineg++$ac_exeext",enable_tools)
|
||||
|
||||
AC_CONFIG_COMMANDS([Makefile], [wine_fn_output_makefile Makefile],
|
||||
[wine_fn_output_makefile ()
|
||||
{
|
||||
|
@ -3489,6 +3542,7 @@ clean::
|
|||
test "$srcdir" = . || posrc="$srcdir/po"
|
||||
for i in $LINGUAS
|
||||
do
|
||||
WINE_IGNORE_FILE("po/$i.mo")
|
||||
WINE_APPEND_RULE(
|
||||
[po/$i.mo: $posrc/$i.po
|
||||
\$(MSGFMT) -o \$@ $posrc/$i.po])
|
||||
|
@ -3536,6 +3590,18 @@ uninstall::
|
|||
"])
|
||||
fi
|
||||
|
||||
if test "$srcdir" = .
|
||||
then
|
||||
AC_CONFIG_COMMANDS([.gitignore], [wine_fn_output_gitignore .gitignore],
|
||||
[wine_fn_output_gitignore ()
|
||||
{
|
||||
sort <<\_WINE_EOF >\$tmp/gitignore && mv -f \$tmp/gitignore \$[]1 && return
|
||||
$GITIGNORE
|
||||
_WINE_EOF
|
||||
AS_ERROR([could not create .gitignore])
|
||||
}])
|
||||
fi
|
||||
|
||||
AS_ECHO(" done") >&AS_MESSAGE_FD
|
||||
AC_OUTPUT
|
||||
|
||||
|
|
|
@ -66,35 +66,6 @@ my %modules16 =
|
|||
"wow32.dll" => 1,
|
||||
);
|
||||
|
||||
# Default patterns for top-level .gitignore
|
||||
my @ignores = (
|
||||
"*.a",
|
||||
"*.exe",
|
||||
"*.fake",
|
||||
"*.so",
|
||||
"/autom4te.cache",
|
||||
"/config.cache",
|
||||
"/config.log",
|
||||
"/config.status",
|
||||
"/configure.lineno",
|
||||
"/TAGS",
|
||||
"/tags",
|
||||
"/wine",
|
||||
"/wine64",
|
||||
"Makefile",
|
||||
"dlls/*/*.def",
|
||||
"fonts/*.fon",
|
||||
"include/config.h",
|
||||
"include/stamp-h",
|
||||
"libs/wine/libwine*.dylib",
|
||||
"libs/wine/libwine.so.*",
|
||||
"libs/wine/version.c",
|
||||
"po/*.mo",
|
||||
"programs/winetest/build.nfo",
|
||||
"programs/winetest/build.rc",
|
||||
"tools/makedep",
|
||||
);
|
||||
|
||||
my %exported_wine_headers = (
|
||||
"wine/debug.h" => 1,
|
||||
"wine/exception.h" => 1,
|
||||
|
@ -616,63 +587,6 @@ sub update_makefiles(@)
|
|||
}
|
||||
|
||||
|
||||
################################################################
|
||||
# process ignore targets for generic source files
|
||||
|
||||
sub update_ignores(@)
|
||||
{
|
||||
my @ignores;
|
||||
|
||||
foreach my $file (sort @_)
|
||||
{
|
||||
my %makefile = %{$makefiles{$file}};
|
||||
|
||||
if (defined $makefile{"IMPORTLIB"})
|
||||
{
|
||||
if ($makefile{"IMPORTLIB"} =~ /^([a-zA-Z0-9_.]+)/)
|
||||
{
|
||||
if ("dlls/$1/" ne $makefile{"=dir"}) { push @ignores, "dlls/lib$1.def"; }
|
||||
}
|
||||
else
|
||||
{
|
||||
die "invalid importlib name $makefile{IMPORTLIB} in $file";
|
||||
}
|
||||
}
|
||||
}
|
||||
return @ignores;
|
||||
}
|
||||
|
||||
|
||||
################################################################
|
||||
# update the main .gitignore
|
||||
|
||||
sub update_gitignore(@)
|
||||
{
|
||||
my @ignores = values %makerules;
|
||||
|
||||
foreach my $make (@makefiles)
|
||||
{
|
||||
my %makefile = %{$makefiles{$make}};
|
||||
my $dir = $makefile{"=dir"};
|
||||
if (defined $makefile{"PROGRAMS"})
|
||||
{
|
||||
push @ignores, map { s/\$\(EXEEXT\)//; $dir . $_; } @{$makefile{"PROGRAMS"}};
|
||||
}
|
||||
}
|
||||
|
||||
# prepend a slash to paths that don't have one
|
||||
@ignores = map { $_ =~ s/^([^\/]+)$/\/$1/; $_; } @ignores;
|
||||
|
||||
# get rid of duplicates
|
||||
my %ignores = ();
|
||||
foreach my $i (@ignores, @_) { $ignores{$i} = 1; }
|
||||
|
||||
replace_in_file( ".gitignore", undef, undef,
|
||||
"# Automatically generated by make_makefiles; DO NOT EDIT!!\n",
|
||||
join("\n", sort keys %ignores), "\n" );
|
||||
}
|
||||
|
||||
|
||||
################################################################
|
||||
# update the LINGUAS file
|
||||
|
||||
|
@ -697,5 +611,3 @@ foreach my $file (sort values %makerules, @makefiles)
|
|||
assign_sources_to_makefiles( @all_files );
|
||||
update_linguas( @linguas );
|
||||
update_makefiles( @makefiles );
|
||||
push @ignores, update_ignores( @makefiles );
|
||||
update_gitignore( @ignores );
|
||||
|
|
Loading…
Reference in a new issue