From 9b9b0dce1f83a2886b0582e3e1eed20b0903de30 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Mon, 2 Nov 2015 16:03:16 +0900 Subject: [PATCH] makefiles: Generate rules for installing X template files. Signed-off-by: Alexandre Julliard --- include/Makefile.in | 5 ++--- include/rmxftmpl.x | 1 + tools/make_makefiles | 1 - tools/makedep.c | 14 +++++++++++++- 4 files changed, 16 insertions(+), 5 deletions(-) diff --git a/include/Makefile.in b/include/Makefile.in index 8f5373c44d9..682072cf6b8 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -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 diff --git a/include/rmxftmpl.x b/include/rmxftmpl.x index 61b95167634..9bc08e2ca4d 100644 --- a/include/rmxftmpl.x +++ b/include/rmxftmpl.x @@ -17,6 +17,7 @@ xof 0302txt 0064 #pragma xftmpl name D3DRM_XTEMPLATES #pragma xftmpl size D3DRM_XTEMPLATE_BYTES +#pragma makedep install template Header { diff --git a/tools/make_makefiles b/tools/make_makefiles index 5d88e65968b..e3cc722f235 100755 --- a/tools/make_makefiles +++ b/tools/make_makefiles @@ -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)"; diff --git a/tools/makedep.c b/tools/makedep.c index 542741a19b5..d2d39a682ed 100644 --- a/tools/makedep.c +++ b/tools/makedep.c @@ -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 */ -- 2.11.4.GIT