Keeping Makefile.am in sync with Git repository

2014-09-19 Thread Jack Bates
I started work on a script to help keep our Makefile.am-s up-to-date with our Git repository: http://nottheoilrig.com/autotidy/201409190/autotidy Does something similar already exist? Everyone on our project is comfortable adding/removing files from Git but the Makefile.am-s sometimes get overl

Re: Keeping Makefile.am in sync with Git repository

2014-09-19 Thread Nick Bowler
On 2014-09-19 11:23 -0700, Jack Bates wrote: [...] > Now if a file is removed from the repository but not from a Makefile.am > the script rewrites the Makefile.am, dropping the file from it as well. > If a file is added to the repository the script also adds it to the > appropriate Makefile.am's

Generated Makefile fails to build

2014-09-19 Thread Robert Parker
>> make make all-am make[1]: Entering directory `/home/bob/Documents/Programs/Pwordsaver' gcc -Wall -Wextra -g -O2 -lmhash -o pwordsaver pwordsaver.o fileutil.o pwordsaver.o: In function `dohash': /home/bob/Documents/Programs/Pwordsaver/pwordsaver.c:220: undefined reference to `mhash_init' /home/

Re: Generated Makefile fails to build

2014-09-19 Thread Bob Friesenhahn
On Sat, 20 Sep 2014, Robert Parker wrote: Here is my Makefile.am AM_CFLAGS=-Wall -Wextra bin_PROGRAMS=pwordsaver pwordsaver_SOURCES=pwordsaver.c fileutil.c fileutil.h AM_LDFLAGS = -lmhash A library is not a linker flag so it does not belong in LDFLAGS. Look into using a 'LIBADD' type option

Re: Generated Makefile fails to build

2014-09-19 Thread Warren Young
On 9/19/2014 17:16, Bob Friesenhahn wrote: On Sat, 20 Sep 2014, Robert Parker wrote: AM_LDFLAGS = -lmhash A library is not a linker flag so it does not belong in LDFLAGS. Look into using a 'LIBADD' type option instead. This problem seems to be a 'feature' of gcc because the same error happe

Re: Generated Makefile fails to build

2014-09-19 Thread Robert Parker
On Sat, Sep 20, 2014 at 6:16 AM, Bob Friesenhahn < bfrie...@simple.dallas.tx.us> wrote: > A library is not a linker flag so it does not belong in LDFLAGS. Look into > using a 'LIBADD' type option instead. > > Thanks for pointing me in the right direction. The bad line in my Makefile.am has now be

Re: Generated Makefile fails to build

2014-09-19 Thread Robert Parker
On Sat, Sep 20, 2014 at 6:46 AM, Warren Young wrote: > Just stepping back a bit, some linkers are more tolerant than others about > the order of flags and such. Libraries that land in standard locations > like /usr/lib also obscure this issue, by rendering irrelevant an > improperly-placed or -c