Commit 316448cd authored by Alexandre Julliard's avatar Alexandre Julliard

makefiles: Generate rules for installing IDL headers.

parent ef2d8ee2
PRIVATE_IDL_H_SRCS = \
wine/winedxgi.idl
PUBLIC_IDL_H_SRCS = \
IDL_SRCS = \
activaut.idl \
activdbg.idl \
activscp.idl \
......@@ -112,6 +109,7 @@ PUBLIC_IDL_H_SRCS = \
shldisp.idl \
shobjidl.idl \
shtypes.idl \
stdole2.idl \
strmif.idl \
structuredquerycondition.idl \
taskschd.idl \
......@@ -138,6 +136,7 @@ PUBLIC_IDL_H_SRCS = \
windows.foundation.idl \
wine/itss.idl \
wine/svcctl.idl \
wine/winedxgi.idl \
winsxs.idl \
wmiutils.idl \
wmp.idl \
......@@ -151,9 +150,6 @@ PUBLIC_IDL_H_SRCS = \
xaudio2fx.idl \
xmllite.idl
IDL_TLB_SRCS = \
stdole2.idl
HEADER_SRCS = \
accctrl.h \
aclapi.h \
......@@ -645,8 +641,6 @@ XTEMPLATE_SRCS = \
rmxftmpl.x
SRCDIR_INCLUDES = \
$(IDL_TLB_SRCS) \
$(PUBLIC_IDL_H_SRCS) \
access.idl \
asynot.idl \
asysta.idl \
......@@ -681,31 +675,17 @@ SRCDIR_INCLUDES = \
xmldom.idl \
xmldso.idl
IDL_H_SRCS = $(PUBLIC_IDL_H_SRCS) $(PRIVATE_IDL_H_SRCS)
IDL_SRCS = $(IDL_H_SRCS) $(IDL_TLB_SRCS)
OBJDIR_INCLUDES = $(PUBLIC_IDL_H_SRCS:.idl=.h)
all: $(IDL_H_SRCS:.idl=.h) $(IDL_TLB_SRCS:.idl=.tlb)
.PHONY: install install-dev uninstall
install install-dev:: $(OBJDIR_INCLUDES)
install install-dev::
for f in $(SRCDIR_INCLUDES); do case $$f in \
wine/*) $(INSTALL_DATA) $(srcdir)/$$f $(DESTDIR)$(includedir)/`expr $$f : 'wine/\(.*\)'` ;; \
msvcrt/*) $(INSTALL_DATA) $(srcdir)/$$f $(DESTDIR)$(includedir)/$$f ;; \
*) $(INSTALL_DATA) $(srcdir)/$$f $(DESTDIR)$(includedir)/windows/$$f ;; \
esac; done
for f in $(OBJDIR_INCLUDES); do case $$f in \
wine/*) $(INSTALL_DATA) $$f $(DESTDIR)$(includedir)/`expr $$f : 'wine/\(.*\)'` ;; \
msvcrt/*) $(INSTALL_DATA) $$f $(DESTDIR)$(includedir)/$$f ;; \
*) $(INSTALL_DATA) $$f $(DESTDIR)$(includedir)/windows/$$f ;; \
esac; done
# Don't just do a rm -rf on $(includedir) -- don't want to wipe out
# anything extra the user may have put there.
uninstall::
for f in $(SRCDIR_INCLUDES) $(OBJDIR_INCLUDES); do case $$f in \
for f in $(SRCDIR_INCLUDES); do case $$f in \
wine/*) $(RM) $(DESTDIR)$(includedir)/`expr $$f : 'wine/\(.*\)'` ;; \
msvcrt/*) $(RM) $(DESTDIR)$(includedir)/$$f ;; \
*) $(RM) $(DESTDIR)$(includedir)/windows/$$f ;; \
......
......@@ -18,7 +18,10 @@
*
*/
#if 0
#pragma makedep install
#pragma makedep typelib
#endif
#include <olectl.h>
......
......@@ -16,6 +16,8 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#pragma makedep header
import "dxgi.idl";
[
......
......@@ -373,16 +373,15 @@ sub assign_sources_to_makefiles(@)
next if ($name =~ /\.in$/);
if ($name =~ /^wine\// && !$exported_wine_headers{$name})
{
if ($private_idl_headers{$name}) { push @{${$make}{"=PRIVATE_IDL_H_SRCS"}}, $name; }
if ($private_idl_headers{$name}) { push @{${$make}{"=IDL_SRCS"}}, $name; }
next;
}
if ($name =~ /stdole2\.idl$/) { push @{${$make}{"=IDL_TLB_SRCS"}}, $name; }
elsif ($private_idl_headers{$name}) { push @{${$make}{"=SRCDIR_INCLUDES"}}, $name; }
if ($private_idl_headers{$name}) { push @{${$make}{"=SRCDIR_INCLUDES"}}, $name; }
elsif ($name =~ /\.h$/) { push @{${$make}{"=HEADER_SRCS"}}, $name; }
elsif ($name =~ /\.x$/) { push @{${$make}{"=XTEMPLATE_SRCS"}}, $name; }
elsif ($name =~ /\.rh$/) { push @{${$make}{"=HEADER_SRCS"}}, $name; }
elsif ($name =~ /\.inl$/) { push @{${$make}{"=HEADER_SRCS"}}, $name; }
elsif ($name =~ /\.idl$/) { push @{${$make}{"=PUBLIC_IDL_H_SRCS"}}, $name; }
elsif ($name =~ /\.idl$/) { push @{${$make}{"=IDL_SRCS"}}, $name; }
else { die "unknown file $name in include dir"; }
}
else
......@@ -432,12 +431,6 @@ sub assign_sources_to_makefiles(@)
}
}
# add extra variables to include source list
my $make = $makefiles{"include/Makefile"};
unshift @{${$make}{"=SRCDIR_INCLUDES"}}, "\$(PUBLIC_IDL_H_SRCS)";
unshift @{${$make}{"=SRCDIR_INCLUDES"}}, "\$(IDL_TLB_SRCS)";
unshift @{${$make}{"=IDL_SRCS"}}, "\$(IDL_H_SRCS) \$(IDL_TLB_SRCS)";
# preserve shared source files from the parent makefile
foreach my $file (@makefiles)
{
......@@ -556,9 +549,6 @@ sub update_makefiles(@)
replace_makefile_variable( $file, "IMPLIB_SRCS" );
replace_makefile_variable( $file, "MANPAGES" );
next unless $file eq "include/Makefile";
replace_makefile_variable( $file, "PRIVATE_IDL_H_SRCS" );
replace_makefile_variable( $file, "PUBLIC_IDL_H_SRCS" );
replace_makefile_variable( $file, "IDL_TLB_SRCS" );
replace_makefile_variable( $file, "SRCDIR_INCLUDES" );
}
......
......@@ -1702,6 +1702,10 @@ static void add_generated_sources( struct makefile *make )
{
add_generated_source( make, replace_extension( source->name, ".idl", "_r.res" ), NULL );
}
if (!source->file->flags && strendswith( source->name, ".idl" ))
{
add_generated_source( make, replace_extension( source->name, ".idl", ".h" ), NULL );
}
if (strendswith( source->name, ".x" ))
{
add_generated_source( make, replace_extension( source->name, ".x", ".h" ), NULL );
......@@ -2035,8 +2039,8 @@ static struct strarray output_sources( struct makefile *make, struct strarray *t
struct strarray targets = empty_strarray;
char *dest;
if (!source->file->flags || find_include_file( make, strmake( "%s.h", obj )))
source->file->flags |= FLAG_IDL_HEADER;
if (!source->file->flags) source->file->flags |= FLAG_IDL_HEADER | FLAG_INSTALL;
if (find_include_file( make, strmake( "%s.h", obj ))) source->file->flags |= FLAG_IDL_HEADER;
for (i = 0; i < sizeof(idl_outputs) / sizeof(idl_outputs[0]); i++)
{
......@@ -2046,6 +2050,19 @@ static struct strarray output_sources( struct makefile *make, struct strarray *t
strarray_add( &targets, dest );
}
if (source->file->flags & FLAG_IDL_PROXY) strarray_add( &dlldata_files, source->name );
if (source->file->flags & FLAG_INSTALL)
{
strarray_add( &make->install_dev_rules, xstrdup( source->filename ));
strarray_add( &make->install_dev_rules,
strmake( "D$(includedir)/%s.idl", get_include_install_path( obj ) ));
if (source->file->flags & FLAG_IDL_HEADER)
{
strarray_add( &make->install_dev_rules, strmake( "%s.h", obj ));
strarray_add( &make->install_dev_rules,
strmake( "d$(includedir)/%s.h", get_include_install_path( obj ) ));
}
}
if (!targets.count) continue;
output_filenames_obj_dir( make, targets );
output( ": %s\n", tools_path( make, "widl" ));
output( "\t%s -o $@", tools_path( make, "widl" ) );
......
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