Commit 7035aa50 authored by Alexandre Julliard's avatar Alexandre Julliard

make_makefiles: Generate the top-level .gitignore file.

Add a PROGRAMS variable in some makefiles to make things easier.
parent ee99b6d7
......@@ -5,8 +5,6 @@
*.cur
*.ico
*.mc.rc
*.orig
*.rej
*.res
*.so
*.tab.[ch]
......@@ -14,12 +12,52 @@
*.yy.c
*_[cips].c
*~
/Make.rules
/TAGS
/autom4te.cache
/config.cache
/config.log
/config.status
/tags
/wine
Makefile
# Everything below this line is generated by make_makefiles
/Make.rules
/wine
dlls/Makedll.rules
dlls/Makeimplib.rules
dlls/Maketest.rules
loader/wine
loader/wine-glibc
loader/wine-kthread
loader/wine-preloader
loader/wine-pthread
loader/wine.man
programs/Makeprog.rules
programs/wineapploader
programs/winedbg/winedbg.man
programs/winelauncher
server/wineserver
server/wineserver.man
tools/bin2res
tools/fnt2bdf
tools/fnt2fon
tools/make_ctests
tools/makedep
tools/relpath
tools/sfnt2fnt
tools/widl/widl
tools/widl/widl.man
tools/winebuild/winebuild
tools/winebuild/winebuild.man
tools/winedump/winedump
tools/winedump/winedump.man
tools/winegcc/winecpp
tools/winegcc/wineg++
tools/winegcc/winegcc
tools/winegcc/winegcc.man
tools/winemaker.man
tools/wineprefixcreate
tools/wineprefixcreate.man
tools/wmc/wmc
tools/wmc/wmc.man
tools/wrc/wrc
tools/wrc/wrc.man
......@@ -25,6 +25,7 @@ SRCDIR = @srcdir@
VPATH = @srcdir@
LIBEXT = @LIBEXT@
MODULE = none
PROGRAMS = wine
FONTSSUBDIRS = @FONTSSUBDIRS@
......@@ -58,7 +59,7 @@ INSTALLSUBDIRS = $(INSTALLDEVSUBDIRS) $(INSTALLLIBSUBDIRS)
# Sub-directories to run make test into
TESTSUBDIRS = dlls
all: Make.rules wine
all: Make.rules $(PROGRAMS)
@echo "Wine build complete."
WINAPI_CHECK_EXTRA_FLAGS = --global
......@@ -139,9 +140,6 @@ tags ctags:
manpages htmlpages sgmlpages: dummy
@cd documentation && $(MAKE) $@
clean::
$(RM) wine
distclean:: clean
$(RM) config.* configure.lineno TAGS tags include/config.h include/stamp-h
$(RM) -r autom4te.cache
......
# Automatically generated by make_makefiles; DO NOT EDIT!!
*/tests/*.ok
*/tests/testlist.c
/Makedll.rules
/Makeimplib.rules
/Maketest.rules
/avifile.dll16
/comm.drv16
/commdlg.dll16
......
/version-stamp
/version.c
/wine
/wine-glibc
/wine-kthread
/wine-preloader
/wine-pthread
/wine.man
......@@ -18,6 +18,13 @@ MAIN_BINARY = @MAIN_BINARY@
EXTRA_BINARIES = @EXTRA_BINARIES@
WINE_BINARIES = $(MAIN_BINARY) $(EXTRA_BINARIES)
PROGRAMS = \
wine \
wine-glibc \
wine-kthread \
wine-preloader \
wine-pthread\
MANPAGES = wine.man
INSTALLDIRS = $(DESTDIR)$(bindir) $(DESTDIR)$(mandir)/man$(prog_manext)
......@@ -58,7 +65,7 @@ uninstall::
$(RM) $(DESTDIR)$(mandir)/man$(prog_manext)/wine.$(prog_manext)
clean::
$(RM) $(WINE_BINARIES) $(MODULE) version.c version-stamp
$(RM) version.c version-stamp
version-stamp: dummy
(GIT_DIR=$(TOPSRCDIR)/.git git-describe 2>/dev/null || echo "wine-@PACKAGE_VERSION@") | sed -e 's/\(.*\)/const char wine_version[] = "\1";/' >$@ || ($(RM) $@ && exit 1)
......
# Automatically generated by make_makefiles; DO NOT EDIT!!
/Makeprog.rules
/wineapploader
/winelauncher
clock/clock
cmd/cmd
cmdlgtst/cmdlgtst
......
......@@ -99,9 +99,11 @@ INSTALLPROGS = \
INSTALLDIRS = $(DESTDIR)$(bindir)
PROGRAMS = wineapploader winelauncher
@MAKE_RULES@
all: wineapploader winelauncher $(SUBDIRS)
all: $(PROGRAMS) $(SUBDIRS)
wineapploader: wineapploader.in
sed -e 's,@bindir\@,$(bindir),g' $(SRCDIR)/wineapploader.in >$@ || ($(RM) $@ && false)
......@@ -131,9 +133,6 @@ uninstall::
-cd $(DESTDIR)$(bindir) && $(RM) wineapploader winelauncher $(INSTALLPROGS)
-rmdir $(DESTDIR)$(dlldir)
clean::
$(RM) wineapploader winelauncher
# Rules for testing
check test:: $(SUBDIRS:%=%/__test__)
/wineserver
/wineserver.man
/bin2res
/fnt2bdf
/fnt2fon
/make_ctests
/makedep
/relpath
/sfnt2fnt
/winemaker.man
/wineprefixcreate
/wineprefixcreate.man
......@@ -77,12 +77,16 @@ sub update_file($)
if (!$ret)
{
unlink "$file.new";
#print "$file is unchanged\n";
}
else
{
rename "$file.new", "$file";
print "$file updated\n";
if ($file eq "configure.ac")
{
system "autoconf";
print "configure updated\n";
}
}
return $ret;
}
......@@ -129,6 +133,8 @@ sub parse_makefile($)
my $file = shift;
my %make;
($make{"=dir"} = $file) =~ s/[^\/]+$//;
open MAKE, "$file.in" or die "cannot open $file.in\n";
while (<MAKE>)
......@@ -147,7 +153,7 @@ sub parse_makefile($)
$make{$1} = $2;
next;
}
if (/^(IDL_H_SRCS|IMPLIB_SRCS|SPEC_SRCS16)\s*=\s*(.*)/)
if (/^(IDL_H_SRCS|IMPLIB_SRCS|SPEC_SRCS16|MANPAGES|PROGRAMS)\s*=\s*(.*)/)
{
my @list = split(/\s+/, $2);
$make{$1} = \@list;
......@@ -275,9 +281,6 @@ sub update_dlls(@)
my @ignores =
(
"/Makedll.rules",
"/Makeimplib.rules",
"/Maketest.rules",
"*/tests/testlist.c",
"*/tests/*.ok",
);
......@@ -526,7 +529,6 @@ sub update_dlls(@)
}
################################################################
# update programs/Makefile.in and programs/.gitignore
......@@ -534,12 +536,7 @@ sub update_progs(@)
{
my (@subdirs, @install_subdirs, @install_progs);
my @ignores =
(
"/Makeprog.rules",
"/wineapploader",
"/winelauncher",
);
my @ignores = ();
foreach my $make (@_)
{
......@@ -568,5 +565,41 @@ sub update_progs(@)
join("\n", sort @ignores), "\n" );
}
################################################################
# update the main .gitignore
sub update_gitignore()
{
my @ignores = ();
push @ignores, values %makerules;
foreach my $make (@makefiles)
{
my %makefile = %{$makefiles{$make}};
my $dir = $makefile{"=dir"};
if (defined $makefile{"MANPAGES"})
{
push @ignores, map { $dir . $_; } @{$makefile{"MANPAGES"}};
}
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;
replace_in_file( ".gitignore",
'^# Everything below this line is generated by make_makefiles',
undef,
"# Everything below this line is generated by make_makefiles\n",
join("\n", sort @ignores), "\n" );
}
update_dlls( sort grep /^dlls\//, @makefiles );
update_progs( sort grep /^programs\/.*\/Makefile$/, @makefiles );
update_gitignore();
/winebuild
/winebuild.man
/winecpp
/wineg++
/winegcc
/winegcc.man
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment