112 lines
5.7 KiB
Text
112 lines
5.7 KiB
Text
$NetBSD: patch-Makefile.in,v 1.2 2015/03/21 01:06:49 tnn Exp $
|
|
|
|
Add DESTDIR support to xmlada
|
|
|
|
--- Makefile.in.orig 2013-06-30 18:36:28.000000000 +0000
|
|
+++ Makefile.in
|
|
@@ -83,72 +83,65 @@ run_test_valgrind: test
|
|
cd dom/test; valgrind --tool=memcheck --leak-check=full ./testxml -auto
|
|
|
|
docs: force
|
|
- -${MAKE} -e -C docs html latexpdf
|
|
+ -${MAKE} -e -C docs html
|
|
|
|
# Rule for installing the modules
|
|
%_inst: force
|
|
- ${CP} $*/*.ad[bs] ${includedir}/xmlada
|
|
- cd $*; ls *.ad[bs] > ${prefix}/lib/gnat/xmlada/xmlada_$*.lgpr
|
|
- -cd ${xmllib}; ${CHMOD} ugo+w *.ali
|
|
- -${CP} $*/lib/${LIBRARY_TYPE}/*.ali ${xmllib}
|
|
- ${RM} ${libdir}/libxmlada_$**
|
|
- ${RM} ${xmllib}libxmlada_$**
|
|
+ ${CP} $*/*.ad[bs] ${DESTDIR}${includedir}/xmlada
|
|
+ cd $*; ls *.ad[bs] > ${DESTDIR}${prefix}/lib/gnat/xmlada/xmlada_$*.lgpr
|
|
+ -cd ${DESTDIR}${xmllib}; ${CHMOD} ugo+w *.ali
|
|
+ -${CP} $*/lib/${LIBRARY_TYPE}/*.ali ${DESTDIR}${xmllib}
|
|
+ ${RM} ${DESTDIR}${libdir}/libxmlada_$**
|
|
+ ${RM} ${DESTDIR}${xmllib}libxmlada_$**
|
|
ifeq (${LIBRARY_TYPE},static)
|
|
- ${INSTALL} $*/lib/${LIBRARY_TYPE}/libxmlada_$*.a ${xmllib}
|
|
+ ${INSTALL} $*/lib/${LIBRARY_TYPE}/libxmlada_$*.a ${DESTDIR}${xmllib}
|
|
else
|
|
-ifeq (${LIBEXT},.dll)
|
|
- ${INSTALL} $*/lib/${LIBRARY_TYPE}/libxmlada_$*${LIBEXT} ${xmllib}
|
|
- cd ${bindir}; ${CP} ${libdir}/xmlada/${LIBRARY_TYPE}/libxmlada_$*${LIBEXT} libxmlada_$*${LIBEXT}
|
|
-else
|
|
- ${INSTALL} $*/lib/${LIBRARY_TYPE}/libxmlada_$*${LIBEXT}.${VERSION} ${xmllib}
|
|
+ ${INSTALL} $*/lib/${LIBRARY_TYPE}/libxmlada_$*${LIBEXT}.${VERSION} ${DESTDIR}${xmllib}
|
|
|
|
@# prefix/lib/xmlada/relocatable/libxmlada.so -> libxmlada.so.4.4.0w
|
|
- cd ${xmllib}; ${LN_S} libxmlada_$*${LIBEXT}.${VERSION} libxmlada_$*${LIBEXT}
|
|
+ cd ${DESTDIR}${xmllib}; ${LN_S} libxmlada_$*${LIBEXT}.${VERSION} libxmlada_$*${LIBEXT}
|
|
|
|
@# prefix/lib/xmlada/relocatable/libxmlada.so.4.4 -> libxmlada.so.4.4.0w
|
|
- -cd ${xmllib}; ${LN_S} libxmlada_$*${LIBEXT}.${VERSION} libxmlada_$*${LIBEXT}.${basename ${VERSION}}
|
|
+ -cd ${DESTDIR}${xmllib}; ${LN_S} libxmlada_$*${LIBEXT}.${VERSION} libxmlada_$*${LIBEXT}.${basename ${VERSION}}
|
|
|
|
@# prefix/lib/xmlada/relocatable/libxmlada.so.4 -> libxmlada.so.4.4.0w
|
|
ifneq (${basename ${basename ${VERSION}}},${basename ${VERSION}})
|
|
- cd ${xmllib}; ${LN_S} libxmlada_$*${LIBEXT}.${VERSION} libxmlada_$*${LIBEXT}.${basename ${basename ${VERSION}}}
|
|
+ cd ${DESTDIR}${xmllib}; ${LN_S} libxmlada_$*${LIBEXT}.${VERSION} libxmlada_$*${LIBEXT}.${basename ${basename ${VERSION}}}
|
|
|
|
@# prefix/lib/libxmlada.so.4 -> prefix/lib/xmlada/relocatable/libxmlada.so.4.4.0w
|
|
- cd ${libdir}; ${LN_S} xmlada/${LIBRARY_TYPE}/libxmlada_$*${LIBEXT}.${VERSION} libxmlada_$*${LIBEXT}.${basename ${basename ${VERSION}}}
|
|
+ cd ${DESTDIR}${libdir}; ${LN_S} xmlada/${LIBRARY_TYPE}/libxmlada_$*${LIBEXT}.${VERSION} libxmlada_$*${LIBEXT}.${basename ${basename ${VERSION}}}
|
|
endif
|
|
|
|
@# prefix/lib/libxmlada.so.4.4 -> prefix/lib/xmlada/relocatable/libxmlada.so.4.4.0w
|
|
- -cd ${libdir}; ${LN_S} xmlada/${LIBRARY_TYPE}/libxmlada_$*${LIBEXT}.${VERSION} libxmlada_$*${LIBEXT}.${basename ${VERSION}}
|
|
+ -cd ${DESTDIR}${libdir}; ${LN_S} xmlada/${LIBRARY_TYPE}/libxmlada_$*${LIBEXT}.${VERSION} libxmlada_$*${LIBEXT}.${basename ${VERSION}}
|
|
|
|
@# prefix/lib/libxmlada.so.4.4.0w -> prefix/lib/xmlada/relocatable/libxmlada.so.4.4.0w
|
|
- -cd ${libdir}; ${LN_S} xmlada/${LIBRARY_TYPE}/libxmlada_$*${LIBEXT}.${VERSION} libxmlada_$*${LIBEXT}.${VERSION}
|
|
-endif
|
|
+ -cd ${DESTDIR}${libdir}; ${LN_S} xmlada/${LIBRARY_TYPE}/libxmlada_$*${LIBEXT}.${VERSION} libxmlada_$*${LIBEXT}.${VERSION}
|
|
endif
|
|
- cd ${xmllib}; ${CHMOD} ugo-w *.ali
|
|
+ cd ${DESTDIR}${xmllib}; ${CHMOD} ugo-w *.ali
|
|
|
|
install_dirs: force
|
|
- @${MKDIR} ${bindir}
|
|
- @${MKDIR} ${xmllib}
|
|
- @${MKDIR} ${prefix}/lib/gnat/xmlada
|
|
- @${MKDIR} ${libdir}
|
|
- @${MKDIR} ${datadir}/doc/xmlada
|
|
- @${MKDIR} ${includedir}/xmlada
|
|
- @${MKDIR} ${datadir}/gps/plug-ins/
|
|
+ @${MKDIR} ${DESTDIR}${bindir}
|
|
+ @${MKDIR} ${DESTDIR}${xmllib}
|
|
+ @${MKDIR} ${DESTDIR}${prefix}/lib/gnat/xmlada
|
|
+ @${MKDIR} ${DESTDIR}${libdir}
|
|
+ @${MKDIR} ${DESTDIR}${datadir}/doc/xmlada
|
|
+ @${MKDIR} ${DESTDIR}${includedir}/xmlada
|
|
+ @${MKDIR} ${DESTDIR}${datadir}/gps/plug-ins/
|
|
|
|
## Do the installation for either shared or static, depending on
|
|
## $LIBRARY_TYPE
|
|
install_library_type: install_dirs ${MODULE_INSTALL}
|
|
- ${INSTALL} distrib/xmlada_shared.gpr ${prefix}/lib/gnat/
|
|
- ${INSTALL} distrib/xmlada.gpr ${prefix}/lib/gnat/
|
|
- ${INSTALL} distrib/xmlada_dom.gpr ${prefix}/lib/gnat/
|
|
- ${INSTALL} distrib/xmlada_sax.gpr ${prefix}/lib/gnat/
|
|
- ${INSTALL} distrib/xmlada_input.gpr ${prefix}/lib/gnat/
|
|
- ${INSTALL} distrib/xmlada_schema.gpr ${prefix}/lib/gnat/
|
|
- ${INSTALL} distrib/xmlada_unicode.gpr ${prefix}/lib/gnat/
|
|
- ${INSTALL} xmlada-config ${bindir}
|
|
- -$(CP) -r docs/_build/html/* $(datadir)/doc/xmlada/ 2>/dev/null
|
|
- -$(CP) -r docs/_build/latex/XMLAda.pdf $(datadir)/doc/xmlada/ 2>/dev/null
|
|
- ${CHMOD} +x ${bindir}/xmlada-config
|
|
- ${INSTALL} distrib/xmlada_gps.py ${datadir}/gps/plug-ins/
|
|
+ ${BSD_INSTALL_DATA} distrib/xmlada_shared.gpr ${DESTDIR}${prefix}/lib/gnat/
|
|
+ ${BSD_INSTALL_DATA} distrib/xmlada.gpr ${DESTDIR}${prefix}/lib/gnat/
|
|
+ ${BSD_INSTALL_DATA} distrib/xmlada_dom.gpr ${DESTDIR}${prefix}/lib/gnat/
|
|
+ ${BSD_INSTALL_DATA} distrib/xmlada_sax.gpr ${DESTDIR}${prefix}/lib/gnat/
|
|
+ ${BSD_INSTALL_DATA} distrib/xmlada_input.gpr ${DESTDIR}${prefix}/lib/gnat/
|
|
+ ${BSD_INSTALL_DATA} distrib/xmlada_schema.gpr ${DESTDIR}${prefix}/lib/gnat/
|
|
+ ${BSD_INSTALL_DATA} distrib/xmlada_unicode.gpr ${DESTDIR}${prefix}/lib/gnat/
|
|
+ ${BSD_INSTALL_SCRIPT} xmlada-config ${DESTDIR}${bindir}
|
|
+ -$(CP) -r docs/_build/html/* ${DESTDIR}$(datadir)/doc/xmlada/
|
|
+ ${BSD_INSTALL_DATA} distrib/xmlada_gps.py ${DESTDIR}${datadir}/gps/plug-ins/
|
|
|
|
## Do the installation for an explicit target
|
|
install_static:
|