Use nested submodules to include boehm_gc/libatomic_ops

Feedback of the upgrade of Boehm GC indicated that including the
libatomic_ops submodule in the top-level was inconvenient, and I agree.
This change, along with a corresponding change to the boehm_gc repository,
will instead included it as a nested submodule of boehm_gc.

.gitmodules:
libatomic_ops:
    Remove libatomic_ops submodule.

boehm_gc
    Update to the most recent revision that adds a libatomic_ops submodule.

prepare.sh:
    Update submodules recursively.

Mmakefile:
scripts/prepare_install_dir.in:
tools/bootcheck:
    Remove code in build tools that links or copies the libatomic_ops
    directory from Mercury's top-level,
This commit is contained in:
Paul Bone
2015-10-16 16:53:32 +11:00
parent 358a7226c9
commit bca1db24d1
7 changed files with 7 additions and 30 deletions

5
.gitmodules vendored
View File

@@ -2,7 +2,4 @@
path = boehm_gc
url = ../bdwgc.git
branch = release-7_4-mercury
[submodule "libatomic_ops"]
path = libatomic_ops
url = ../libatomic_ops.git
branch = release-7_4-mercury
update = checkout

View File

@@ -489,15 +489,10 @@ tar: $(GENERATED_DOCS)
test -d $$ROOTNAME/bytecode && \
mv $$ROOTNAME/bytecode stuff-to-exclude; \
mv $$ROOTNAME/extras/quickcheck stuff-to-exclude; \
rm $$ROOTNAME/boehm_gc/libatomic_ops; \
mv $$ROOTNAME/libatomic_ops \
$$ROOTNAME/boehm_gc/libatomic_ops; \
mv $$ROOTNAME mercury-srcdist-$(VERSION); \
tar --exclude ".git" -cf - mercury-srcdist-$(VERSION) | \
gzip -9 > mercury-srcdist-$(VERSION).tar.gz; \
mv mercury-srcdist-$(VERSION) $$ROOTNAME; \
mv $$ROOTNAME/boehm_gc/libatomic_ops \
$$ROOTNAME/libatomic_ops; \
mv stuff-to-exclude/quickcheck $$ROOTNAME/extras/quickcheck; \
mv stuff-to-exclude/* $$ROOTNAME; \
rmdir stuff-to-exclude; \

Submodule libatomic_ops deleted from 137001b1d9

View File

@@ -5,9 +5,7 @@
if [ ! -e boehm_gc/.git ]; then
echo "Setting up submodules"
if git submodule --quiet init; then
git submodule update --remote --checkout
ln -s ../libatomic_ops boehm_gc/libatomic_ops || \
cp -R libatomic_ops boehm_gc/libatomic_ops
git submodule update --remote --init --recursive
else
echo "There was a problem configuring the submodules. If the"
echo "repositories could not be found then edit .git/config and run"

View File

@@ -57,20 +57,9 @@ cp boehm_gc/*.[chsS] ${installdir}/boehm_gc/
cp boehm_gc/tools/*.[ch] ${installdir}/boehm_gc/tools
cp boehm_gc/tools/*.sh ${installdir}/boehm_gc/tools
cp boehm_gc/build_atomic_ops.sh* ${installdir}/boehm_gc
if [ -d libatomic_ops ]; then
# If the libatomic_ops directory is present then boehm_gc/libatomic_ops
# is a symlink. This doesn't work on platforms without symlinks, but
# does anyone run this script on Windows?
cp -Rp libatomic_ops ${installdir}
ln -s ${installdir}/libatomic_ops ${installdir}/boehm_gc
rm -fr ${installdir}/libatomic_ops/src/*.o
rm -fr ${installdir}/libatomic_ops/src/*.a
else
# Otherwise boehmgc_libatomic_ops is a directory.
cp -Rp boehm_gc/libatomic_ops ${installdir}/boehm_gc
rm -fr ${installdir}/boehm_gc/libatomic_ops/src/*.o
rm -fr ${installdir}/boehm_gc/libatomic_ops/src/*.a
fi
cp -Rp boehm_gc/libatomic_ops ${installdir}/boehm_gc
rm -fr ${installdir}/boehm_gc/libatomic_ops/src/*.o
rm -fr ${installdir}/boehm_gc/libatomic_ops/src/*.a
cp -Rp boehm_gc/extra ${installdir}/boehm_gc
mkdir ${installdir}/runtime
mkdir ${installdir}/runtime/machdeps

View File

@@ -765,11 +765,10 @@ then
cp $root/boehm_gc/gc_cpp.cpp .
cp $root/boehm_gc/build_atomic_ops.sh* .
cp -r $root/boehm_gc/cord .
cp -r $root/boehm_gc/libatomic_ops .
cp -r $root/boehm_gc/extra .
cp -r $root/boehm_gc/tools .
ln -s ../libatomic_ops .
cd $root/$stage2dir
cp -r $root/libatomic_ops .
else
$LN_S $root/boehm_gc .
fi