OK, so to not leave the question in unanswered state. As we concluded in the comments:
AUR packages are installed in 2 phases
This is intended by arch developers since anyone can submit an AUR package. When you download an AUR packages you should always check the PKGBUILD files for malicious code. Although AUR packages are verified by Trusted Users there are just too many of them. Moreover, I use arch for years and never saw malicious code in the installation script of any AUR package I use, nut some people argue that they have.
When you build your package with makeprg you need to fulfill all dependencies for the build to succeed. Several AUR packages contain source files that are compiled, some download the sources during the build process, others even download binary blobs (e.g. graphic card drivers). Therefore dependencies are often header files and libraries that must be there when the build runs.
makeprg produces a file <package>-<version>-<architecture>.pkg.tar.xz which then needs to be fed to pacman -U to be installed. This is also intended since then you do not need root permissions to run makepkg.
If you have sudo installed you can use makepkg -i to install the package once the build is complete. This is safe, since only pacman will be called with root permissions.
mdm
The procedure above specifically for the mdm-display-manager would look as follows:
$ wget https://aur.archlinux.org/cgit/aur.git/snapshot/mdm-display-manager.tar.gz
$ tar xzf mdm-display-manager.tar.gz
$ cd mdm-display-manager
$ makepkg
This will result in a file called mdm-display-manager-2.0.10-1-x86_64.pkg.tar.xz (or i686 if you're on that architecture), which you need to feed to pacman as root:
# pacman -U /path/to/package/mdm-display-manager-2.0.10-1-x86_64.pkg.tar.xz