If there are no autotools configure flags to alter the installation options, one simple method is to patch the Makefile.am as required.
Here are the steps :
- Alter the source Makefile.am capturing your changes in a patch(s).
- Copy your patches to the global patch directory, they will be applied before building the package.
- Remove the package's output/build directory and rebuild it.
- At this point, the undesired files will not be installed to the target.
The more detailed method for doing this is to "make package". Go to the package's src. Run quilt to auto-generate patches for you. Alter the sources (Makefile.am), refresh the patches. Copy the patches back to buildroot's global patch directory. Once done, buildroot will patch Makefile.am then it will generate the appropriate Makefiles and will not install as required.
Here is an example :
Assume you have set BR2_GLOBAL_PATCH_DIR="$(BR2_EXTERNAL)/patches"
make package
cd output/build/package
quilt init . # output/build/package/patches now exists
quilt new 001-Makefile.am.do.not.install.patch
quilt add src/Makefile.am
# you edit src/Makefile.am here
quilt refresh # now patches/001-Makefile.am.do.not.install.patch exists
mkdir patch/to/global/patches # see BR2_GLOBAL_PATCH_DIR above
cp patches/*.patch patch/to/global/patches
cd ../../.. # got back to buildroot root to make
rm -rf output/build/package
make package
At this point, your patches should be applied to the src code and the files you removed from the make install process will not be on the target.
Make sure PACKAGE_AUTORECONF = YES in the package.mk file, it forces buildroot to autoreconf.