summaryrefslogtreecommitdiff
authorkergoth <kergoth>2003-01-24 01:09:11 (UTC)
committer kergoth <kergoth>2003-01-24 01:09:11 (UTC)
commitfdf29b4b01231c746f7697365fcd7bd57d154365 (patch) (side-by-side diff)
tree309306f501beb67a0267fa2b925a3fdaadbd6f2a
parent3de1877c4c39c3cc99848204da8e32fc6e3d9efb (diff)
downloadopie-fdf29b4b01231c746f7697365fcd7bd57d154365.zip
opie-fdf29b4b01231c746f7697365fcd7bd57d154365.tar.gz
opie-fdf29b4b01231c746f7697365fcd7bd57d154365.tar.bz2
Add debug to config system. enabling/disabling this option alters a toplevel gen.pro file, which alters the CONFIG parameter in the .pro files. In this way you can enable/disable debug builds globally via the config system.
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--Rules.make12
-rw-r--r--config.in4
-rw-r--r--include.pro2
3 files changed, 17 insertions, 1 deletions
diff --git a/Rules.make b/Rules.make
index 1e4b205..11bfa55 100644
--- a/Rules.make
+++ b/Rules.make
@@ -5,2 +5,12 @@ $(configs) :
+$(TOPDIR)/gen.pro : $(TOPDIR)/.config
+ echo > $@
+ifneq ($(CONFIG_DEBUG),)
+ echo CONFIG += debug >> $@
+ echo CONFIG -= release >> $@
+else
+ echo CONFIG -= debug >> $@
+ echo CONFIG += release >> $@
+endif
+
$(TOPDIR)/.depends : $(shell if [ -e $(TOPDIR)/config.in ]\; then echo $(TOPDIR)/config.in\; fi\;) $(TOPDIR)/.config $(TOPDIR)/packages
@@ -14,3 +24,3 @@ $(TOPDIR)/.depends : $(shell if [ -e $(TOPDIR)/config.in ]\; then echo $(TOPDIR)
cat $(TOPDIR)/packages | grep -v '^#' | \
- perl -ne '($$cfg, $$dir, $$pro) = $$_ =~ /^(\S+)\s+(\S+)\s+(\S+)/; if ( -e "$$dir/$$pro" ) { print "$$dir/Makefile : $$dir/$$pro \$$(QMAKE)\n\t\$$(call makefilegen,\$$@)\n\n"; }' \
+ perl -ne '($$cfg, $$dir, $$pro) = $$_ =~ /^(\S+)\s+(\S+)\s+(\S+)/; if ( -e "$$dir/$$pro" ) { print "$$dir/Makefile : $$dir/$$pro \$$(QMAKE) \$$(OPIEDIR)/gen.pro\n\t\$$(call makefilegen,\$$@)\n\n"; }' \
>> $(TOPDIR)/.depends
diff --git a/config.in b/config.in
index 8559e73..97e1e80 100644
--- a/config.in
+++ b/config.in
@@ -40,2 +40,6 @@ config OPTIMIZE
+config DEBUG
+ boolean "Enable debug builds"
+ default "n"
+
config SPECFILE
diff --git a/include.pro b/include.pro
index da2da04..4f1144f 100644
--- a/include.pro
+++ b/include.pro
@@ -70 +70,3 @@ QMAKE_LFLAGS += -Wl,-rpath=$$prefix/lib
QMAKE_LIBDIR += $(OPIEDIR)/lib
+
+include ( $(OPIEDIR)/gen.pro )