diff options
author | kientzle <kientzle@FreeBSD.org> | 2006-03-08 01:56:06 +0000 |
---|---|---|
committer | kientzle <kientzle@FreeBSD.org> | 2006-03-08 01:56:06 +0000 |
commit | 101c7b294b2df1618ed60b110ea7e87e673daa00 (patch) | |
tree | 5a5f87eda55df5c7cd88b37896d26d228a3c8ee3 /lib/libarchive/Makefile | |
parent | 85c8b06cbe7efe55ca9d6a18d623fa181f29b4b3 (diff) | |
download | FreeBSD-src-101c7b294b2df1618ed60b110ea7e87e673daa00.zip FreeBSD-src-101c7b294b2df1618ed60b110ea7e87e673daa00.tar.gz |
Remove configure.ac.in and reorganize a few other things. This is
part of a program to remove the non-FreeBSD autoconf/automake build
system for libarchive from the FreeBSD source tree.
Diffstat (limited to 'lib/libarchive/Makefile')
-rw-r--r-- | lib/libarchive/Makefile | 118 |
1 files changed, 27 insertions, 91 deletions
diff --git a/lib/libarchive/Makefile b/lib/libarchive/Makefile index a677044..2c4bc2fd 100644 --- a/lib/libarchive/Makefile +++ b/lib/libarchive/Makefile @@ -1,40 +1,24 @@ # $FreeBSD$ -# This Makefile is for use with the FreeBSD buid system. For -# non-FreeBSD systems, you should first "make distfile" on FreeBSD, -# then use the resulting tar.gz archive--which contains a portable -# autoconf/automake-generated build system--on the other system. - LIB= archive DPADD= ${LIBBZ2} ${LIBZ} LDADD= -lbz2 -lz -# Versioning <sigh>. There are three distinct sets of version -# numbers: -# * libarchive version -# * libtool version (for shared libs built using configure script) -# * FreeBSD SHLIB_MAJOR -# The following logic helps ensure that there is some consistency across -# these three: - -# First, the libarchive version is in three parts: -# Bumped ONLY when API/ABI breakage happens (non-backwards-compatible change). -ARCHIVE_API_MAJOR= 1 -# Bumped when significant new features are added. -# Also used to bump SHLIB_MAJOR for reasons other than API/ABI breakage. -# Note: Do NOT reset this to zero after bumping ARCHIVE_API_MAJOR! -ARCHIVE_API_MINOR= 2 -# Bumped often. ;-) -ARCHIVE_API_REVISION= 37 -# Full libarchive version combines the above three numbers. -VERSION= ${ARCHIVE_API_MAJOR}.${ARCHIVE_API_MINOR}.${ARCHIVE_API_REVISION} +# The libarchive version stamp. +# Version is three numbers: +# Major: Bumped ONLY when API/ABI breakage happens. +# Minor: Bumped when significant new features are added (see SHLIB_MAJOR) +# Revision: Bumped on any notable change +VERSION= 1.2.41 +ARCHIVE_API_MAJOR!= echo ${VERSION} | sed -e 's/\..*//' +ARCHIVE_API_MINOR!= echo ${VERSION} | sed -e 's/[0-9]*\.//' | sed -e 's/\..*//' # The FreeBSD SHLIB_MAJOR is computed from the above values. +# To bump SHLIB_MAJOR, increase the MINOR number in "version" file. SHLIB_MAJOR!= echo $$((${ARCHIVE_API_MAJOR} + ${ARCHIVE_API_MINOR})) - -# The SHLIB_MAJOR computation above helps ensure that the libtool -# version (computed in configure.ac.in) provides the same -# shared library number as is used on FreeBSD. +# The SHLIB_MAJOR computation above attempts to match the +# version number generated by libtool. (This may change +# when the FreeBSD port of libtool gets fixed.) CFLAGS+= -DPACKAGE_NAME=\"lib${LIB}\" CFLAGS+= -DPACKAGE_VERSION=\"${VERSION}\" @@ -50,8 +34,21 @@ WARNS?= 6 # Headers to be installed in /usr/include INCS= archive.h archive_entry.h -# C sources to be compiled. This is one part of SRCS below. -BASE_SRCS= archive_check_magic.c \ +# Build archive.h from archive.h.in by substituting version information. +archive.h: archive.h.in Makefile + cat ${.CURDIR}/archive.h.in | \ + sed 's/@VERSION@/${VERSION}/g' | \ + sed 's/@SHLIB_MAJOR@/${SHLIB_MAJOR}/g' | \ + sed 's/@ARCHIVE_API_MAJOR@/${ARCHIVE_API_MAJOR}/g' | \ + sed 's/@ARCHIVE_API_MINOR@/${ARCHIVE_API_MINOR}/g' | \ + cat > archive.h + +# archive.h needs to be cleaned +CLEANFILES+= archive.h + +# Sources to be compiled. +SRCS= archive.h \ + archive_check_magic.c \ archive_entry.c \ archive_read.c \ archive_read_data_into_buffer.c \ @@ -86,11 +83,6 @@ BASE_SRCS= archive_check_magic.c \ archive_write_set_format_shar.c \ archive_write_set_format_ustar.c -# Note: archive.h does need to be in SRCS, since it is built -# from archive.h.in. But it does not get included in DIST_FILES -# below, so I build up SRCS in two steps. -SRCS= ${BASE_SRCS} archive.h - # Man pages to be installed. MAN= archive_entry.3 \ archive_read.3 \ @@ -203,60 +195,4 @@ MLINKS+= archive_write.3 archive_write_set_format_shar.3 MLINKS+= archive_write.3 archive_write_set_format_ustar.3 MLINKS+= libarchive.3 archive.3 -# Build archive.h from archive.h.in by substituting version information. -archive.h: archive.h.in Makefile - cat ${.CURDIR}/archive.h.in | \ - sed 's/@VERSION@/${VERSION}/g' | \ - sed 's/@SHLIB_MAJOR@/${SHLIB_MAJOR}/g' | \ - sed 's/@ARCHIVE_API_MAJOR@/${ARCHIVE_API_MAJOR}/g' | \ - sed 's/@ARCHIVE_API_MINOR@/${ARCHIVE_API_MINOR}/g' | \ - sed 's/@ARCHIVE_API_REVISION@/${ARCHIVE_API_REVISION}/g' | \ - cat > archive.h - -# archive.h needs to be cleaned -CLEANFILES+= archive.h - -# -# Voodoo for building a distfile that uses autoconf/automake/etc. -# - -# Files that just get copied to the distfile build directory -DIST_WORK_DIR= ${.OBJDIR}/lib${LIB}-${VERSION} -CLEANDIRS+= ${DIST_WORK_DIR} -DISTFILE= lib${LIB}-${VERSION}.tar.gz -# DIST_FILES is the list of files to include in the distribution. -DIST_FILES= ${BASE_SRCS} -DIST_FILES+= ${MAN} -DIST_FILES+= archive.h.in -DIST_FILES+= archive_entry.h archive_platform.h -DIST_FILES+= archive_private.h archive_string.h -DIST_FILES+= Makefile.am - -distfile: - rm -rf ${DIST_WORK_DIR} - mkdir ${DIST_WORK_DIR} - # Copy the DIST_FILES; ignore errors, don't preserve permissions. - for f in ${DIST_FILES}; do \ - cat ${.CURDIR}/$$f >${DIST_WORK_DIR}/$$f || true; \ - done - # Build configure.ac from configure.ac.in - cat ${.CURDIR}/configure.ac.in | \ - sed 's/@VERSION@/${VERSION}/g' | \ - sed 's/@SHLIB_MAJOR@/${SHLIB_MAJOR}/g' | \ - sed 's/@ARCHIVE_API_MAJOR@/${ARCHIVE_API_MAJOR}/g' | \ - sed 's/@ARCHIVE_API_MINOR@/${ARCHIVE_API_MINOR}/g' | \ - sed 's/@ARCHIVE_API_REVISION@/${ARCHIVE_API_REVISION}/g' | \ - cat > ${DIST_WORK_DIR}/configure.ac - # Prepare some auxiliary files. - (cd ${DIST_WORK_DIR} && libtoolize) - (cd ${DIST_WORK_DIR} && aclocal && autoheader) - # Build the configure script and portable Makefile - (cd ${DIST_WORK_DIR} && autoconf && automake -a --foreign) - # Now, use automake-generated Makefile to build the final dist file. - (cd ${DIST_WORK_DIR} && ./configure && make distcheck && make dist) - mv ${DIST_WORK_DIR}/${DISTFILE} ${.OBJDIR} - @echo ================================================== - @echo Created ${.OBJDIR}/${DISTFILE} - @echo ================================================== - .include <bsd.lib.mk> |