summaryrefslogtreecommitdiff
authorkergoth <kergoth>2003-01-24 01:09:11 (UTC)
committer kergoth <kergoth>2003-01-24 01:09:11 (UTC)
commitfdf29b4b01231c746f7697365fcd7bd57d154365 (patch) (unidiff)
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
@@ -3,6 +3,16 @@
3$(configs) : 3$(configs) :
4 $(call makecfg,$@) 4 $(call makecfg,$@)
5 5
6$(TOPDIR)/gen.pro : $(TOPDIR)/.config
7 echo > $@
8ifneq ($(CONFIG_DEBUG),)
9 echo CONFIG += debug >> $@
10 echo CONFIG -= release >> $@
11else
12 echo CONFIG -= debug >> $@
13 echo CONFIG += release >> $@
14endif
15
6$(TOPDIR)/.depends : $(shell if [ -e $(TOPDIR)/config.in ]\; then echo $(TOPDIR)/config.in\; fi\;) $(TOPDIR)/.config $(TOPDIR)/packages 16$(TOPDIR)/.depends : $(shell if [ -e $(TOPDIR)/config.in ]\; then echo $(TOPDIR)/config.in\; fi\;) $(TOPDIR)/.config $(TOPDIR)/packages
7 @echo Generating dependency information... 17 @echo Generating dependency information...
8# add to subdir-y, and add descend rules 18# add to subdir-y, and add descend rules
@@ -12,7 +22,7 @@ $(TOPDIR)/.depends : $(shell if [ -e $(TOPDIR)/config.in ]\; then echo $(TOPDIR)
12 "subdir-$$(" $$1 ") += " $$2 "\n\n"; \ 22 "subdir-$$(" $$1 ") += " $$2 "\n\n"; \
13 print $$2 " : " $$2 "/Makefile\n\t$$(call descend,$$@,$(filter-out $$@,$$(filter-out $$@,$$(MAKECMDGOALS))))\n"; }' > $(TOPDIR)/.depends 23 print $$2 " : " $$2 "/Makefile\n\t$$(call descend,$$@,$(filter-out $$@,$$(filter-out $$@,$$(MAKECMDGOALS))))\n"; }' > $(TOPDIR)/.depends
14 cat $(TOPDIR)/packages | grep -v '^#' | \ 24 cat $(TOPDIR)/packages | grep -v '^#' | \
15 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"; }' \ 25 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"; }' \
16 >> $(TOPDIR)/.depends 26 >> $(TOPDIR)/.depends
17# interpackage dependency generation 27# interpackage dependency generation
18 @cat $(TOPDIR)/packages | \ 28 @cat $(TOPDIR)/packages | \
diff --git a/config.in b/config.in
index 8559e73..97e1e80 100644
--- a/config.in
+++ b/config.in
@@ -38,6 +38,10 @@ config OPTIMIZE
38 boolean "Use optimizations" 38 boolean "Use optimizations"
39 default "y" if ! TARGET_X86 39 default "y" if ! TARGET_X86
40 40
41config DEBUG
42 boolean "Enable debug builds"
43 default "n"
44
41config SPECFILE 45config SPECFILE
42 string 46 string
43 default "qws/linux-generic-g++" if TARGET_X86 && (! X11) 47 default "qws/linux-generic-g++" if TARGET_X86 && (! X11)
diff --git a/include.pro b/include.pro
index da2da04..4f1144f 100644
--- a/include.pro
+++ b/include.pro
@@ -68,3 +68,5 @@ ipk.commands = tmp=`mktemp -d /tmp/ipkg-opie.XXXXXXXXXX` && ( $(MAKE) INSTALL_RO
68QMAKE_EXTRA_UNIX_TARGETS += lupdate lrelease ipk 68QMAKE_EXTRA_UNIX_TARGETS += lupdate lrelease ipk
69QMAKE_LFLAGS += -Wl,-rpath=$$prefix/lib 69QMAKE_LFLAGS += -Wl,-rpath=$$prefix/lib
70QMAKE_LIBDIR += $(OPIEDIR)/lib 70QMAKE_LIBDIR += $(OPIEDIR)/lib
71
72include ( $(OPIEDIR)/gen.pro )