Commit e2df0ab8 authored by Alexandre Julliard's avatar Alexandre Julliard

makefiles: Generate rules from makedep for building and installing man pages.

parent a343edf4
...@@ -32,14 +32,11 @@ ALLCROSSCFLAGS = $(INCLUDES) $(DEFS) -DWINE_CROSSTEST $(CPPFLAGS) $(CFLAGS) ...@@ -32,14 +32,11 @@ ALLCROSSCFLAGS = $(INCLUDES) $(DEFS) -DWINE_CROSSTEST $(CPPFLAGS) $(CFLAGS)
# Implicit rules # Implicit rules
.SUFFIXES: .man.in .man @MAINTAINER_MODE@ .sfd .ttf .svg .ico .bmp @MAINTAINER_MODE@.SUFFIXES: .sfd .ttf .svg .ico .bmp
.sfd.ttf: .sfd.ttf:
$(FONTFORGE) -script $(top_srcdir)/fonts/genttf.ff $< $@ $(FONTFORGE) -script $(top_srcdir)/fonts/genttf.ff $< $@
.man.in.man:
LC_ALL=C sed -e 's,@bindir\@,$(bindir),g' -e 's,@dlldir\@,$(dlldir),g' -e 's,@PACKAGE_STRING\@,@PACKAGE_STRING@,g' $< >$@ || ($(RM) $@ && false)
.svg.ico: .svg.ico:
CONVERT="$(CONVERT)" ICOTOOL="$(ICOTOOL)" RSVG="$(RSVG)" $(BUILDIMAGE) $< $@ CONVERT="$(CONVERT)" ICOTOOL="$(ICOTOOL)" RSVG="$(RSVG)" $(BUILDIMAGE) $< $@
...@@ -82,7 +79,7 @@ $(IMPORTLIB:%=lib%.cross.a): $(MAINSPEC) $(IMPLIB_SRCS:.c=.cross.o) ...@@ -82,7 +79,7 @@ $(IMPORTLIB:%=lib%.cross.a): $(MAINSPEC) $(IMPLIB_SRCS:.c=.cross.o)
DEPEND_SRCS = $(C_SRCS) $(OBJC_SRCS) $(RC_SRCS) $(MC_SRCS) \ DEPEND_SRCS = $(C_SRCS) $(OBJC_SRCS) $(RC_SRCS) $(MC_SRCS) \
$(IDL_H_SRCS) $(IDL_C_SRCS) $(IDL_I_SRCS) $(IDL_P_SRCS) $(IDL_S_SRCS) $(IDL_R_SRCS) $(IDL_TLB_SRCS) \ $(IDL_H_SRCS) $(IDL_C_SRCS) $(IDL_I_SRCS) $(IDL_P_SRCS) $(IDL_S_SRCS) $(IDL_R_SRCS) $(IDL_TLB_SRCS) \
$(BISON_SRCS) $(LEX_SRCS) $(EXTRA_OBJS) $(BISON_SRCS) $(LEX_SRCS) $(EXTRA_OBJS) $(MANPAGES)
depend: dummy depend: dummy
$(MAKEDEP) $(MAKEDEPFLAGS) -C$(srcdir) -S$(top_srcdir) -T$(top_builddir) $(PARENTSRC:%=-P%) $(EXTRAINCL) $(DEPEND_SRCS) $(MAKEDEP) $(MAKEDEPFLAGS) -C$(srcdir) -S$(top_srcdir) -T$(top_builddir) $(PARENTSRC:%=-P%) $(EXTRAINCL) $(DEPEND_SRCS)
...@@ -105,17 +102,9 @@ $(WINETEST_RES): $(TESTMODULE_STRIPPED) ...@@ -105,17 +102,9 @@ $(WINETEST_RES): $(TESTMODULE_STRIPPED)
# Rules for man pages # Rules for man pages
MANPAGES = $(MANPAGE) $(EXTRA_MANPAGES) all: $(MANPAGES:.man.in=.man)
all: $(MANPAGES)
install-man-pages:: $(MANPAGE) $(DESTDIR)$(mandir)/man$(prog_manext)
$(INSTALL_DATA) $(MANPAGE) $(DESTDIR)$(mandir)/man$(prog_manext)/$(MANPAGE:.man=).$(prog_manext)
uninstall-man-pages::
$(RM) $(DESTDIR)$(mandir)/man$(prog_manext)/$(MANPAGE:.man=).$(prog_manext)
.PHONY: install-man-pages uninstall-man-pages .PHONY: install-man-pages
# Rules for auto documentation # Rules for auto documentation
...@@ -134,7 +123,7 @@ xmlpages:: $(C_SRCS) dummy ...@@ -134,7 +123,7 @@ xmlpages:: $(C_SRCS) dummy
# Rules for cleaning # Rules for cleaning
clean:: clean::
$(RM) $(CLEAN_FILES) $(CLEAN_TARGETS) $(PROGRAMS) $(MANPAGES) $(RM) $(CLEAN_FILES) $(CLEAN_TARGETS) $(PROGRAMS)
.PHONY: clean .PHONY: clean
......
...@@ -70,6 +70,7 @@ LIBWINE = -L$(top_builddir)/libs/wine -lwine ...@@ -70,6 +70,7 @@ LIBWINE = -L$(top_builddir)/libs/wine -lwine
LIBWINE_STATIC = $(top_builddir)/libs/wine/libwine_static.a LIBWINE_STATIC = $(top_builddir)/libs/wine/libwine_static.a
WINEGCC = $(TOOLSDIR)/tools/winegcc/winegcc $(TARGETFLAGS) -B$(TOOLSDIR)/tools/winebuild --sysroot=$(top_builddir) @UNWINDFLAGS@ WINEGCC = $(TOOLSDIR)/tools/winegcc/winegcc $(TARGETFLAGS) -B$(TOOLSDIR)/tools/winebuild --sysroot=$(top_builddir) @UNWINDFLAGS@
CROSSWINEGCC = $(TOOLSDIR)/tools/winegcc/winegcc $(CROSSTARGET:%=-b %) -B$(TOOLSDIR)/tools/winebuild --sysroot=$(top_builddir) --lib-suffix=.cross.a CROSSWINEGCC = $(TOOLSDIR)/tools/winegcc/winegcc $(CROSSTARGET:%=-b %) -B$(TOOLSDIR)/tools/winebuild --sysroot=$(top_builddir) --lib-suffix=.cross.a
SED_CMD = LC_ALL=C sed -e 's,@bindir\@,$(bindir),g' -e 's,@dlldir\@,$(dlldir),g' -e 's,@PACKAGE_STRING\@,@PACKAGE_STRING@,g'
LDRPATH_INSTALL = @LDRPATH_INSTALL@ LDRPATH_INSTALL = @LDRPATH_INSTALL@
LDRPATH_LOCAL = @LDRPATH_LOCAL@ LDRPATH_LOCAL = @LDRPATH_LOCAL@
INSTALL = @INSTALL@ $(INSTALL_FLAGS) INSTALL = @INSTALL@ $(INSTALL_FLAGS)
......
...@@ -14,20 +14,15 @@ PROGRAMS = \ ...@@ -14,20 +14,15 @@ PROGRAMS = \
wine64 \ wine64 \
wine64-preloader wine64-preloader
MANPAGE = wine.man MANPAGES = \
wine.de.UTF-8.man.in \
EXTRA_MANPAGES = \ wine.fr.UTF-8.man.in \
wine.de.UTF-8.man \ wine.man.in \
wine.fr.UTF-8.man \ wine.pl.UTF-8.man.in
wine.pl.UTF-8.man
INSTALLDIRS = \ INSTALLDIRS = \
$(DESTDIR)$(bindir) \ $(DESTDIR)$(bindir) \
$(DESTDIR)$(datadir)/wine \ $(DESTDIR)$(datadir)/wine
$(DESTDIR)$(mandir)/man$(prog_manext) \
$(DESTDIR)$(mandir)/de.UTF-8/man$(prog_manext) \
$(DESTDIR)$(mandir)/fr.UTF-8/man$(prog_manext) \
$(DESTDIR)$(mandir)/pl.UTF-8/man$(prog_manext)
@MAKE_RULES@ @MAKE_RULES@
...@@ -36,13 +31,3 @@ INSTALLDIRS = \ ...@@ -36,13 +31,3 @@ INSTALLDIRS = \
# Make sure that make_makefiles sees the generated rules # Make sure that make_makefiles sees the generated rules
install install-lib:: install install-lib::
clean:: clean::
install-man-pages:: $(EXTRA_MANPAGES) $(INSTALLDIRS) dummy
$(INSTALL_DATA) wine.de.UTF-8.man $(DESTDIR)$(mandir)/de.UTF-8/man$(prog_manext)/wine.$(prog_manext)
$(INSTALL_DATA) wine.fr.UTF-8.man $(DESTDIR)$(mandir)/fr.UTF-8/man$(prog_manext)/wine.$(prog_manext)
$(INSTALL_DATA) wine.pl.UTF-8.man $(DESTDIR)$(mandir)/pl.UTF-8/man$(prog_manext)/wine.$(prog_manext)
uninstall::
$(RM) $(DESTDIR)$(mandir)/de.UTF-8/man$(prog_manext)/wine.$(prog_manext)
$(RM) $(DESTDIR)$(mandir)/fr.UTF-8/man$(prog_manext)/wine.$(prog_manext)
$(RM) $(DESTDIR)$(mandir)/pl.UTF-8/man$(prog_manext)/wine.$(prog_manext)
...@@ -8,7 +8,7 @@ C_SRCS = \ ...@@ -8,7 +8,7 @@ C_SRCS = \
RC_SRCS = rsrc.rc RC_SRCS = rsrc.rc
MANPAGE = msiexec.man MANPAGES = msiexec.man.in
SVG_SRCS = msiexec.svg SVG_SRCS = msiexec.svg
......
...@@ -12,7 +12,7 @@ C_SRCS = \ ...@@ -12,7 +12,7 @@ C_SRCS = \
RC_SRCS = notepad.rc RC_SRCS = notepad.rc
PO_SRCS = notepad.rc PO_SRCS = notepad.rc
MANPAGE = notepad.man MANPAGES = notepad.man.in
SVG_SRCS = notepad.svg SVG_SRCS = notepad.svg
......
...@@ -21,7 +21,7 @@ C_SRCS = \ ...@@ -21,7 +21,7 @@ C_SRCS = \
RC_SRCS = regedit.rc RC_SRCS = regedit.rc
PO_SRCS = regedit.rc PO_SRCS = regedit.rc
MANPAGE = regedit.man MANPAGES = regedit.man.in
SVG_SRCS = regedit.svg SVG_SRCS = regedit.svg
......
...@@ -7,6 +7,6 @@ C_SRCS = \ ...@@ -7,6 +7,6 @@ C_SRCS = \
RC_SRCS = regsvr32.rc RC_SRCS = regsvr32.rc
MANPAGE = regsvr32.man MANPAGES = regsvr32.man.in
@MAKE_PROG_RULES@ @MAKE_PROG_RULES@
...@@ -10,6 +10,6 @@ C_SRCS = \ ...@@ -10,6 +10,6 @@ C_SRCS = \
RC_SRCS = wineboot.rc RC_SRCS = wineboot.rc
PO_SRCS = wineboot.rc PO_SRCS = wineboot.rc
MANPAGE = wineboot.man MANPAGES = wineboot.man.in
@MAKE_PROG_RULES@ @MAKE_PROG_RULES@
...@@ -18,7 +18,7 @@ C_SRCS = \ ...@@ -18,7 +18,7 @@ C_SRCS = \
RC_SRCS = winecfg.rc RC_SRCS = winecfg.rc
PO_SRCS = winecfg.rc PO_SRCS = winecfg.rc
MANPAGE = winecfg.man MANPAGES = winecfg.man.in
SVG_SRCS = \ SVG_SRCS = \
logo.svg \ logo.svg \
......
...@@ -13,6 +13,6 @@ C_SRCS = \ ...@@ -13,6 +13,6 @@ C_SRCS = \
RC_SRCS = wineconsole.rc RC_SRCS = wineconsole.rc
PO_SRCS = wineconsole.rc PO_SRCS = wineconsole.rc
MANPAGE = wineconsole.man MANPAGES = wineconsole.man.in
@MAKE_PROG_RULES@ @MAKE_PROG_RULES@
...@@ -34,6 +34,6 @@ PO_SRCS = winedbg.rc ...@@ -34,6 +34,6 @@ PO_SRCS = winedbg.rc
LEX_SRCS = debug.l LEX_SRCS = debug.l
BISON_SRCS = dbg.y BISON_SRCS = dbg.y
MANPAGE = winedbg.man MANPAGES = winedbg.man.in
@MAKE_PROG_RULES@ @MAKE_PROG_RULES@
...@@ -10,7 +10,7 @@ C_SRCS = \ ...@@ -10,7 +10,7 @@ C_SRCS = \
RC_SRCS = winefile.rc RC_SRCS = winefile.rc
PO_SRCS = winefile.rc PO_SRCS = winefile.rc
MANPAGE = winefile.man MANPAGES = winefile.man.in
SVG_SRCS = winefile.svg SVG_SRCS = winefile.svg
......
...@@ -10,7 +10,7 @@ C_SRCS = \ ...@@ -10,7 +10,7 @@ C_SRCS = \
RC_SRCS = winemine.rc RC_SRCS = winemine.rc
PO_SRCS = winemine.rc PO_SRCS = winemine.rc
MANPAGE = winemine.man MANPAGES = winemine.man.in
SVG_SRCS = winemine.svg SVG_SRCS = winemine.svg
......
...@@ -3,6 +3,6 @@ APPMODE = -mconsole -municode ...@@ -3,6 +3,6 @@ APPMODE = -mconsole -municode
C_SRCS = winepath.c C_SRCS = winepath.c
MANPAGE = winepath.man MANPAGES = winepath.man.in
@MAKE_PROG_RULES@ @MAKE_PROG_RULES@
...@@ -47,14 +47,12 @@ C_SRCS = \ ...@@ -47,14 +47,12 @@ C_SRCS = \
PROGRAMS = wineserver wineserver-installed PROGRAMS = wineserver wineserver-installed
MANPAGE = wineserver.man MANPAGES = \
EXTRA_MANPAGES = wineserver.de.UTF-8.man wineserver.fr.UTF-8.man wineserver.de.UTF-8.man.in \
wineserver.fr.UTF-8.man.in \
wineserver.man.in
INSTALLDIRS = \ INSTALLDIRS = $(DESTDIR)$(bindir)
$(DESTDIR)$(bindir) \
$(DESTDIR)$(mandir)/man$(prog_manext) \
$(DESTDIR)$(mandir)/de.UTF-8/man$(prog_manext) \
$(DESTDIR)$(mandir)/fr.UTF-8/man$(prog_manext)
all: $(PROGRAMS) all: $(PROGRAMS)
...@@ -69,11 +67,5 @@ wineserver-installed: $(OBJS) ...@@ -69,11 +67,5 @@ wineserver-installed: $(OBJS)
install install-lib:: wineserver-installed $(DESTDIR)$(bindir) install-man-pages install install-lib:: wineserver-installed $(DESTDIR)$(bindir) install-man-pages
$(INSTALL_PROGRAM) wineserver-installed $(DESTDIR)$(bindir)/wineserver $(INSTALL_PROGRAM) wineserver-installed $(DESTDIR)$(bindir)/wineserver
install-man-pages:: $(EXTRA_MANPAGES) $(INSTALLDIRS)
$(INSTALL_DATA) wineserver.de.UTF-8.man $(DESTDIR)$(mandir)/de.UTF-8/man$(prog_manext)/wineserver.$(prog_manext)
$(INSTALL_DATA) wineserver.fr.UTF-8.man $(DESTDIR)$(mandir)/fr.UTF-8/man$(prog_manext)/wineserver.$(prog_manext)
uninstall:: uninstall::
$(RM) $(DESTDIR)$(bindir)/wineserver $(RM) $(DESTDIR)$(bindir)/wineserver
$(RM) $(DESTDIR)$(mandir)/de.UTF-8/man$(prog_manext)/wineserver.$(prog_manext)
$(RM) $(DESTDIR)$(mandir)/fr.UTF-8/man$(prog_manext)/wineserver.$(prog_manext)
...@@ -8,11 +8,10 @@ PROGRAMS = \ ...@@ -8,11 +8,10 @@ PROGRAMS = \
sfnt2fnt$(EXEEXT) \ sfnt2fnt$(EXEEXT) \
wineapploader wineapploader
MANPAGE = winemaker.man MANPAGES = \
winemaker.de.UTF-8.man.in \
EXTRA_MANPAGES = \ winemaker.fr.UTF-8.man.in \
winemaker.de.UTF-8.man \ winemaker.man.in
winemaker.fr.UTF-8.man
C_SRCS = \ C_SRCS = \
fnt2fon.c \ fnt2fon.c \
...@@ -23,10 +22,7 @@ C_SRCS = \ ...@@ -23,10 +22,7 @@ C_SRCS = \
INSTALLDIRS = \ INSTALLDIRS = \
$(DESTDIR)$(bindir) \ $(DESTDIR)$(bindir) \
$(DESTDIR)$(datadir)/applications \ $(DESTDIR)$(datadir)/applications
$(DESTDIR)$(mandir)/man$(prog_manext) \
$(DESTDIR)$(mandir)/de.UTF-8/man$(prog_manext) \
$(DESTDIR)$(mandir)/fr.UTF-8/man$(prog_manext)
UPDATE_DESKTOP_DATABASE = update-desktop-database UPDATE_DESKTOP_DATABASE = update-desktop-database
...@@ -56,13 +52,6 @@ install install-lib:: $(DESTDIR)$(datadir)/applications ...@@ -56,13 +52,6 @@ install install-lib:: $(DESTDIR)$(datadir)/applications
install install-dev:: $(DESTDIR)$(bindir) install-man-pages install install-dev:: $(DESTDIR)$(bindir) install-man-pages
$(INSTALL_SCRIPT) $(srcdir)/winemaker $(DESTDIR)$(bindir)/winemaker $(INSTALL_SCRIPT) $(srcdir)/winemaker $(DESTDIR)$(bindir)/winemaker
install-man-pages:: $(EXTRA_MANPAGES) $(INSTALLDIRS)
$(INSTALL_DATA) winemaker.de.UTF-8.man $(DESTDIR)$(mandir)/de.UTF-8/man$(prog_manext)/winemaker.$(prog_manext)
$(INSTALL_DATA) winemaker.fr.UTF-8.man $(DESTDIR)$(mandir)/fr.UTF-8/man$(prog_manext)/winemaker.$(prog_manext)
uninstall:: uninstall::
$(RM) $(DESTDIR)$(datadir)/applications/wine.desktop \ $(RM) $(DESTDIR)$(datadir)/applications/wine.desktop $(DESTDIR)$(bindir)/winemaker
$(DESTDIR)$(bindir)/winemaker \
$(DESTDIR)$(mandir)/de.UTF-8/man$(prog_manext)/winemaker.$(prog_manext) \
$(DESTDIR)$(mandir)/fr.UTF-8/man$(prog_manext)/winemaker.$(prog_manext)
-$(UPDATE_DESKTOP_DATABASE) -$(UPDATE_DESKTOP_DATABASE)
...@@ -322,15 +322,14 @@ sub parse_makefile($) ...@@ -322,15 +322,14 @@ sub parse_makefile($)
$make{"=rules"} = $makerules{$var} || $var; $make{"=rules"} = $makerules{$var} || $var;
next; next;
} }
if (/^\s*(MODULE|IMPORTLIB|TESTDLL|MANPAGE|PARENTSRC)\s*=\s*(.*)/) if (/^\s*(MODULE|IMPORTLIB|TESTDLL|PARENTSRC)\s*=\s*(.*)/)
{ {
my $var = $1; my $var = $1;
$make{$var} = $2; $make{$var} = $2;
${$make{"=flags"}}{"implib"} = 1 if $var eq "IMPORTLIB"; ${$make{"=flags"}}{"implib"} = 1 if $var eq "IMPORTLIB";
${$make{"=flags"}}{"manpage"} = 1 if $var eq "MANPAGE";
next; next;
} }
if (/^\s*(BISON_SRCS|LEX_SRCS|IDL_[CHIPRS]_SRCS|IDL_TLB_SRCS|IMPLIB_SRCS|C_SRCS|OBJC_SRCS|MC_SRCS|RC_SRCS|PO_SRCS|SVG_SRCS|PROGRAMS)\s*=\s*(.*)/) if (/^\s*(BISON_SRCS|LEX_SRCS|IDL_[CHIPRS]_SRCS|IDL_TLB_SRCS|IMPLIB_SRCS|C_SRCS|OBJC_SRCS|MC_SRCS|RC_SRCS|PO_SRCS|SVG_SRCS|PROGRAMS|MANPAGES)\s*=\s*(.*)/)
{ {
my $var = $1; my $var = $1;
my @list = split(/\s+/, $2); my @list = split(/\s+/, $2);
...@@ -498,6 +497,11 @@ sub assign_sources_to_makefiles(@) ...@@ -498,6 +497,11 @@ sub assign_sources_to_makefiles(@)
push @{${$make}{"=IDL_TLB_SRCS"}}, $name if defined $flags{"typelib"}; push @{${$make}{"=IDL_TLB_SRCS"}}, $name if defined $flags{"typelib"};
${${$make}{"=flags"}}{"clean"} = 1; ${${$make}{"=flags"}}{"clean"} = 1;
} }
elsif ($name =~ /\.man\.in$/)
{
push @{${$make}{"=MANPAGES"}}, $name;
${${$make}{"=flags"}}{"manpage"} = 1;
}
} }
} }
...@@ -624,6 +628,7 @@ sub update_makefiles(@) ...@@ -624,6 +628,7 @@ sub update_makefiles(@)
replace_makefile_variable( $file, "XTEMPLATE_SRCS" ); replace_makefile_variable( $file, "XTEMPLATE_SRCS" );
replace_makefile_variable( $file, "IMPLIB_SRCS" ); replace_makefile_variable( $file, "IMPLIB_SRCS" );
replace_makefile_variable( $file, "SRCDIR_INCLUDES" ); replace_makefile_variable( $file, "SRCDIR_INCLUDES" );
replace_makefile_variable( $file, "MANPAGES" );
} }
push @lines, "dnl End of auto-generated output commands\n"; push @lines, "dnl End of auto-generated output commands\n";
......
...@@ -929,6 +929,29 @@ static void parse_rc_file( struct incl_file *pFile, FILE *file ) ...@@ -929,6 +929,29 @@ static void parse_rc_file( struct incl_file *pFile, FILE *file )
/******************************************************************* /*******************************************************************
* parse_man_page
*/
static void parse_man_page( struct incl_file *source, FILE *file )
{
char *p, *buffer;
/* make sure it gets rebuilt when the version changes */
add_include( source, "config.h", 1 );
input_line = 0;
while ((buffer = get_line( file )))
{
if (strncmp( buffer, ".TH", 3 )) continue;
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 */
return;
}
}
/*******************************************************************
* parse_generated_idl * parse_generated_idl
*/ */
static void parse_generated_idl( struct incl_file *source ) static void parse_generated_idl( struct incl_file *source )
...@@ -1005,6 +1028,8 @@ static void parse_file( struct incl_file *source, int src ) ...@@ -1005,6 +1028,8 @@ static void parse_file( struct incl_file *source, int src )
parse_c_file( source, file ); parse_c_file( source, file );
else if (strendswith( source->filename, ".rc" )) else if (strendswith( source->filename, ".rc" ))
parse_rc_file( source, file ); parse_rc_file( source, file );
else if (strendswith( source->filename, ".man.in" ))
parse_man_page( source, file );
fclose(file); fclose(file);
input_file_name = NULL; input_file_name = NULL;
} }
...@@ -1147,11 +1172,12 @@ static void output_include( struct incl_file *pFile, struct incl_file *owner, in ...@@ -1147,11 +1172,12 @@ static void output_include( struct incl_file *pFile, struct incl_file *owner, in
static void output_sources(void) static void output_sources(void)
{ {
struct incl_file *source; struct incl_file *source;
struct strarray clean_files; struct strarray clean_files, subdirs;
int i, column, po_srcs = 0, mc_srcs = 0; int i, column, po_srcs = 0, mc_srcs = 0;
int is_test = find_src_file( "testlist.o" ) != NULL; int is_test = find_src_file( "testlist.o" ) != NULL;
strarray_init( &clean_files ); strarray_init( &clean_files );
strarray_init( &subdirs );
LIST_FOR_EACH_ENTRY( source, &sources, struct incl_file, entry ) LIST_FOR_EACH_ENTRY( source, &sources, struct incl_file, entry )
{ {
...@@ -1242,6 +1268,32 @@ static void output_sources(void) ...@@ -1242,6 +1268,32 @@ static void output_sources(void)
} }
column += output( " %s", source->filename ); column += output( " %s", source->filename );
} }
else if (!strcmp( ext, "in" )) /* man page */
{
if (strendswith( obj, ".man" ) && source->sourcename)
{
char *dir, *dest = replace_extension( obj, 4, "" );
char *lang = strchr( dest, '.' );
if (lang)
{
*lang++ = 0;
dir = strmake( "$(DESTDIR)$(mandir)/%s/man%s", lang, source->sourcename );
}
else dir = strmake( "$(DESTDIR)$(mandir)/man%s", source->sourcename );
output( "install-man-pages:: %s %s\n", obj, dir );
output( "\t$(INSTALL_DATA) %s %s/%s.%s\n",
obj, dir, dest, source->sourcename );
output( "uninstall::\n" );
output( "\t$(RM) %s/%s.%s\n",
dir, dest, source->sourcename );
free( dest );
strarray_add( &subdirs, dir );
}
strarray_add( &clean_files, xstrdup(obj) );
output( "%s: %s\n", obj, source->filename );
output( "\t$(SED_CMD) %s >$@ || ($(RM) $@ && false)\n", source->filename );
column += output( "%s:", obj );
}
else if (!strcmp( ext, "tlb" ) || !strcmp( ext, "res" ) || !strcmp( ext, "pot" )) else if (!strcmp( ext, "tlb" ) || !strcmp( ext, "res" ) || !strcmp( ext, "pot" ))
{ {
continue; /* nothing to do for typelib files */ continue; /* nothing to do for typelib files */
...@@ -1348,6 +1400,13 @@ static void output_sources(void) ...@@ -1348,6 +1400,13 @@ static void output_sources(void)
for (i = 0; i < clean_files.count; i++) output_filename( clean_files.str[i], &column ); for (i = 0; i < clean_files.count; i++) output_filename( clean_files.str[i], &column );
output( "\n" ); output( "\n" );
} }
if (subdirs.count)
{
for (i = column = 0; i < subdirs.count; i++) output_filename( subdirs.str[i], &column );
output( ":\n" );
output( "\t$(MKDIR_P) -m 755 $@\n" );
}
} }
......
PROGRAMS = widl$(EXEEXT) PROGRAMS = widl$(EXEEXT)
MANPAGE = widl.man MANPAGES = widl.man.in
C_SRCS = \ C_SRCS = \
client.c \ client.c \
...@@ -20,7 +20,7 @@ LEX_SRCS = parser.l ...@@ -20,7 +20,7 @@ LEX_SRCS = parser.l
BISON_SRCS = parser.y BISON_SRCS = parser.y
EXTRADEFS = -DDEFAULT_INCLUDE_DIR=\"$(includedir)/windows/\" EXTRADEFS = -DDEFAULT_INCLUDE_DIR=\"$(includedir)/windows/\"
INSTALLDIRS = $(DESTDIR)$(bindir) $(DESTDIR)$(mandir)/man$(prog_manext) INSTALLDIRS = $(DESTDIR)$(bindir)
all: $(PROGRAMS) all: $(PROGRAMS)
......
PROGRAMS = winebuild$(EXEEXT) PROGRAMS = winebuild$(EXEEXT)
MANPAGE = winebuild.man MANPAGES = winebuild.man.in
C_SRCS = \ C_SRCS = \
import.c \ import.c \
...@@ -12,7 +12,7 @@ C_SRCS = \ ...@@ -12,7 +12,7 @@ C_SRCS = \
spec32.c \ spec32.c \
utils.c utils.c
INSTALLDIRS = $(DESTDIR)$(bindir) $(DESTDIR)$(mandir)/man$(prog_manext) INSTALLDIRS = $(DESTDIR)$(bindir)
all: $(PROGRAMS) all: $(PROGRAMS)
......
PROGRAMS = winedump$(EXEEXT) PROGRAMS = winedump$(EXEEXT)
MANPAGE = winedump.man MANPAGES = winedump.man.in
C_SRCS = \ C_SRCS = \
debug.c \ debug.c \
...@@ -23,7 +23,7 @@ C_SRCS = \ ...@@ -23,7 +23,7 @@ C_SRCS = \
symbol.c \ symbol.c \
tlb.c tlb.c
INSTALLDIRS = $(DESTDIR)$(bindir) $(DESTDIR)$(mandir)/man$(prog_manext) INSTALLDIRS = $(DESTDIR)$(bindir)
all: $(PROGRAMS) all: $(PROGRAMS)
......
...@@ -12,13 +12,13 @@ PROGRAMS = \ ...@@ -12,13 +12,13 @@ PROGRAMS = \
winegcc$(EXEEXT) \ winegcc$(EXEEXT) \
wineg++$(EXEEXT) wineg++$(EXEEXT)
MANPAGE = winegcc.man MANPAGES = winegcc.man.in
C_SRCS = \ C_SRCS = \
utils.c \ utils.c \
winegcc.c winegcc.c
INSTALLDIRS = $(DESTDIR)$(bindir) $(DESTDIR)$(mandir)/man$(prog_manext) INSTALLDIRS = $(DESTDIR)$(bindir)
all: $(PROGRAMS) all: $(PROGRAMS)
......
PROGRAMS = wmc$(EXEEXT) PROGRAMS = wmc$(EXEEXT)
MANPAGE = wmc.man MANPAGES = wmc.man.in
ALL_LIBS = @LIBGETTEXTPO@ $(LIBWINE_STATIC) $(LIBPORT) ALL_LIBS = @LIBGETTEXTPO@ $(LIBWINE_STATIC) $(LIBPORT)
C_SRCS = \ C_SRCS = \
...@@ -12,7 +12,7 @@ C_SRCS = \ ...@@ -12,7 +12,7 @@ C_SRCS = \
BISON_SRCS = mcy.y BISON_SRCS = mcy.y
INSTALLDIRS = $(DESTDIR)$(bindir) $(DESTDIR)$(mandir)/man$(prog_manext) INSTALLDIRS = $(DESTDIR)$(bindir)
all: $(PROGRAMS) all: $(PROGRAMS)
......
EXTRADEFS = -DINCLUDEDIR="\"$(includedir)\"" EXTRADEFS = -DINCLUDEDIR="\"$(includedir)\""
PROGRAMS = wrc$(EXEEXT) PROGRAMS = wrc$(EXEEXT)
MANPAGE = wrc.man MANPAGES = wrc.man.in
ALL_LIBS = @LIBGETTEXTPO@ $(LIBWPP) $(LIBWINE_STATIC) $(LIBPORT) ALL_LIBS = @LIBGETTEXTPO@ $(LIBWPP) $(LIBWINE_STATIC) $(LIBPORT)
C_SRCS = \ C_SRCS = \
...@@ -17,7 +17,7 @@ C_SRCS = \ ...@@ -17,7 +17,7 @@ C_SRCS = \
LEX_SRCS = parser.l LEX_SRCS = parser.l
BISON_SRCS = parser.y BISON_SRCS = parser.y
INSTALLDIRS = $(DESTDIR)$(bindir) $(DESTDIR)$(mandir)/man$(prog_manext) INSTALLDIRS = $(DESTDIR)$(bindir)
all: $(PROGRAMS) all: $(PROGRAMS)
......
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