Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Autotools #1011

Merged
merged 12 commits into from
Sep 22, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 57 additions & 18 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,25 +1,64 @@
Makefile
Makefile.in
ABOUT-NLS
compile
config.guess
config.h
motion
motion.init-Debian
motion.init-FreeBSD.sh
motion.service
motion.spec
motion-dist.conf
camera1-dist.conf
camera2-dist.conf
camera3-dist.conf
camera4-dist.conf
config.h.in
config.h.in~
config.log
config.rpath
config.status
config.sub
configure
autom4te.cache
aclocal.m4
depcomp
install-sh
m4/
missing
stamp-h1

#data
data/motion.service
data/motion-dist.conf
data/camera1-dist.conf
data/camera2-dist.conf
data/camera3-dist.conf
data/camera4-dist.conf

# automake
*.o
#src
src/*.o
src/motion
src/Makefile
src/Makefile.in
src/.deps/
src/Makefile
src/Makefile.in
src/raspicam/*.o
src/raspicam/.dirstamp
src/raspicam/.deps/
*.log
.depend
autom4te.cache
aclocal.m4
config.status
configure
config.h.in

#po
po/*.mo
.vscode/
po/*.gmo
po/Makefile
po/Makefile.in
po/Makefile.in.in
po/Makevars.template
po/POTFILES
po/Rules-quot
po/boldquot.sed
po/en@boldquot.header
po/en@quot.header
po/insert-header.sin
po/quot.sed
po/motion.pot
po/remove-potcdate.sed
po/remove-potcdate.sin
po/stamp-po

.vscode/

27 changes: 17 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ before_script:
- if [ $TRAVIS_OS_NAME = osx ]; then
brew upgrade ffmpeg pkg-config jpeg libmicrohttpd;
brew install ffmpeg pkg-config libjpeg libmicrohttpd;
export PATH="/usr/local/opt/gettext/bin:/usr/local/bin:$PATH";
autoreconf -fiv;
elif [ "$BUILD_IMAGE" = "14.04" ]; then
autoreconf -fiv;
Expand All @@ -67,37 +68,43 @@ before_script:
docker exec $(docker ps -aq) /bin/sh -c 'autoreconf -fiv';
elif [ "$DOCKER_IMAGE" = "debian:buster" ]; then
docker exec $(docker ps -aq) /bin/bash -c 'apt-get -qq update';
docker exec $(docker ps -aq) /bin/bash -c 'apt-get install -y build-essential libjpeg62-turbo-dev libzip-dev autoconf automake pkgconf libtool git';
docker exec $(docker ps -aq) /bin/bash -c 'apt-get install -y build-essential libjpeg62-turbo-dev libzip-dev autoconf automake autopoint pkgconf libtool git';
docker exec $(docker ps -aq) /bin/bash -c 'apt-get install -y libavformat-dev libavcodec-dev libavutil-dev libswscale-dev libavdevice-dev';
docker exec $(docker ps -aq) /bin/bash -c 'apt-get install -y libsqlite3-dev libpq-dev libwebp-dev libmicrohttpd-dev gettext';
docker exec $(docker ps -aq) /bin/bash -c 'apt-get install -y libsqlite3-dev libpq-dev libmariadbclient-dev libwebp-dev libmicrohttpd-dev gettext';
docker exec $(docker ps -aq) /bin/bash -c 'autoreconf -fiv';
elif [ "$DOCKER_IMAGE" = "debian:stretch" ]; then
docker exec $(docker ps -aq) /bin/bash -c 'apt-get -qq update';
docker exec $(docker ps -aq) /bin/bash -c 'apt-get install -y build-essential libjpeg62-turbo-dev libzip-dev autoconf automake pkgconf libtool git';
docker exec $(docker ps -aq) /bin/bash -c 'apt-get install -y build-essential libjpeg62-turbo-dev libzip-dev autoconf automake autopoint pkgconf libtool git';
docker exec $(docker ps -aq) /bin/bash -c 'apt-get install -y libavformat-dev libavcodec-dev libavutil-dev libswscale-dev libavdevice-dev';
docker exec $(docker ps -aq) /bin/bash -c 'apt-get install -y libsqlite3-dev libpq-dev default-libmysqlclient-dev libwebp-dev libmicrohttpd-dev gettext';
docker exec $(docker ps -aq) /bin/bash -c 'apt-get install -y libsqlite3-dev libpq-dev libmariadbclient-dev libwebp-dev libmicrohttpd-dev gettext';
docker exec $(docker ps -aq) /bin/bash -c 'autoreconf -fiv';
elif [ "$DOCKER_IMAGE" = "debian:jessie" ]; then
docker exec $(docker ps -aq) /bin/bash -c 'apt-get -qq update';
docker exec $(docker ps -aq) /bin/bash -c 'apt-get install -y build-essential libjpeg62-turbo-dev libzip-dev autoconf automake pkgconf libtool git';
docker exec $(docker ps -aq) /bin/bash -c 'apt-get install -y build-essential libjpeg62-turbo-dev libzip-dev autoconf automake autopoint pkgconf libtool git';
docker exec $(docker ps -aq) /bin/bash -c 'apt-get install -y libavformat-dev libavcodec-dev libavutil-dev libswscale-dev libavdevice-dev';
docker exec $(docker ps -aq) /bin/bash -c 'apt-get install -y libsqlite3-dev libpq-dev libmysqlclient-dev libwebp-dev libmicrohttpd-dev gettext';
docker exec $(docker ps -aq) /bin/bash -c 'autoreconf -fiv';
elif [ "x$DOCKER_IMAGE" != "x" ]; then
elif [ "$DOCKER_IMAGE" = "ubuntu:16.04" ]; then
docker exec $(docker ps -aq) /bin/bash -c 'apt-get -qq update';
docker exec $(docker ps -aq) /bin/bash -c 'apt-get install -y build-essential libjpeg8-dev libzip-dev autoconf automake pkgconf libtool git';
docker exec $(docker ps -aq) /bin/bash -c 'apt-get install -y build-essential libjpeg8-dev libzip-dev autoconf automake autopoint pkgconf libtool git';
docker exec $(docker ps -aq) /bin/bash -c 'apt-get install -y libavformat-dev libavcodec-dev libavutil-dev libswscale-dev libavdevice-dev';
docker exec $(docker ps -aq) /bin/bash -c 'apt-get install -y libsqlite3-dev libpq-dev libmysqlclient-dev libwebp-dev libmicrohttpd-dev gettext';
docker exec $(docker ps -aq) /bin/bash -c 'autoreconf -fiv';
elif [ "x$DOCKER_IMAGE" != "x" ]; then
docker exec $(docker ps -aq) /bin/bash -c 'apt-get -qq update';
docker exec $(docker ps -aq) /bin/bash -c 'apt-get install -y build-essential libjpeg8-dev libzip-dev autoconf automake autopoint pkgconf libtool git';
docker exec $(docker ps -aq) /bin/bash -c 'apt-get install -y libavformat-dev libavcodec-dev libavutil-dev libswscale-dev libavdevice-dev';
docker exec $(docker ps -aq) /bin/bash -c 'apt-get install -y libsqlite3-dev libpq-dev libmariadbclient-dev libwebp-dev libmicrohttpd-dev gettext';
docker exec $(docker ps -aq) /bin/bash -c 'autoreconf -fiv';
fi;

script:
- if [ $TRAVIS_OS_NAME = osx ]; then
./configure --with-developer-flags && make;
elif [ "$BUILD_IMAGE" = "14.04" ]; then
./test_builds.sh;
./configure && make check;
elif [ "$DOCKER_IMAGE" = "alpine:latest" ]; then
docker exec $(docker ps -aq) /bin/sh -c './test_builds.sh';
docker exec $(docker ps -aq) /bin/sh -c './configure && make check';
elif [ "x$DOCKER_IMAGE" != "x" ]; then
docker exec $(docker ps -aq) /bin/bash -c './test_builds.sh';
docker exec $(docker ps -aq) /bin/bash -c './configure && make check';
fi;
2 changes: 0 additions & 2 deletions FAQ

This file was deleted.

86 changes: 86 additions & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
ACLOCAL_AMFLAGS = -I m4

SUBDIRS = src po man

sysconfdir = @sysconfdir@/$(PACKAGE)
sysconf_DATA = \
data/motion-dist.conf \
data/camera1-dist.conf \
data/camera2-dist.conf \
data/camera3-dist.conf \
data/camera4-dist.conf

man_MANS = man/motion.1

docdir = $(datadir)/doc/@PACKAGE@
doc_DATA = \
doc/mask1.png \
doc/normal.jpg \
doc/outputmotion1.jpg \
doc/outputnormal1.jpg \
doc/motion_guide.html \
doc/motion_stylesheet.css \
doc/COPYING \
doc/CREDITS \
doc/motion_build.html \
doc/motion_config.html

###################################################################
## Create pristine directories to match exactly distributed files
###################################################################
cleanall: distclean
@rm -rf autom4te.cache m4
@rm -f config.h.in config.h.in~ aclocal.m4 config.sub ABOUT-NLS missing
@rm -f compile config.guess config.rpath configure depcomp install-sh
@rm -f po/en@boldquot.header po/en@quot.header po/insert-header.sin
@rm -f po/Makevars.template po/quot.sed po/remove-potcdate.sin
@rm -f po/Rules-quot po/stamp-po po/*.gmo po/motion.pot po/boldquot.sed
@rm -f Makefile.in src/Makefile.in po/Makefile.in.in man/Makefile.in
@rm -f data/motion.service data/motion-dist.conf
@rm -f data/camera1-dist.conf data/camera2-dist.conf
@rm -f data/camera3-dist.conf data/camera4-dist.conf

###################################################################
## Clean out the tilde crumb files left by gettext autotool processing
###################################################################
all-local:
@rm -f po/*.po\~

###################################################################
## Update contents of sample files with the correct directory
###################################################################
install-data-local:
@sed -e 's|$${prefix}|$(prefix)|' ${sysconfdir}/motion-dist.conf > ${sysconfdir}/motion-dist.conf.tmp && mv -f ${sysconfdir}/motion-dist.conf.tmp ${sysconfdir}/motion-dist.conf
@sed -e 's|$${prefix}|$(prefix)|' ${sysconfdir}/camera1-dist.conf > ${sysconfdir}/camera1-dist.conf.tmp && mv -f ${sysconfdir}/camera1-dist.conf.tmp ${sysconfdir}/camera1-dist.conf
@sed -e 's|$${prefix}|$(prefix)|' ${sysconfdir}/camera2-dist.conf > ${sysconfdir}/camera2-dist.conf.tmp && mv -f ${sysconfdir}/camera2-dist.conf.tmp ${sysconfdir}/camera2-dist.conf
@sed -e 's|$${prefix}|$(prefix)|' ${sysconfdir}/camera3-dist.conf > ${sysconfdir}/camera3-dist.conf.tmp && mv -f ${sysconfdir}/camera3-dist.conf.tmp ${sysconfdir}/camera3-dist.conf
@sed -e 's|$${prefix}|$(prefix)|' ${sysconfdir}/camera4-dist.conf > ${sysconfdir}/camera4-dist.conf.tmp && mv -f ${sysconfdir}/camera4-dist.conf.tmp ${sysconfdir}/camera4-dist.conf

@sed -e 's|$${exec_prefix}|$(exec_prefix)|' data/motion.service > data/motion.service.tmp && mv -f data/motion.service.tmp data/motion.service

@sed -e 's|$${prefix}|$(prefix)|' data/motion-dist.conf > data/motion-dist.conf.tmp && mv -f data/motion-dist.conf.tmp data/motion-dist.conf
@sed -e 's|$${prefix}|$(prefix)|' data/camera1-dist.conf > data/camera1-dist.conf.tmp && mv -f data/camera1-dist.conf.tmp data/camera1-dist.conf
@sed -e 's|$${prefix}|$(prefix)|' data/camera2-dist.conf > data/camera2-dist.conf.tmp && mv -f data/camera2-dist.conf.tmp data/camera2-dist.conf
@sed -e 's|$${prefix}|$(prefix)|' data/camera3-dist.conf > data/camera3-dist.conf.tmp && mv -f data/camera3-dist.conf.tmp data/camera3-dist.conf
@sed -e 's|$${prefix}|$(prefix)|' data/camera4-dist.conf > data/camera4-dist.conf.tmp && mv -f data/camera4-dist.conf.tmp data/camera4-dist.conf

check:
./configure --with-prototype-flags && $(MAKE) clean && $(MAKE)
./configure --with-prototype-flags --without-mariadb && $(MAKE) clean && $(MAKE)
./configure --with-prototype-flags --without-ffmpeg && $(MAKE) clean && $(MAKE)
./configure --with-prototype-flags --without-mysql && $(MAKE) clean && $(MAKE)
./configure --with-prototype-flags --without-mariadb && $(MAKE) clean && $(MAKE)
./configure --with-prototype-flags --without-sqlite3 && $(MAKE) clean && $(MAKE)
./configure --with-prototype-flags --without-pgsql && $(MAKE) clean && $(MAKE)
./configure --with-prototype-flags --without-v4l2 && $(MAKE) clean && $(MAKE)
./configure --with-prototype-flags --without-webp && $(MAKE) clean && $(MAKE)
./configure --with-developer-flags \
--without-mysql \
--without-mariadb \
&& $(MAKE) clean && $(MAKE)
./configure --with-developer-flags \
--without-mysql \
--without-mariadb \
--without-sqlite3 \
--without-pgsql \
&& $(MAKE) clean && $(MAKE)
Loading