makefiles: Generate rules for installing X template files.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Alexandre Julliard 2015-11-02 16:03:16 +09:00
parent 4323384975
commit 9b9b0dce1f
4 changed files with 16 additions and 5 deletions

View File

@ -647,7 +647,6 @@ XTEMPLATE_SRCS = \
SRCDIR_INCLUDES = \
$(IDL_TLB_SRCS) \
$(PUBLIC_IDL_H_SRCS) \
$(XTEMPLATE_SRCS) \
access.idl \
asynot.idl \
asysta.idl \
@ -685,9 +684,9 @@ SRCDIR_INCLUDES = \
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) $(XTEMPLATE_SRCS:.x=.h)
OBJDIR_INCLUDES = $(PUBLIC_IDL_H_SRCS:.idl=.h)
all: $(IDL_H_SRCS:.idl=.h) $(IDL_TLB_SRCS:.idl=.tlb) $(XTEMPLATE_SRCS:.x=.h)
all: $(IDL_H_SRCS:.idl=.h) $(IDL_TLB_SRCS:.idl=.tlb)
.PHONY: install install-dev uninstall

View File

@ -17,6 +17,7 @@ xof 0302txt 0064
#pragma xftmpl name D3DRM_XTEMPLATES
#pragma xftmpl size D3DRM_XTEMPLATE_BYTES
#pragma makedep install
template Header
{

View File

@ -432,7 +432,6 @@ sub assign_sources_to_makefiles(@)
# add extra variables to include source list
my $make = $makefiles{"include/Makefile"};
unshift @{${$make}{"=SRCDIR_INCLUDES"}}, "\$(XTEMPLATE_SRCS)";
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)";

View File

@ -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 (strendswith( source->name, ".x" ))
{
add_generated_source( make, replace_extension( source->name, ".x", ".h" ), NULL );
}
if (strendswith( source->name, ".y" ))
{
file = add_generated_source( make, replace_extension( source->name, ".y", ".tab.c" ), NULL );
@ -1960,7 +1964,15 @@ static struct strarray output_sources( struct makefile *make, struct strarray *t
tools_dir_path( make, "make_xftmpl" ), tools_ext, source->filename );
output( "\t%s%s -H -o $@ %s\n",
tools_dir_path( make, "make_xftmpl" ), tools_ext, source->filename );
strarray_add( &clean_files, strmake( "%s.h", obj ));
if (source->file->flags & FLAG_INSTALL)
{
strarray_add( &make->install_dev_rules, source->name );
strarray_add( &make->install_dev_rules,
strmake( "D$(includedir)/%s", get_include_install_path( source->name ) ));
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 ) ));
}
continue; /* no dependencies */
}
else if (!strcmp( ext, "l" )) /* lex file */