Stop linking everything to libntl and libstdc++
Do not append to lists; add NTL dependencies; don't add include_dirs
Trac #16105: Stop linking everything to libntl

After upgrading to Sage 6.2.beta7:
{{{
(sage-sh) jdemeyer@tamiyo:sage-config$ ldd local/lib/python2.7/site-
packages/sage/misc/readline_extra_commands.so
        linux-vdso.so.1 (0x00007fffdfffa000)
        libcsage.so => /usr/local/src/sage-config/local/lib/libcsage.so
(0x00007f403d747000)
        libreadline.so.6 => /usr/local/src/sage-
config/local/lib/libreadline.so.6 (0x00007f403d500000)
        libstdc++.so.6 => /usr/lib/gcc/x86_64-pc-linux-
gnu/4.6.3/libstdc++.so.6 (0x00007f403d1c4000)
        libntl.so.2 => not found
        libpython2.7.so.1.0 => /usr/local/src/sage-
config/local/lib/libpython2.7.so.1.0 (0x00007f403cde5000)
        libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f403cbc8000)
        libc.so.6 => /lib64/libc.so.6 (0x00007f403c820000)
        libntl.so.3 => /usr/local/src/sage-config/local/lib/libntl.so.3
(0x00007f403c459000)
        libpari-gmp.so.4 => /usr/local/src/sage-config/local/lib
/libpari-gmp.so.4 (0x00007f403bce9000)
        libgmp.so.11 => /usr/local/src/sage-
config/local/lib/libgmp.so.11 (0x00007f403ba7a000)
        libm.so.6 => /lib64/libm.so.6 (0x00007f403b78b000)
        libgcc_s.so.1 => /usr/lib/gcc/x86_64-pc-linux-
gnu/4.6.3/libgcc_s.so.1 (0x00007f403b575000)
        libtinfo.so.5 => /usr/local/src/sage-
config/local/lib/libtinfo.so.5 (0x00007f403b340000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f403db66000)
        libdl.so.2 => /lib64/libdl.so.2 (0x00007f403b13b000)
        libutil.so.1 => /lib64/libutil.so.1 (0x00007f403af38000)
        libgf2x.so.1 => /usr/local/src/sage-
config/local/lib/libgf2x.so.1 (0x00007f403ad22000)
}}}
Note the missing `libntl.so.2` causing various kinds of problems.

The reason is that ''every'' Cython extension is compiled with `-lntl`
(see `src/setup.py`), this should be fixed. This `-lntl` was added in
{{{
#!diff
commit 707bac8c37de8e320630c94d67d7154dd14e91da
Author: William Stein <wstein@gmail.com>
Date:   Mon Apr 9 18:43:36 2007 -0700

    add -lntl to the build line for building SAGE extension modules;
this avoids a warning on OS X.

diff --git a/src/setup.py b/src/setup.py
index 38c8ed4..b7e88fe 100644
--- a/src/setup.py
+++ b/src/setup.py
@@ -573,7 +573,7 @@ if DEVEL:
     #ext_modules.append(mpc)

 for m in ext_modules:
-    m.libraries = ['csage'] + m.libraries + ['stdc++']
+    m.libraries = ['csage'] + m.libraries + ['stdc++', 'ntl']
     m.library_dirs += ['%s/lib' % SAGE_LOCAL]
}}}

URL: http://trac.sagemath.org/16105
Reported by: darij
Ticket author(s): Jeroen Demeyer
Reviewer(s): Volker Braun
Prevent the user from getting in trouble when building the doc
Trac #16136: Prevent user from doing stupid thing with the doc building system

Right now there are at least two stupid thing the user can do which can
get him in trouble:

- type make in the `src/doc` directory : this **delete** the doc !
- type `sage docbuild reference/non_existing_doc` : this will create a
directory is the doc system that prevents the doc from compiling and
which even `make doc-clean` doesn't remove.

I'm adding two small safe guard to prevent those.

URL: http://trac.sagemath.org/16136
Reported by: hivert
Ticket author(s): Florent Hivert
Reviewer(s): Volker Braun