[Expat-discuss] Latest CVS expat sources on Cygwin

Gerrit P. Haase gp@familiehaase.de
Sun May 19 12:33:02 2002


> building expat (from a checkout today) works without problems.
> Doing make install doesn't work if building outside of the
> sourcedir which is a requirement to be 'modern';)

> These hardcoded targets in Makefile.in doesn't allow doing a
> 'make install' outside the sourcedir:

> install: xmlwf/xmlwf lib/$(LIBRARY) lib/$(APIHEADER)
>         $(mkinstalldirs) $(bindir) $(libdir) $(includedir)
>         $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) xmlwf/xmlwf $(bindir)/xmlwf
>         $(LIBTOOL) --mode=install $(INSTALL) lib/$(LIBRARY) $(libdir)/$(LIBRARY)
>         $(INSTALL_DATA) lib/$(APIHEADER) $(includedir)
>         $(INSTALL_DATA) doc/xmlwf.1 $(prefix)/man/man1

> And also it is not possible to install into a special directory
> Should look more like this:

> install: xmlwf/xmlwf lib/$(LIBRARY) $(srcdir)/lib/$(APIHEADER)
>         $(mkinstalldirs) $(DESTDIR)$(bindir) $(DESTDIR)$(libdir) \
>             $(DESTDIR)$(includedir) $(DESTDIR)$(mandir)
>         $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) xmlwf/xmlwf $(DESTDIR)$(bindir)/xmlwf
>         $(LIBTOOL) --mode=install $(INSTALL) lib/$(LIBRARY) $(DESTDIR)$(libdir)/$(LIBRARY)
>         $(INSTALL_DATA) $(srcdir)/lib/$(APIHEADER) $(DESTDIR)$(includedir)
>         $(INSTALL_DATA) $(srcdir)/doc/xmlwf.1 $(DESTDIR)$(mandir)/man/man1

Naah, this is completely wrong, ok:
define in the Makefile:

bindir = ${exec_prefix}/bin
libdir = ${prefix}/lib
includedir = ${prefix}/include
mandir = ${prefix}/man/man1

and then the last line of install target:
    $(INSTALL_DATA) $(srcdir)/doc/xmlwf.1 $(mandir)

The $(DESTDIR) isn't needed then if I use:
make install prefix=/blah/usr exec_prefix=/blah/user

> You're already using autoconf and libtool, why don't you use automake
> too?  That would handle all that stuff.


> Gerrit
-- 
=^..^=

--