Fix build for branches without tags
authorNelson Ferreira <nelson.ferreira@ieee.org>
Mon, 5 Mar 2012 22:43:17 +0000 (17:43 -0500)
committerNelson Ferreira <nelson.ferreira@ieee.org>
Mon, 5 Mar 2012 22:43:17 +0000 (17:43 -0500)
* autogen.sh (emacs_is_beta): Correct the text for branches
without the release tags...

* lib-src/make-dump-id.c: Include the config.h from the proper
directory. This was not an issue for a long time, since there was
always a tag when under git control. make-dump-id was only
compiled then. Now in autogen.sh we will always make sure there is
a tree version, so this will no longer be an issue again.

Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
autogen.sh
lib-src/make-dump-id.c

index 4b2ee13..03fb91a 100755 (executable)
@@ -52,14 +52,21 @@ emacs_is_beta=t
 if test -n "$GIT" -a -n "$($GIT symbolic-ref HEAD 2>/dev/null)"; then
        TREE_VERSION="$($GIT tag|tail -n1|tr -d v)"
        GIT_VERSION="$($GIT describe | head -n1)"
+       GIT_BRANCH="$(git branch --no-color | awk '/^\*/ { print $2 }')"
        IN_GIT="1"
 fi
 if test -z "$TREE_VERSION"; then
        TREE_VERSION="$EXPECTED_TREE_VERSION"
        if test -n "$IN_GIT"; then
-           echo "If you cloned this branch into your own you should issue:"
+           echo "If you cloned this branch into your own you could issue:"
            echo "\tgit tag -s v${TREE_VERSION}.<your branch_name>"
-           echo "\tgit push --tag"
+           echo ""
+           echo "Be careful about pushing the tags as they probably will be "
+           echo "more of a nuisance..."
+           echo ""
+           TREE_VERSION="$EXPECTED_TREE_VERSION.$GIT_BRANCH"
+           echo "For now I am assuming the tre version will be $TREE_VERSION"
+           echo ""
        fi
 fi
 if test -z "$GIT_VERSION"; then
index 30c38a4..e85e8a3 100644 (file)
@@ -16,7 +16,7 @@ GNU General Public License for more details.
 You should have received a copy of the GNU General Public License
 along with this program.  If not, see <http://www.gnu.org/licenses/>. */
 
-#include <config.h>
+#include "../src/config.h"
 #include <stdio.h>
 #include <stdlib.h>
 #include "../src/systime.h"