Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRaja R Harinath <harinath@hurrynot.org>2005-07-01 11:11:38 +0400
committerRaja R Harinath <harinath@hurrynot.org>2005-07-01 11:11:38 +0400
commitd47bad4e1697c1a9b91b8425e52be2e8e8cf9fa6 (patch)
tree8d6e7c60900ba9699bebd9e5d9937fac007e5eab /runtime
parentf72c0f4fa6eda84fc5f0bee1b9d231a644d913ee (diff)
Avoid resource leakage on 'make clean' (see #75424).
* configure.in (AC_CONFIG_FILES): Add runtime/semdel-wrapper. * runtime/semdel-wrapper.in: New. * runtime/Makefile.am (clean-local): Use the semdel program before nuking the .wapi directory. (noinst_SCRIPTS): Add semdel-wrapper. (MYDISTFILES, distdir): Use automake variable to get the list of files to distribute. svn path=/trunk/mono/; revision=46817
Diffstat (limited to 'runtime')
-rw-r--r--runtime/Makefile.am13
-rw-r--r--runtime/semdel-wrapper.in6
2 files changed, 11 insertions, 8 deletions
diff --git a/runtime/Makefile.am b/runtime/Makefile.am
index ace350b6764..ec7e4783030 100644
--- a/runtime/Makefile.am
+++ b/runtime/Makefile.am
@@ -1,13 +1,9 @@
-# This is just used to copy and install the DLL files that are currently
-# being compiled on windows.
-#
-
# hack to prevent 'check' from depending on 'all'
AUTOMAKE_OPTIONS = cygnus
tmpinst = _tmpinst
-noinst_SCRIPTS = mono-wrapper monodis-wrapper
+noinst_SCRIPTS = mono-wrapper monodis-wrapper semdel-wrapper
etctmp = etc
symlinks = etc/mono/1.0/machine.config etc/mono/2.0/machine.config
@@ -48,8 +44,10 @@ uninstall:
d=`pwd`; \
cd $(mcs_topdir) && $(MAKE) PROFILES='$(build_profiles)' RUNTIME_HAS_CONSISTENT_GACDIR=yes prefix=$(prefix) uninstall-profiles
+## semdel-wrapper will probably not delete the semaphore if someone is crazy enough to do a 'make -j distclean' :-)
clean-local:
d=`pwd`; cd $(mcs_topdir) && $(MAKE) PROFILES='$(build_profiles)' clean-profiles
+ -./semdel-wrapper
-rm -fr $(etctmp) $(tmpinst) .wapi
if INSTALL_2_0
@@ -138,11 +136,10 @@ $(tmpinst)/bin/pedump: $(srcdir)/Makefile.am
chmod +x $@
# the 'cygnus' option also disables the default 'distdir:' target, which we _do_ want
-MYDISTFILES = Makefile.am Makefile.in mono-wrapper.in monodis-wrapper.in
+MYDISTFILES = $(DIST_COMMON)
distdir: $(MYDISTFILES)
rm -fr $(distdir)
mkdir $(distdir)
test -z '$(MYDISTFILES)' || for file in ''$(MYDISTFILES); do \
- if test -f $$file; then d=.; else d=$(srcdir); fi; \
- cp -p $$d/$$file $(distdir) ; done
+ cp -p $$file $(distdir) ; done
find $(distdir) -type f -exec chmod a+r {} ';'
diff --git a/runtime/semdel-wrapper.in b/runtime/semdel-wrapper.in
new file mode 100644
index 00000000000..33f0229ac06
--- /dev/null
+++ b/runtime/semdel-wrapper.in
@@ -0,0 +1,6 @@
+#! /bin/sh
+r='@mono_build_root@'
+MONO_CFG_DIR='@mono_cfg_dir@'
+MONO_SHARED_DIR=$r/runtime
+export MONO_CFG_DIR MONO_SHARED_DIR
+exec "$r/libtool" --mode=execute "$r/mono/handles/semdel" "$@"