|
From: <tim...@en...> - 2006-06-17 06:56:50
|
Ethan A Merritt wrote:
> I'm having my own battle with 'make distcheck', with regard to the
> recently added X-Resources file. I've put lines in .../share/Makefile.=
am
>
> install-data-local:
> $(mkinstalldirs) $(DESTDIR)$(XRESOURCEPATH)
> if test -d $(DESTDIR)$(XRESOURCEPATH) && test -w $(DESTDIR)$(XR=
ESOURCEPATH); then \
> $(INSTALL_DATA) Gnuplot.app-defaults $(DESTDIR)$(XRESOURCEPAT=
H)/Gnuplot \
> ; fi
>
> However, this doesn't work during 'make distcheck' becuase $(DESTDIR) i=
s
> not being expanded. Why not? It seems to expand correctly for the sim=
ilar
> lines in .../term/Makefile.am
>
> install-data-local:
> $(mkinstalldirs) $(DESTDIR)$(GNUPLOT_PS_DIR)
> $(INSTALL_DATA) $(srcdir)/PostScript/*.ps $(DESTDIR)$(GNUPLOT_P=
S_DIR)
>
> Why does the latter get expanded to
> =09
> /bin/sh ../../mkinstalldirs /home/merritt/cvs/gnuplot-cvs/gnuplot-4.=
1.0/_inst/share/gnuplot/4.1/PostScript
>
> While the former gets expanded to
>
> /bin/sh ../../mkinstalldirs /usr/lib/X11/app-defaults
> =20
I don't really know why one works while the other does not, but at least=20
here is an interesting part of 'info autoconf', searching for 'DESTDIR' :
My package needs to install some configuration file. I tried to use
the following rule, but `make distcheck' fails. Why?
# Do not do this.
install-data-local:
$(INSTALL_DATA) $(srcdir)/afile $(DESTDIR)/etc/afile
(...)
`make distcheck' fails because they are installing files to=20
hard-coded paths. In the later
case the path is not really hard-coded in the package, but we can
consider it to be hard-coded in the system (or in whichever tool that
supplies the path). As long as the path does not use any of the
standard directory variables (`$(prefix)', `$(bindir)', `$(datadir)',
etc.), the effect will be the same: user-installations are impossible.
(...)
Now, there are some easy solutions.
The above `install-data-local' example for installing `/etc/afile'
would be better replaced by
sysconf_DATA =3D afile
by default `sysconfdir' will be `$(prefix)/etc', because this is what
the GNU Standards require. When such a package is installed on a FHS
compliant system, the installer will have to set `--sysconfdir=3D/etc=
'.
As the maintainer of the package you should not be concerned by such
site policies: use the appropriate standard directory variable to
install your files so that installer can easily redefine these
variables to match their site conventions.
________
So this does not explain why it works for term/Makefile.am, but it tells=20
you that they expect you to use the two following lines instead of the=20
custom install rules using $( DESTDIR) :
xresourcedir =3D $(*libdir*)/X11/app-defaults/Gnuplot
xresource_DATA =3D Gnuplot.app-defaults
Timoth=E9e
|