summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2009-01-09 23:15:27 +0000
committerDaniel Stenberg <daniel@haxx.se>2009-01-09 23:15:27 +0000
commit4ef890ecee474daca9dc9ee13fdaec3c4bdb4d4e (patch)
treea6d278b5895d0eac184a0e7b9482d705f021c950 /tools
parentd2321971d351b407fa842ef9d5af428de468ed83 (diff)
downloadrockbox-4ef890ecee474daca9dc9ee13fdaec3c4bdb4d4e.tar.gz
rockbox-4ef890ecee474daca9dc9ee13fdaec3c4bdb4d4e.tar.bz2
rockbox-4ef890ecee474daca9dc9ee13fdaec3c4bdb4d4e.zip
'make reconf' is now a first stab at re-running configure with the same setup
that generated the existing Makefile git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19739 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'tools')
-rwxr-xr-xtools/configure20
-rw-r--r--tools/root.make4
2 files changed, 21 insertions, 3 deletions
diff --git a/tools/configure b/tools/configure
index 459dd9c7a9..fc12c312c1 100755
--- a/tools/configure
+++ b/tools/configure
@@ -2061,13 +2061,13 @@ case $modelname in
;;
esac
if [ "1" != `parse_args --type` ]; then
- option=`parse_args --type`;
+ btype=`parse_args --type`;
else
echo "Build (N)ormal, (A)dvanced, (S)imulator, (B)ootloader, $gdbstub(M)anual: (Defaults to N)"
- option=`input`;
+ btype=`input`;
fi
- case $option in
+ case $btype in
[Ii])
appsdir='\$(ROOTDIR)/bootloader'
apps="bootloader"
@@ -2150,6 +2150,7 @@ fi
exit 8
fi
debug=""
+ btype="N" # set it explicitly since RET only gets here as well
echo "Normal build selected"
;;
@@ -2388,6 +2389,16 @@ if test "$apps" = "apps"; then
buildlangs="langs"
fi
+#### Fix the cmdline ###
+if test -n "$ccache"; then
+ cmdline="--ccache"
+fi
+
+cmdline="$cmdline --target=\$(MODELNAME) --ram=\$(MEMORYSIZE) --rbdir=\$(RBDIR) --type=$btype"
+
+
+### end of cmdline
+
sed > Makefile \
-e "s,@ROOTDIR@,${rootdir},g" \
-e "s,@DEBUG@,${debug},g" \
@@ -2450,6 +2461,7 @@ sed > Makefile \
-e "s,@LANGS@,${buildlangs},g" \
-e "s,@USE_ELF@,${USE_ELF},g" \
-e "s,@RBDIR@,${rbdir},g" \
+ -e "s,@CMDLINE@,$cmdline,g" \
<<EOF
## Automatically generated. http://www.rockbox.org/
@@ -2514,6 +2526,8 @@ export ENCODER=@ENCODER@
export USE_ELF=@USE_ELF@
export RBDIR=@RBDIR@
+CONFIGURE_OPTIONS=@CMDLINE@
+
include \$(TOOLSDIR)/root.make
EOF
diff --git a/tools/root.make b/tools/root.make
index 001d216d0f..5d2cea5567 100644
--- a/tools/root.make
+++ b/tools/root.make
@@ -291,6 +291,7 @@ help:
@echo "voicetools - builds the voice tools only"
@echo "install - installs your build (for simulator builds only, no fonts)"
@echo "fullinstall - installs your build (for simulator builds only, with fonts)"
+ @echo "reconf - rerun configure with the same selection"
### general compile rules:
@@ -311,3 +312,6 @@ $(BUILDDIR)/%.o: $(ROOTDIR)/%.S
%.o: %.S
$(SILENT)mkdir -p $(dir $@)
$(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) $(CFLAGS) -c $< -o $@
+
+reconf:
+ $(SILENT)$(TOOLSDIR)/configure $(CONFIGURE_OPTIONS)