Patch #2927 2010-02-10 16:45

neildarlow

Fix for closed bug #16809 - scriptedwizard install/uninstall
Download
2927-Fix_for_closed.patch (1.5 KB)
Category
Plugin::Bugfix
Status
Accepted
Close date
2010-02-15 10:26
Assigned to
biplab
--- src/plugins/scriptedwizard/resources/Makefile.am.orig    2010-02-10 17:52:21.096054205 +0000
+++ src/plugins/scriptedwizard/resources/Makefile.am    2010-02-11 13:46:47.836218970 +0000
@@ -1,8 +1,11 @@
 SUBDIRS = arm avr c_file console d directx dll empty empty_file fltk glfw glut gtk h_file irrlicht lf matlab_csf ogre opengl plugins ppc qt4 sdl sfml smartwin staticlib stlport sharedlib sys tricore win32gui wxwidgets
 
-pkgdatadir = $(datadir)/@PACKAGE@/templates/wizard
+pkgdata_DATA = scriptedwizard.zip
+CLEANFILES = $(pkgdata_DATA)
 
-dist_pkgdata_DATA = common_functions.script \
+scriptdir = $(pkgdatadir)/templates/wizard
+
+dist_script_DATA = common_functions.script \
                     config.script
 
 EXTRA_DIST = manifest.xml
@@ -10,16 +13,3 @@
 scriptedwizard.zip: $(EXTRA_DIST)
     PWD=`pwd` cd $(srcdir) && zip $(PWD)/scriptedwizard.zip manifest.xml > /dev/null
 
-install-data-local: scriptedwizard.zip
-    $(mkinstalldirs) $(DESTDIR)$(datadir)/@PACKAGE@/; \
-    if test -f $(srcdir)/scriptedwizard.zip; then p=$(srcdir)/scriptedwizard.zip; else p=scriptedwizard.zip; fi; \
-    $(INSTALL_DATA) $$p $(DESTDIR)$(datadir)/@PACKAGE@/scriptedwizard.zip
-
-clean-local:
-    if test -f $(srcdir)/scriptedwizard.zip; then rm $(srcdir)/scriptedwizard.zip; fi;
-
-distclean-local:
-    if test -f $(srcdir)/scriptedwizard.zip; then rm $(srcdir)/scriptedwizard.zip; fi;
-
-uninstall-local:
-    if test -f $(DESTDIR)$(datadir)/@PACKAGE@/scriptedwizard.zip; then rm $(DESTDIR)$(datadir)/@PACKAGE@/scriptedwizard.zip; fi;
neildarlow 2010-02-10 16:48

Test cases:

1) make uninstall

2) make install

3) make clean

4) Availability of plugin in Code::Blocks

neildarlow 2010-02-10 17:06

Don't know what happened here but the patch should also delete the *install-data-local* target.

neildarlow 2010-02-11 17:14

This is a revised patch (against current HEAD) which also supports *make dist*.

Please consider applying this patch because it uses automake features effectively to support VPATH builds. I'm not sure that the current solution does so for the clean cases (hardcoded $(srcdir) references).

biplab 2010-02-15 10:26

Thanks for your patch.