Clean up autoconf install to obey DESTDIR

This commit is contained in:
Keith Packard 2002-05-24 06:25:52 +00:00
parent 3673201215
commit ed2547b858
5 changed files with 123 additions and 69 deletions

View File

@ -1,5 +1,5 @@
#
# $XFree86: xc/lib/fontconfig/Makefile.in,v 1.2 2002/05/21 17:48:15 keithp Exp $
# $XFree86: xc/lib/fontconfig/Makefile.in,v 1.4 2002/05/24 05:19:30 keithp Exp $
#
# Copyright © 2002 Keith Packard, member of The XFree86 Project, Inc.
#
@ -31,40 +31,65 @@ DIRS = src fc-cache fc-list fontconfig
all install clean::
for d in $(DIRS); do $(MAKE) -C $$d $@; done
#
# create fonts.conf file
#
all:: fonts.conf
fonts.conf: fonts.conf.in
rm -f $@
sh ./setfontdirs $(FC_DEFAULT_FONTS) $(X_FONT_DIR)
install:: $(CONFDIR)/fonts.conf $(CONFDIR)/fonts.dtd
$(CONFDIR)/fonts.conf:: fonts.conf
if [ -f $@ ]; then \
echo "Not overwriting existing $@"; \
else \
$(INSTALL_DATA) fonts.conf $(CONFDIR); \
fi
$(CONFDIR)/fonts.dtd:: fonts.dtd
$(INSTALL_DATA) fonts.dtd $(CONFDIR)
clean::
rm -f fonts.conf
install:: $(BINDIR)/fontconfig-config
#
# installation directories
#
all:: fontconfig-config
install:: $(DESTDIR)$(CONFDIR) $(DESTDIR)$(BINDIR)
install:: $(DESTDIR)$(LIBDIR) $(DESTDIR)$(LIBDIR)/pkgconfig
$(BINDIR)/fontconfig-config: fontconfig-config
$(INSTALL_SCRIPT) $< $(BINDIR)
install:: $(LIBDIR)/pkgconfig $(LIBDIR)/pkgconfig/fontconfig.pc
$(LIBDIR)/pkgconfig:
$(DESTDIR)$(CONFDIR):
mkdir -p $@
all:: fontconfig.pc
$(DESTDIR)$(BINDIR):
mkdir -p $@
$(LIBDIR)/pkgconfig/fontconfig.pc: fontconfig.pc
$(INSTALL_DATA) $< $(LIBDIR)/pkgconfig
$(DESTDIR)$(LIBDIR):
mkdir -p $@
$(DESTDIR)$(LIBDIR)/pkgconfig:
mkdir -p $@
#
# install config files
#
install:: $(DESTDIR)$(CONFDIR)/fonts.conf $(DESTDIR)$(CONFDIR)/fonts.dtd
$(DESTDIR)$(CONFDIR)/fonts.conf:: fonts.conf
if [ -f $@ ]; then \
echo "Not overwriting existing $@"; \
else \
$(INSTALL_DATA) fonts.conf $(DESTDIR)$(CONFDIR); \
fi
$(DESTDIR)$(CONFDIR)/fonts.dtd:: fonts.dtd
$(INSTALL_DATA) fonts.dtd $(DESTDIR)$(CONFDIR)
#
# install fontconfig-config script
#
install:: $(DESTDIR)$(BINDIR)/fontconfig-config
$(DESTDIR)$(BINDIR)/fontconfig-config: fontconfig-config
$(INSTALL_SCRIPT) $< $(DESTDIR)$(BINDIR)
#
# install pkgconfig control file
#
install:: $(DESTDIR)$(LIBDIR)/pkgconfig/fontconfig.pc
$(DESTDIR)$(LIBDIR)/pkgconfig/fontconfig.pc: fontconfig.pc
$(INSTALL_DATA) $< $(DESTDIR)$(LIBDIR)/pkgconfig

View File

