This script captures my process for merging changes from new upstream
elfutils releases. It isn't obfuscated for portability as it is only
intended for maintainer use and documentation.
The Makefile supports the usual DESTDIR and PREFIX to control the install
paths, as well as specific INCDIR and LIBDIR variables. The shared library
is built with a soname and minor version to match the upstream release.
Our config.h should provide sensible definitions to build and install on
either musl or glibc, and using either clang or gcc. It might need manual
adjustment on very old or non-Linux systems.
COPYING-GPLV2 and COPYING-LGPLV3 are imported into the project root.
All of libelf/*.[ch], lib/crc32.c, lib/eu-config.h, lib/fixedsizehash.h,
lib/next_prime.c and lib/system.h are imported into src/, except for
libelf/gelf.h, libelf/libelf.h and libelf/nlist.h which are imported into
include/ as publicly exported header files.