commit 3cf58d69fb24b4a12dd829266ab75c95d35bb433
Author: phantomjinx <[email protected]>
Date: Sun Jan 30 21:57:55 2011 +0000
Make plugins.mk more portable
* Use LN_S macro
* Link to all *.xml files in data directory to avoid forgetting special
files to do with toolbars etc...
configure.ac | 3 ++
plugins/plugins.mk | 75 +++++++++++++++++++++++----------------------------
2 files changed, 37 insertions(+), 41 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 777e42c..1782f5d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -44,6 +44,9 @@ am_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc
AM_PROG_LIBTOOL
IT_PROG_INTLTOOL([0.33])
+dnl Check for ln -s
+AC_PROG_LN_S
+
dnl Only use -Wall if we have gcc
if test "x$GCC" = "xyes"; then
diff --git a/plugins/plugins.mk b/plugins/plugins.mk
index 4788e33..b4b5d34 100644
--- a/plugins/plugins.mk
+++ b/plugins/plugins.mk
@@ -16,59 +16,52 @@ AM_CPPFLAGS = \
plugindir = $(gtkpod_plugin_dir)
plugin_DATA = $(plugin_file)
-all-local: create-plugin-links create-ui-link create-glade-link
-.PHONY: create-plugin-links create-ui-link create-glade-link
+all-local: create-plugin-links create-gui-links
+.PHONY: create-plugin-links create-gui-links
# Creating symbolic links in plugin root directory
create-plugin-links:
- echo "Creating plugin links"
if [ ! -e ../$(plugin_lib) ]; then \
- ln -s `pwd`/.libs/$(plugin_lib) ../$(plugin_lib); \
+ $(LN_S) `pwd`/.libs/$(plugin_lib) ../$(plugin_lib); \
fi; \
if [ ! -e ../$(plugin_file) ]; then \
- ln -s `pwd`/$(plugin_file) ../$(plugin_file); \
+ $(LN_S) `pwd`/$(plugin_file) ../$(plugin_file); \
fi;
-# Creating symbolic link to ui file in installed ui directory
-create-ui-link:
- if [ -e `pwd`/$(plugin_name).ui ] && [ ! -e
../../data/ui/$(plugin_name).ui ]; then \
- ln -s `pwd`/$(plugin_name).ui ../../data/ui/$(plugin_name).ui; \
- fi;
-
-create-glade-link:
- if [ -e `pwd`/$(plugin_name).glade ]; then \
- if [ ! -e ../../data/glade/$(plugin_name).glade ]; then \
- ln -s `pwd`/$(plugin_name).glade
../../data/glade/$(plugin_name).glade; \
+# Creating symbolic link to glade and ui files in installed directories
+# Note: this will symlink to all xml files, inc. toolbar xml
+# files not just gtkbuilder files
+create-gui-links:
+ for file in $(plugin_name)*.xml $(plugin_name)*.glade; \
+ do \
+ if [ ! -e "$(top_srcdir)/data/glade/$$file" -a -e
`pwd`/"$$file" ]; then \
+ $(LN_S) `pwd`/"$$file"
$(top_srcdir)/data/glade/"$$file"; \
fi; \
- fi; \
- if [ -e `pwd`/$(plugin_name).xml ]; then \
- if [ ! -e ../../data/glade/$(plugin_name).xml ]; then \
- ln -s `pwd`/$(plugin_name).xml
../../data/glade/$(plugin_name).xml; \
+ done;
+ \
+ for file in $(plugin_name)*.ui; \
+ do \
+ if [ ! -e $(top_srcdir)/data/ui/"$$file" -a -e `pwd`/"$$file"
]; then \
+ $(LN_S) `pwd`/"$$file" $(top_srcdir)/data/ui/"$$file"; \
fi; \
- fi;
-
-# Clean up the links and files created purely for dev [ing
-clean-local: clean-plugin-files clean-ui-dir clean-glade-dir
-clean-local-check: clean-plugin-files
-.PHONY: clean-plugin-files clean-ui-dir clean-glade-dir clean-local-check
+ done;
-clean-plugin-files:
- if [ -h ../$(plugin_file) ]; then \
- rm -f ../$(plugin_lib) ../$(plugin_file) $(plugin_file); \
- fi;
+# Clean up the links and files created purely for development
+clean-local: clean-dev-files
+clean-local-check: clean-dev-files
+.PHONY: clean-dev-files clean-local-check
-clean-ui-dir:
- if [ -h ../../data/ui/$(plugin_name).ui ]; then \
- rm -f ../../data/ui/$(plugin_name).ui; \
- fi;
-
-clean-glade-dir:
- if [ -h ../../data/glade/$(plugin_name).glade ]; then \
- rm -f ../../data/glade/$(plugin_name).glade; \
- fi; \
- if [ -h ../../data/glade/$(plugin_name).xml ]; then \
- rm -f ../../data/glade/$(plugin_name).xml; \
- fi;
+clean-dev-files:
+ for file in $(top_srcdir)/data/ui/$(plugin_name)*.ui \
+ $(top_srcdir)/data/glade/$(plugin_name)* \
+ $(top_srcdir)/plugins/$(plugin_lib) \
+ $(top_srcdir)/plugins/$(plugin_file) \
+ $(plugin_file); \
+ do \
+ if [ -e "$$file" ]; then \
+ rm -f "$$file"; \
+ fi; \
+ done;
# List out the current language po files
PO_FILES=\
------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires
February 28th, so secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsight-sfd2d
_______________________________________________
gtkpod-cvs2 mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gtkpod-cvs2