[lvm-devel] Re: LVM2/tools/fsadm Makefile.in

Jim Meyering jim at meyering.net
Wed Oct 3 10:08:23 UTC 2007


Alasdair G Kergon <agk at redhat.com> wrote:
> On Wed, Oct 03, 2007 at 09:46:58AM -0000, meyering at sourceware.org wrote:
>> 	* tools/fsadm/Makefile.in (LVMLIBS): Define.
>> 	(fsadm): Link with $(LVMLIBS).
>
>>  fsadm: $(OBJECTS)
>> -	$(CC) -o $@ $(CFLAGS) $(OBJECTS) -rdynamic
>> +	$(CC) -o $@ $(CFLAGS) $(OBJECTS) $(LDFLAGS) $(LVMLIBS) -rdynamic
>
> fsadm is meant to be independent of LVM2 so should not be using LVMLIBS.
> What should be done to deal with this?

Ok.
A few ways to do that:

    Move last_path_component from util.c to an independent header and
    make it a static inline function, then simply include it from fsadm.c.

    Add a Makefile rule that extracts the definition from util.c,
    and perhaps adding #include <string.h>,
    and making the function static inline.

    A couple more.  but I have to run.




More information about the lvm-devel mailing list