Skip to content
Open
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
14 changes: 14 additions & 0 deletions autoconf/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
FROM debian

RUN apt-get update && apt-get install -y \
autoconf \
build-essential \
ca-certificates \
curl \
git \
libtool \
pkg-config \
wget \
;

ENTRYPOINT ["autoconf"]
11 changes: 11 additions & 0 deletions autoconf/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# autoconf

This build step provides a container with the build-essentials and autoconf
packages installed. It is intended for running automake targets. Git is included
as well since autoconf scripts tend to read git status for baking version info
into programs.

It is capable of running simple GCC builds, but the primary use is in conjuction
with other containers as part of a Google Container Builder configuration.

The entrypoint for this container is autoconf.
10 changes: 10 additions & 0 deletions autoconf/cloudbuild.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# In this directory, run the following command to build this builder.
# $ gcloud builds submit . --config=cloudbuild.yaml

steps:
- name: 'gcr.io/cloud-builders/docker'
args: ['build', '-t', 'gcr.io/$PROJECT_ID/autoconf', '.']

images:
- 'gcr.io/$PROJECT_ID/autoconf'
tags: ['cloud-builders-community']
2 changes: 2 additions & 0 deletions autoconf/examples/Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
bin_PROGRAMS = hello
hello_SOURCES = hello.c
18 changes: 18 additions & 0 deletions autoconf/examples/cloudbuild.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# In this directory, run the following command to build this builder.
# $ gcloud builds submit . --config=cloudbuild.yaml

steps:
- name: gcr.io/$PROJECT_ID/autoconf
entrypoint: aclocal
- name: gcr.io/$PROJECT_ID/autoconf
entrypoint: autoheader
- name: gcr.io/$PROJECT_ID/autoconf
entrypoint: autoconf
- name: gcr.io/$PROJECT_ID/autoconf
entrypoint: automake
args: ["--add-missing", "--copy"]
- name: gcr.io/$PROJECT_ID/autoconf
script: ./configure
- name: gcr.io/$PROJECT_ID/autoconf
script: "make && ./hello"
tags: ["cloud-builders-community"]
24 changes: 24 additions & 0 deletions autoconf/examples/configure.ac
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
AC_INIT([hello], [1.0], [your-email@example.com])
AM_INIT_AUTOMAKE([-Wall -Werror foreign])
AC_CONFIG_SRCDIR([hello.c])
AC_CONFIG_HEADERS([config.h])

# Checks for programs.
AC_PROG_CC

# Optional feature (example)
AC_ARG_ENABLE([greeting],
[AS_HELP_STRING([--enable-greeting],
[enable a more verbose greeting])],
[enable_greeting=$enableval],
[enable_greeting=no])

if test "x$enable_greeting" = "xyes"; then
AC_DEFINE([ENABLE_GREETING], [1], [Define to enable the verbose greeting.])
fi

# Output files to generate
AC_CONFIG_FILES([Makefile])

# Output summary of configuration
AC_OUTPUT
11 changes: 11 additions & 0 deletions autoconf/examples/hello.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#include <stdio.h>
#include "config.h" // For PACKAGE and VERSION

int main() {
#ifdef ENABLE_GREETING
printf("%s %s!\n", PACKAGE, VERSION);
#else
printf("Hello, World!\n");
#endif
return 0;
}