ignore subdir-objects for one file

2015-12-28 Thread Basin Ilya
Hi. I need to compile same source file multiple times with different CFLAGS When automake option "subdir-objects" becomes default, will it be possible to put SOME object files to current directory instead of source directory? I tried to write my own rule, but I want to reuse automake's recipe

Re: Automake puts unwanted flags in compilation command

2015-12-30 Thread Basin Ilya
You can split your project to have 2 configure scripts. http://www.gnu.org/software/automake/manual/html_node/Subpackages.html http://www.gnu.org/software/autoconf/manual/autoconf-2.66/html_node/Subdirectories.html You can either change the default compiler in configure.ac of your subpackage or

Re: ignore subdir-objects for one file

2015-12-29 Thread Basin Ilya
Cool, that really worked. On 29.12.2015 12:22, Andrew W. Nosenko wrote: > On Mon, Dec 28, 2015 at 5:29 PM, Basin Ilya <basini...@gmail.com > <mailto:basini...@gmail.com>> wrote: > > Hi. > I need to compile same source file multiple times with different CF

Re: "LT_INIT" definition / libtool version mismatch - compilation error

2016-07-21 Thread Basin Ilya
Try deleting the shipped files manually. Those are usually: configure \ config.h.in \ aclocal.m4 \ Makefile.in \ */missing \ */ltmain.sh \ */install-sh \ */depcomp \ */config.sub \ */config.guess \ */compile \ */lt~obsolete.m4 \ */ltversion.m4 \ */ltsugar.m4 \ */ltoptions.m4 \

Re: Automatic recompile when flags change

2016-10-20 Thread Basin Ilya
Hi. I think $(eval) is less portable than $(shell) Instead of injecting a dependency to all targets you can generate config.h with autoconf and include it at the beginning of all source files. Automake plus gcc will make sure that the object files depend on it. If you change your CFLAGS by

Re: How to link the objects that are not created by libtool

2018-02-15 Thread Basin Ilya
I've tested your rules. Simply remove the double quotes surrounding the OBJS value and it will work. On 15.02.2018 16:36, Basin Ilya wrote: > Please try to add > > .PHONY: $(objdir)/bar.lo: > > $(objdir)/bar.lo: > > to your Makefile.am > > On 15.02.2018

Re: How to link the objects that are not created by libtool

2018-02-15 Thread Basin Ilya
Please try to add .PHONY: $(objdir)/bar.lo: $(objdir)/bar.lo: to your Makefile.am On 15.02.2018 3:59, sea star wrote: > Hi, > > I have a set of object files built by libool and other set of object files > that are not built by libool. The non-libtool object files are created > outside

Re: Make autoconf and automake generate compile_commands.json for integration with other build systems and IDEs

2018-07-24 Thread Basin Ilya
Hi Doron. The list of source files and resulting object files isn't known until `make` is launched. The IDE should be ready to support a constantly updating compilation database. It is possible to create a wrapper program for GNU Make that will do the job. It won't be part of Make, you will

Re: PTHREAD_CFLAGS provided by AX_PTHREAD where best to be attached?

2018-07-12 Thread Basin Ilya
Interesting. I'm using AX_PTHREAD and I never thought of that. Searching web shows that apr-util, though not using autoconf, prints this during configure: adding "-pthread" to CFLAGS adding "-D_REENTRANT" to CPPFLAGS So maybe AX_PTHREAD is doing wrong. Would it harm, if -pthread was added

.PHONY: $(TESTS)

2018-03-07 Thread Basin Ilya
Hi. Instead of testing my installable binary I want to test individual c functions in it. The binary's main c file has just the main function and everything else is in a build static library. I want to add a test binary to my project and pass the test case names to it. Here's how I modify the

bug#22223: multiple '-local' targets in a rule

2015-12-22 Thread Basin Ilya
If you define a supported `-local` target (e.g. `all-local`) in `Makefile.am`, `automake` will supplement the standard target (e.g. `all`) with it. * https://www.gnu.org/software/automake/manual/html_node/Extending.html *