summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChun-wei Fan <fanchunwei@src.gnome.org>2015-04-10 10:08:17 +0800
committerChun-wei Fan <fanchunwei@src.gnome.org>2015-04-10 10:09:06 +0800
commit28df77e08b1f9c9ad27ba719465c2ff230516df0 (patch)
treedea918061c5fcc51744b0ea918023c92e544e994
parent0e0a3a83bfd4d57dced9e75383125d636e49adaa (diff)
downloadpango-28df77e08b1f9c9ad27ba719465c2ff230516df0.tar.gz
build/Makefile.msvcproj: Don't Use realpath(1)
Apaprently there are many incompatible realpath(1) implementations out there, so things like --relative-to can't be assured to work everywhere, such as on Ubuntu. Instead, simply use the subst feature of automake to fulfil the same purpose, which is like what the rest of this file does, and follows the pattern of the introspection makefile, which this is modelled on. Also update the simple tutorial and clean up a bit, changing $(empty) to <nothing> as Behdad pointed out. This is also checked with 'make -j8 distcheck'. https://bugzilla.gnome.org/show_bug.cgi?id=735039
-rw-r--r--build/Makefile.msvcproj14
1 files changed, 5 insertions, 9 deletions
diff --git a/build/Makefile.msvcproj b/build/Makefile.msvcproj
index 0fe31071..5d9cdc52 100644
--- a/build/Makefile.msvcproj
+++ b/build/Makefile.msvcproj
@@ -10,19 +10,16 @@
#
# Add this to Makefile.am where your library/program is built:
# include $(top_srcdir)/build/Makefile.msvcproj
-# MSVCPROJS = YourProject
+# MSVCPROJS = YourProject (can be multiple projects in a single srcdir)
# YourProject_FILES = $(libyourlib_1_0_SOURCES)
# YourProject_EXCLUDES = ... # list of sources to exclude, separated by '|', wildcards allowed; use random unsed value if none
# YourProject_HEADERS_DIR = $(libyourlibincludedir)
# YourProject_HEADERS_INST = $(libyourlib_1_0_HEADERS)
# YourProject_HEADERS_EXCLUDES = ... # <list of headers to exclude from installation, separated by '|', wildcards allowed; use random unsed value if none>
#
-# dist-hook: \ # (or add to it if it is already there)
+# dist-hook: \ # (or add to it if it is already there, note the vs9 items will also call the vs10 items in the process)
# $(top_builddir)/build/win32/vs9/YourProject.vcproj \
-# $(top_builddir)/build/win32/vs9/YourProject.headers \
-# $(top_builddir)/build/win32/vs10/YourProject.vcxproj \
-# $(top_builddir)/build/win32/vs10/YourProject.vcxproj.filters \
-# $(top_builddir)/build/win32/vs9/YourProject.vs10.headers
+# $(top_builddir)/build/win32/vs9/YourProject.headers
# Private functions
@@ -30,7 +27,7 @@
## Transform the MSVC project filename (no filename extensions) to something which can reference through a variable
## without automake/make complaining, eg Gtk-2.0 -> Gtk_2_0
_proj_name=$(subst /,_,$(subst -,_,$(subst .,_,$(1))))
-_proj_path_raw:=$(shell realpath --relative-to=$(top_srcdir) $(srcdir))
+_proj_path_raw:=$(subst $(abs_top_srcdir)/,,$(abs_srcdir))
_proj_path=$(subst /,\\,$(_proj_path_raw))
_proj_subdir_int=$(if $(ifeq $(_proj_path),\.),\\,\\$(_proj_path)\\)
_proj_subdir=$(subst \\.\\,\\,$(_proj_subdir_int))
@@ -43,8 +40,7 @@ _proj_headers_raw=$(subst /,\\,$($(_proj_name)_HEADERS_INST))
_proj_headers=$(subst $(srcdir)\\,,$(subst $(builddir)\\,,$(subst $(top_builddir)\\$(_proj_path)\\,\\,$(_proj_headers_raw))))
_proj_headers_excludes=$($(_proj_name)_HEADERS_EXCLUDES)
-empty:=
-_headers_dest_posix=$(subst $(includedir),$(empty),$($(_proj_name)_HEADERS_DIR))
+_headers_dest_posix=$(subst $(includedir),,$($(_proj_name)_HEADERS_DIR))
_headers_destdir=$(subst /,\\,$(_headers_dest_posix))
#