Skip to content

Commit

Permalink
initial version of autotool-ized build system
Browse files Browse the repository at this point in the history
  • Loading branch information
tony2001 committed May 13, 2008
1 parent df77e3e commit c4807e1
Show file tree
Hide file tree
Showing 8 changed files with 7,165 additions and 428 deletions.
2 changes: 2 additions & 0 deletions Makefile.am
@@ -0,0 +1,2 @@
AUTOMAKE_OPTIONS=foreign no-dependencies
SUBDIRS=src include
37 changes: 37 additions & 0 deletions build.mk
@@ -0,0 +1,37 @@

SUPPRESS_WARNINGS = 2>&1 | (egrep -v '(AC_TRY_RUN called without default to allow cross compiling|AC_PROG_CXXCPP was called before AC_PROG_CXX|defined in acinclude.m4 but never used|AC_PROG_LEX invoked multiple times|AC_DECL_YYTEXT is expanded from...|the top level)'||true)

AUTOCONF ?= 'autoconf'
ACLOCAL ?= 'aclocal'
AUTOHEADER ?= 'autoheader'
AUTOMAKE ?= 'automake'
AUTOUPDATE ?= 'autoupdate'

config_h_in = src/hpdf_config.h.in
targets = $(config_h_in) configure makefiles

all: $(targets)

aclocal.m4:
$(ACLOCAL)

$(config_h_in): configure
@echo rebuilding $@
@rm -f $@
$(AUTOHEADER) $(SUPPRESS_WARNINGS)

configure: aclocal.m4 configure.in
@echo rebuilding $@
$(AUTOUPDATE)
$(AUTOCONF) $(SUPPRESS_WARNINGS)

makefiles: configure Makefile.am src/Makefile.am
@echo rebuilding Makefile.in files
$(AUTOMAKE) --add-missing --copy

cvsclean:
@rm -rf src/*.lo src/*.la src/*.o src/*.a src/.libs src/Makefile src/Makefile.in include/Makefile include/Makefile.in
rm -rf src/stamp-h1 src/test include/hpdf_config.h* include/stamp-h1
rm -rf aclocal.m4 autom4te.cache install.sh libtool Makefile Makefile.in 'configure.in~' missing config.h* configure
rm -f config.guess config.log config.status config.sub cscope.out install-sh

38 changes: 38 additions & 0 deletions buildconf.sh
@@ -0,0 +1,38 @@
#!/bin/sh

eval `grep '^HPDF_EXTRA_VERSION=' configure.in`
case "$HPDF_EXTRA_VERSION" in
*-dev)
rebuildok=1
;;
*)
rebuildok=0
;;
esac

cvsclean=0

while test $# -gt 0; do
if test "$1" = "--force"; then
rebuildok=1
echo "Forcing buildconf"
fi
if test "$1" = "--clean"; then
cvsclean=1
fi
shift
done

if test "$rebuildok" = "0"; then
echo "You should not run buildconf in a release package."
echo "use buildconf --force to override this check."
exit 1
fi

if test "$cvsclean" = "1"; then
echo "Cleaning autogenerated files"
${MAKE:-make} -s -f build.mk cvsclean
else
${MAKE:-make} -s -f build.mk
fi

0 comments on commit c4807e1

Please sign in to comment.