@ -1,5 +1,5 @@
#
# $XFree86: xc/lib/fontconfig/fc-cache/Makefile.in,v 1.1 2002/05/21 17:06:21 keithp Exp $
# $XFree86: xc/lib/fontconfig/fc-cache/Makefile.in,v 1.2 2002/05/21 17:48:15 keithp Exp $
#
# Copyright © 2002 Keith Packard, member of The XFree86 Project, Inc.
#
@ -34,15 +34,20 @@ PROG=fc-cache
all:: $(PROG)
install:: $(BINDIR)/$(PROG)
$(BINDIR)/$(PROG): $(PROG)
$(INSTALL_PROGRAM) $(PROG) $(BINDIR)
clean::
rm -f $(PROG) $(OBJS)
$(PROG): $(OBJS)
$(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBFONTCONFIG)
$(OBJS): $(HEADERS)
install:: $(DESTDIR)$(BINDIR)
$(DESTDIR)$(BINDIR):
mkdir -p $@
install:: $(DESTDIR)$(BINDIR)/$(PROG)
$(DESTDIR)$(BINDIR)/$(PROG): $(PROG)
$(INSTALL_PROGRAM) $(PROG) $(DESTDIR)$(BINDIR)
clean::
rm -f $(PROG) $(OBJS)

View File

@ -1,5 +1,5 @@
#
# $XFree86: xc/lib/fontconfig/fc-list/Makefile.in,v 1.1 2002/05/21 17:06:21 keithp Exp $
# $XFree86: xc/lib/fontconfig/fc-list/Makefile.in,v 1.2 2002/05/21 17:48:15 keithp Exp $
#
# Copyright © 2002 Keith Packard, member of The XFree86 Project, Inc.
#
@ -34,15 +34,21 @@ PROG=fc-list
all:: $(PROG)
install:: $(BINDIR)/$(PROG)
$(BINDIR)/$(PROG): $(PROG)
$(INSTALL_PROGRAM) $(PROG) $(BINDIR)
clean::
rm -f $(PROG) $(OBJS)
$(PROG): $(OBJS)
$(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBFONTCONFIG)
$(OBJS): $(HEADERS)
install:: $(DESTDIR)$(BINDIR)
$(DESTDIR)$(BINDIR):
mkdir -p $@
install:: $(DESTDIR)$(BINDIR)/$(PROG)
$(DESTDIR)$(BINDIR)/$(PROG): $(PROG)
$(INSTALL_PROGRAM) $(PROG) $(DESTDIR)$(BINDIR)
clean::
rm -f $(PROG) $(OBJS)

View File

@ -1,5 +1,5 @@
#
# $XFree86: xc/lib/fontconfig/fc-list/Makefile.in,v 1.1 2002/05/21 17:06:21 keithp Exp $
# $XFree86: xc/lib/fontconfig/fontconfig/Makefile.in,v 1.1 2002/05/22 22:59:41 keithp Exp $
#
# Copyright © 2002 Keith Packard, member of The XFree86 Project, Inc.
#
@ -28,21 +28,21 @@ include $(TOPDIR)/config/Makedefs
all::
install:: $(INCLUDEDIR)
install:: $(INCLUDEDIR)/fcfreetype.h
install:: $(INCLUDEDIR)/fcprivate.h
install:: $(INCLUDEDIR)/fontconfig.h
install:: $(DESTDIR)$(INCLUDEDIR)
install:: $(DESTDIR)$(INCLUDEDIR)/fcfreetype.h
install:: $(DESTDIR)$(INCLUDEDIR)/fcprivate.h
install:: $(DESTDIR)$(INCLUDEDIR)/fontconfig.h
$(INCLUDEDIR):
$(DESTDIR)$(INCLUDEDIR):
mkdir -p $@
$(INCLUDEDIR)/fcfreetype.h: fcfreetype.h
$(INSTALL_DATA) $< $(INCLUDEDIR)
$(DESTDIR)$(INCLUDEDIR)/fcfreetype.h: fcfreetype.h
$(INSTALL_DATA) $< $(DESTDIR)$(INCLUDEDIR)
$(INCLUDEDIR)/fcprivate.h: fcprivate.h
$(INSTALL_DATA) $< $(INCLUDEDIR)
$(DESTDIR)$(INCLUDEDIR)/fcprivate.h: fcprivate.h
$(INSTALL_DATA) $< $(DESTDIR)$(INCLUDEDIR)
$(INCLUDEDIR)/fontconfig.h: fontconfig.h
$(INSTALL_DATA) $< $(INCLUDEDIR)
$(DESTDIR)$(INCLUDEDIR)/fontconfig.h: fontconfig.h
$(INSTALL_DATA) $< $(DESTDIR)$(INCLUDEDIR)
clean::

