Skip to content

Commit

Permalink
use MKDIR_P and INSTALL from autoconf
Browse files Browse the repository at this point in the history
  • Loading branch information
James K. Lowden committed Jan 17, 2012
1 parent 22f466e commit affe72b
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 18 deletions.
6 changes: 5 additions & 1 deletion ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
Mon Jan 16 22:45:41 EST 2012 JK Lowden <jklowden@freetds.org>
* configure.ac doc/Makefile.am
- use MKDIR_P and INSTALL from autoconf

Sun Jan 15 19:27:20 EST 2012 JK Lowden <jklowden@freetds.org>
* src/odbc/odbc.c
- removed bogus test from _SQLRowCount, cf. ML.
Expand Down Expand Up @@ -1005,4 +1009,4 @@ Sat Apr 9 16:15:00 EDT 2011 JK Lowden <jklowden@freetds.org>
* ChangeLog-0.91 added because of release

$FreeTDS$
$Id: ChangeLog,v 1.3442 2012-01-17 03:43:56 jklowden Exp $
$Id: ChangeLog,v 1.3443 2012-01-17 03:46:35 jklowden Exp $
15 changes: 13 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
dnl Process this file with autoconf to produce a configure script.

dnl ------------------------------------------------------------
dnl $Id: configure.ac,v 1.70 2011-11-07 09:56:24 freddy77 Exp $
dnl $Id: configure.ac,v 1.71 2012-01-17 03:46:35 jklowden Exp $
dnl If you're trying to create a new configure test, try
dnl
dnl http://autogen.sourceforge.net/conftest.html
Expand All @@ -15,7 +15,7 @@ dnl ------------------------------------------------------------
AC_INIT(FreeTDS, 0.92.dev.esyscmd(printf $(date +"%Y%m%d")))
AC_CONFIG_SRCDIR(src/dblib/dblib.c)
AC_PREREQ(2.53)
AC_REVISION($Revision: 1.70 $)
AC_REVISION($Revision: 1.71 $)

AM_INIT_AUTOMAKE([dist-bzip2])
AC_CONFIG_HEADERS(include/config.h)
Expand All @@ -37,6 +37,17 @@ AC_SUBST(MINOR)
AC_SUBST(SUBVERSION)
AC_SUBST(BUILD_NUMBER)

# ------------------------------------------------------------
# Commands and Utilities
# ------------------------------------------------------------
AC_PROG_AWK
AC_PROG_GREP
AC_PROG_INSTALL
AC_PROG_MKDIR_P
AC_PROG_LN_S
AC_PROG_RANLIB
AC_PROG_SED

# ------------------------------------------------------------
# Host-specific configuration
# ------------------------------------------------------------
Expand Down
28 changes: 13 additions & 15 deletions doc/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Converting DocBook to HTML (several small files)
# http://www.freebsd.org/tutorials/docproj-primer/x3132.html#AEN3140

# $Id: Makefile.am,v 1.67 2012-01-16 00:27:04 jklowden Exp $
# $Id: Makefile.am,v 1.68 2012-01-17 03:46:35 jklowden Exp $

SHELL = /bin/sh
TXT2MAN = $(srcdir)/txt2man
Expand Down Expand Up @@ -120,13 +120,13 @@ datacopy.1: datacopy.txt
install-data-local: $(INSTALLDIRS) $(noinst_DATA)
$(MKDIR_P) $(DOCDIR) 2>&1
if test -r $(DOCDIR)/userguide ; then d=.; else d="$(srcdir)"; fi; \
find $$d/$(DOCDIR)/userguide \( -type f -o -type l \) -exec \
$(INSTALL) {} $(TARGET_DOCDIR)/userguide ';'
find $$d/$(DOCDIR)/userguide \( -type f -o -type l \) \
-exec $(INSTALL) {} $(TARGET_DOCDIR)/userguide ';'
if test -r $(DOCDIR)/reference ; then d=.; else d="$(srcdir)"; fi; \
find $$d/$(DOCDIR)/reference \( -type f -o -type l \) -exec \
$(INSTALL) {} $(TARGET_DOCDIR)/reference ';'
cd $(srcdir) && find images -name \*.gif -exec \
$(INSTALL) {} $(TARGET_DOCDIR)/{} ';'
find $$d/$(DOCDIR)/reference \( -type f -o -type l \) \
-exec $(INSTALL) {} $(TARGET_DOCDIR)/reference ';'
find $(srcdir)/images -name \*.gif \
-exec $(INSTALL) {} $(TARGET_DOCDIR)/images/ ';'

uninstall-local:
rm -rf $(TARGET_DOCDIR)
Expand Down Expand Up @@ -171,7 +171,7 @@ $(DOCDIR)/userguide/index.htm: $(DOCDIR) userguide.sgml userguide.dsl.in api_st
fi; \
fi
# try jade ...
cd $(DOCDIR)/userguide && \
(cd $(DOCDIR)/userguide && \
if test -n "${DOCBOOK_DSL}" ; then \
## The crazy path is due to the above 'cd' command
SRCDOC=../../../$(srcdir); \
Expand All @@ -181,7 +181,7 @@ $(DOCDIR)/userguide/index.htm: $(DOCDIR) userguide.sgml userguide.dsl.in api_st
if test -h userguide.sgml; then rm userguide.sgml; fi; \
## and copy the stylesheet
cp $${SRCDOC}/userguide.css .; \
fi
fi)
# if still no joy, create a stub
@echo pwd is $$(pwd)
-ls -ld $$(dirname $@) $@
Expand All @@ -191,7 +191,7 @@ $(DOCDIR)/userguide/index.htm: $(DOCDIR) userguide.sgml userguide.dsl.in api_st
mv .index.htm $@; \
fi
test -f $(DOCDIR)/userguide/index.htm
cd $(DOCDIR)/userguide && if test ! -h index.html ; then ln -s index.htm index.html; fi
(cd $(DOCDIR)/userguide && if test ! -h index.html ; then ln -s index.htm index.html; fi)
# for convenience, create a link in the build directory
if test -h userguide; then rm userguide; fi
ln -sf $(DOCDIR)/userguide userguide
Expand All @@ -202,20 +202,18 @@ reference: $(DOCDIR)/reference/index.html
DISTRIBUTED_REF_DIR = $(srcdir)/$(DOCDIR)/reference

$(DOCDIR)/reference/index.html: $(top_srcdir)/ChangeLog
### $(mkinstalldirs) $(DOCDIR) 2>&1
$(MKDIR_P) $(DOCDIR)/reference 2>&1
cd .. && $(MAKE) doxy 2> doc/doxy.log
(cd .. && $(MAKE) doxy 2> doc/doxy.log)
# if "make doxy" doesn't create anything, try to copy the distributed manual's HTML
if test -r $(DISTRIBUTED_REF_DIR)/index.html -a ! $@ ; then \
cp -R $(DISTRIBUTED_REF_DIR) $(DOCDIR); \
fi
# if we don't find the source, generate a stub
### $(mkinstalldirs) $(DOCDIR)/reference 2>&1
if test ! -r $@ ; then \
cd $(DOCDIR)/reference && \
(cd $(DOCDIR)/reference && \
echo '<html><P>at <a HREF="http://www.freetds.org/reference/">www.freetds.org</a></html>' \
> .index.html && \
mv .index.html index.html; \
mv .index.html index.html); \
fi
# for convenience, create a link in the build directory
if test -h reference; then rm reference; fi
Expand Down

0 comments on commit affe72b

Please sign in to comment.