diff options
author | Raja R Harinath <harinath@hurrynot.org> | 2005-07-01 11:11:38 +0400 |
---|---|---|
committer | Raja R Harinath <harinath@hurrynot.org> | 2005-07-01 11:11:38 +0400 |
commit | d47bad4e1697c1a9b91b8425e52be2e8e8cf9fa6 (patch) | |
tree | 8d6e7c60900ba9699bebd9e5d9937fac007e5eab | |
parent | f72c0f4fa6eda84fc5f0bee1b9d231a644d913ee (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
-rw-r--r-- | ChangeLog | 11 | ||||
-rw-r--r-- | configure.in | 1 | ||||
-rw-r--r-- | mono/mini/Makefile.am | 2 | ||||
-rw-r--r-- | runtime/Makefile.am | 13 | ||||
-rw-r--r-- | runtime/semdel-wrapper.in | 6 |
5 files changed, 24 insertions, 9 deletions
diff --git a/ChangeLog b/ChangeLog index cd2ae0d2771..0cd05d0a8bf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2005-07-01 Raja R Harinath <rharinath@novell.com> + + 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. + 2005-06-27 Geoff Norton <gnorton@customerdna.com> * configure.in: Add support for X86 darwin. diff --git a/configure.in b/configure.in index 05857266bd9..d4c373fa37c 100644 --- a/configure.in +++ b/configure.in @@ -1691,6 +1691,7 @@ AC_SUBST(mono_cfg_dir) AC_CONFIG_FILES([runtime/mono-wrapper],[chmod +x runtime/mono-wrapper]) AC_CONFIG_FILES([runtime/monodis-wrapper],[chmod +x runtime/monodis-wrapper]) +AC_CONFIG_FILES([runtime/semdel-wrapper],[chmod +x runtime/semdel-wrapper]) AC_CONFIG_COMMANDS([runtime/etc/mono/1.0/machine.config], [ depth=../../../.. diff --git a/mono/mini/Makefile.am b/mono/mini/Makefile.am index 7d23dab02fc..ff9659ad445 100644 --- a/mono/mini/Makefile.am +++ b/mono/mini/Makefile.am @@ -29,7 +29,7 @@ static_libs= \ $(libgc_static_libs) \ $(ICU_LIBS) -RUNTIME = MONO_PATH=$(mcs_topdir)/class/lib/default MONO_SHARED_DIR=$(mono_build_root)/runtime MONO_CFG_DIR=$(mono_cfg_dir) ./mono --config $(top_builddir)/data/config +RUNTIME = MONO_PATH=$(mcs_topdir)/class/lib/default $(top_builddir)/runtime/mono-wrapper MCS = $(RUNTIME) $(mcs_topdir)/class/lib/default/mcs.exe -unsafe -nowarn:0162 ILASM = $(RUNTIME) $(mcs_topdir)/ilasm/ilasm.exe 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" "$@" |