I would like to distribute my startup script with my app. Its called “blah” and it resides in the scripts/ folder of my project. I have this in my configure.ac:
...
AC_CONFIG_FILES([
Makefile
scripts/Makefile
....
])
AC_CONFIG_FILES([scripts/blah], [chmod +x scripts/blah])
AC_OUTPUT
In the scripts directory I do have the following Makefile.am:
dist_bin_SCRIPTS = blah
CLEANFILES = $(bin_SCRIPTS)
In the same dir I do have “blah.in” file.
But when I do “make install” it does create scripts/blah, bot does not install it to the /usr/local/bin directory. What is wrong with my setup? Thanks
If you have
AC_CONFIG_FILES([scripts/blah], ...)to createscript/blahfromscript/blah.inthen you should only distributescript/blah.in(this happens automatically as a side effect of usingAC_CONFIG_FILES) and not distributescript/blah.Your
Makefileshould readIf you simply want to distribute and install the script as-is, without generating it with
configure, use onlyand omit
CLEANFILESas well as theAC_CONFIG_FILESline.Now this is not your real bug. Looking at your github files I can see that
scriptsdoes not appear in theSUBDIRSvariable of your rootMakefile.am. Thereforemake installis not recursing into that subdirectory and does not install the script.