TricksterGuy/complx — pull request #15 by mmirate (2014-09-24 01:00:25+00:00)
Title: Properly handle PREFIX changes

I used the usual trickery to stringify the expansion of a symbol in order to accomplish this.

Note that installation does not use DESTDIR; while this setup does work for [`toast`](http://www.toastball.net/toast/) (which has its own workaround for this), it is still slightly nonstandard, compared to the usual process of:

>```
build() {
cd "$pkgname-$pkgver"
#./configure --prefix=/usr # not needed since complx hasn't been condemned to GNU Auto%#@&
make PREFIX=/usr # else ./configure would set this variable
}
package() {
cd "$pkgname-$pkgver"
make DESTDIR="$pkgdir/" install
# now "$pkgdir/usr/bin/complx", etc., exist
}
```
> — An excerpt from Arch Linux's "skeleton" package-building script; comments mine.

I haven't (yet) read up on how to use DESTDIR properly in a Makefile's `install` target.

Also note that the contents of PREFIX are not used as a dependency, so it is possible for stale versions of `ComplxFrame.cpp` and `ComplxApp.cpp` to persist (which is also generally nonstandard).