Skip to content

Instantly share code, notes, and snippets.

@AndreaRigoni
Created June 21, 2017 14:21
Show Gist options
  • Save AndreaRigoni/57d72b5f867c3a205963c989852fef56 to your computer and use it in GitHub Desktop.
Save AndreaRigoni/57d72b5f867c3a205963c989852fef56 to your computer and use it in GitHub Desktop.
Read data from m4 into a variable
VARIABLE=variable
AC_INIT([test], 1.0)
AC_DEFUN([prova],
$ $$ \$ "" ${VARIABLE}
# commento
)
AC_DEFUN([AS_VAR_READ],[
read -r -d '' $1 << _as_read_EOF
AS_ESCAPE($2,[`$])
_as_read_EOF
])
AS_VAR_READ([PR],[
prova
$ $$ \$ "" ${VARIABLE}
# commento
])
AS_ECHO("$PR")
exit 0;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment