Alexandre Julliard : makefiles: Generate rules for installing X template files.

Alexandre Julliard julliard at wine.codeweavers.com
Mon Nov 2 09:47:14 CST 2015


Module: wine
Branch: master
Commit: 9b9b0dce1f83a2886b0582e3e1eed20b0903de30
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=9b9b0dce1f83a2886b0582e3e1eed20b0903de30

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Mon Nov  2 16:03:16 2015 +0900

makefiles: Generate rules for installing X template files.

Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 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 8f5373c..682072c 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 61b9516..9bc08e2 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 5d88e65..e3cc722 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 542741a..d2d39a6 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 */




More information about the wine-cvs mailing list