View File

@ -1,5 +1,5 @@
#
# $XFree86: xc/lib/fontconfig/src/Makefile.in,v 1.2 2002/05/21 17:48:15 keithp Exp $
# $XFree86: xc/lib/fontconfig/src/Makefile.in,v 1.3 2002/05/22 04:12:35 keithp Exp $
#
# Copyright © 2002 Keith Packard, member of The XFree86 Project, Inc.
#
@ -71,20 +71,9 @@ OBJS=fcatomic.@OBJEXT@ \
all:: $(LIBFILE) $(LIBMAJOR) $(LIBBASE)
install:: $(LIBDIR)/$(LIB) $(LIBDIR)/$(LIBMAJOR) $(LIBDIR)/$(LIBBASE)
$(LIBDIR)/$(LIBFILE): $(LIBFILE)
$(INSTALL_PROGRAM) $< $(LIBDIR)
$(LIBDIR)/$(LIBMAJOR): $(LIBDIR)/$(LIBFILE)
$(LN_S) $(LIBDIR)/$(LIBFILE) $(LIBDIR)/$(LIBMAJOR)
$(LIBDIR)/$(LIBBASE): $(LIBDIR)/$(LIBMAJOR)
$(LN_S) $(LIBDIR)/$(LIBMAJOR) $(LIBDIR)/$(LIBBASE)
clean::
rm -f $(LIBFILE) $(LIBMAJOR) $(LIBBASE) $(OBJS)
#
# build the library and the various version links
#
$(LIBFILE): $(OBJS)
rm -f $@
$(MKSHLIB) $(OBJS) $(LIBS)
@ -98,3 +87,32 @@ $(LIBBASE): $(LIBMAJOR)
$(LN_S) $(LIBMAJOR) $(LIBBASE)
$(OBJS): fcint.h $(HEADERS)
#
# install directories
#
install:: $(DESTDIR)$(LIBDIR)
$(DESTDIR)$(LIBDIR):
mkdir -p $@
#
# install library
#
install:: $(DESTDIR)$(LIBDIR)/$(LIB) $(DESTDIR)$(LIBDIR)/$(LIBMAJOR)
install:: $(DESTDIR)$(LIBDIR)/$(LIBBASE)
$(DESTDIR)$(LIBDIR)/$(LIBFILE): $(LIBFILE)
$(INSTALL_PROGRAM) $< $(DESTDIR)$(LIBDIR)
$(DESTDIR)$(LIBDIR)/$(LIBMAJOR): $(DESTDIR)$(LIBDIR)/$(LIBFILE)
rm -f $(DESTDIR)$(LIBDIR)/$(LIBMAJOR)
$(LN_S) $(LIBFILE) $(DESTDIR)$(LIBDIR)/$(LIBMAJOR)
$(DESTDIR)$(LIBDIR)/$(LIBBASE): $(DESTDIR)$(LIBDIR)/$(LIBMAJOR)
rm -f $(DESTDIR)$(LIBDIR)/$(LIBBASE)
$(LN_S) $(LIBMAJOR) $(DESTDIR)$(LIBDIR)/$(LIBBASE)
clean::
rm -f $(LIBFILE) $(LIBMAJOR) $(LIBBASE) $(OBJS)