apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Trawick <traw...@gmail.com>
Subject Re: make_tools_dir target in Makefile.in
Date Thu, 24 Apr 2014 21:05:00 GMT
On Thu, Apr 24, 2014 at 4:16 PM, Yann Ylavic <ylavic.dev@gmail.com> wrote:

> On Thu, Apr 24, 2014 at 9:08 PM, Jeff Trawick <trawick@gmail.com> wrote:
> > On Tue, Apr 22, 2014 at 5:15 AM, Yann Ylavic <ylavic.dev@gmail.com>
> wrote:
> >>
> >> Index: Makefile.in
> >> ===================================================================
> >> --- Makefile.in    (revision 1589047)
> >> +++ Makefile.in    (working copy)
> >> @@ -53,7 +53,7 @@
> >>
> >>  CLEAN_TARGETS = apr-config.out apr.exp exports.c export_vars.c
> .make.dirs
> >> \
> >>      build/apr_rules.out tools/gen_test_char@EXEEXT@ \
> >> -    tools/gen_test_char.o tools/gen_test_char.lo \
> >> +    tools/gen_test_char.o tools/gen_test_char.lo tools/.made \
> >>      include/private/apr_escape_test_char.h
> >>  DISTCLEAN_TARGETS = config.cache config.log config.status \
> >>      include/apr.h include/arch/unix/apr_private.h \
> >
> >
> > That would need the dummy file to be cleaned up (hardly a problem :) )
>
> Yes ;)
>
> >
> > Here's an alternative...
> >
> > Index: Makefile.in
> > ===================================================================
> > --- Makefile.in (revision 1587538)
> > +++ Makefile.in (working copy)
> > @@ -161,11 +161,11 @@
> >  etags:
> >   etags `find . -name '*.[ch]'`
> >
> > -make_tools_dir:
> > +OBJECTS_gen_test_char = tools/gen_test_char.lo $(LOCAL_LIBS)
> > +tools/gen_test_char.lo: tools/gen_test_char.c
> >   $(APR_MKDIR) tools
> > + $(LT_COMPILE)
> >
> > -OBJECTS_gen_test_char = tools/gen_test_char.lo $(LOCAL_LIBS)
> > -tools/gen_test_char.lo: make_tools_dir
> >  tools/gen_test_char@EXEEXT@: $(OBJECTS_gen_test_char)
> >   $(LINK_PROG) $(OBJECTS_gen_test_char) $(ALL_LIBS)
> >
>
> This is indeed much better without the stamp (along with cleanup,
> ignore(s)...).
>
> But since tools/gen_test_char.c exists after all, how about simpy :
>
> Index: Makefile.in
> ===================================================================
> --- Makefile.in    (revision 1589047)
> +++ Makefile.in    (working copy)
> @@ -161,11 +161,7 @@
>  etags:
>      etags `find . -name '*.[ch]'`
>
> -make_tools_dir:
> -    $(APR_MKDIR) tools
> -
>  OBJECTS_gen_test_char = tools/gen_test_char.lo $(LOCAL_LIBS)
> -tools/gen_test_char.lo: make_tools_dir
>  tools/gen_test_char@EXEEXT@: $(OBJECTS_gen_test_char)
>      $(LINK_PROG) $(OBJECTS_gen_test_char) $(ALL_LIBS)
>
> ?
>
> Either tools/gen_test_char.lo (hence tools/gen_test_char.c) exists, or
> no "No rule to make target `tools/gen_test_char.lo', needed by
> `tools/gen_test_char'" raises, or I am missing something...
>

This is to support an out of tree build.

e.g.,

mkdir apr-build
cd apr-build
/path/to/apr/configure --prefix=whatever --yada && make

The tools directory has to get created in the build tree.  The other
directories get created elsewhere (??) but gen_test_char has special rules.

-- 
Born in Roswell... married an alien...
http://emptyhammock.com/
http://edjective.org/

Mime
View raw message