author | kergoth <kergoth> | 2003-01-24 01:09:11 (UTC) |
---|---|---|
committer | kergoth <kergoth> | 2003-01-24 01:09:11 (UTC) |
commit | fdf29b4b01231c746f7697365fcd7bd57d154365 (patch) (side-by-side diff) | |
tree | 309306f501beb67a0267fa2b925a3fdaadbd6f2a | |
parent | 3de1877c4c39c3cc99848204da8e32fc6e3d9efb (diff) | |
download | opie-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.
-rw-r--r-- | Rules.make | 12 | ||||
-rw-r--r-- | config.in | 4 | ||||
-rw-r--r-- | include.pro | 2 |
3 files changed, 17 insertions, 1 deletions
@@ -1,23 +1,33 @@ ## targets ## $(configs) : $(call makecfg,$@) +$(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 @echo Generating dependency information... # add to subdir-y, and add descend rules @cat $(TOPDIR)/packages | grep -v '^#' | \ awk '{print \ ".PHONY : " $$2 "\n" \ "subdir-$$(" $$1 ") += " $$2 "\n\n"; \ print $$2 " : " $$2 "/Makefile\n\t$$(call descend,$$@,$(filter-out $$@,$$(filter-out $$@,$$(MAKECMDGOALS))))\n"; }' > $(TOPDIR)/.depends 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 # interpackage dependency generation @cat $(TOPDIR)/packages | \ $(TOPDIR)/scripts/deps.pl >> $(TOPDIR)/.depends $(TOPDIR)/.depends.cfgs: # config.in interdependencies @echo $(configs) | sed -e 's,/config.in,,g' | ( for i in `cat`; do echo $$i; done ) > dirs @@ -33,16 +33,20 @@ choice boolean "Ipaq" endchoice config OPTIMIZE boolean "Use optimizations" default "y" if ! TARGET_X86 +config DEBUG + boolean "Enable debug builds" + default "n" + config SPECFILE string default "qws/linux-generic-g++" if TARGET_X86 && (! X11) default "linux-g++" if TARGET_X86 && X11 default "qws/linux-sharp-g++" if TARGET_SHARP && (! X11) default "linux-g++" if TARGET_SHARP && X11 # default "linux-oz-g++" if TARGET_OZ default "qws/linux-ipaq-g++" if TARGET_IPAQ && (! X11) diff --git a/include.pro b/include.pro index da2da04..4f1144f 100644 --- a/include.pro +++ b/include.pro @@ -63,8 +63,10 @@ lrelease.target = lrelease lrelease.commands = lrelease $(PRO) ipk.target = ipk ipk.commands = tmp=`mktemp -d /tmp/ipkg-opie.XXXXXXXXXX` && ( $(MAKE) INSTALL_ROOT="$$$$tmp" install && ipkg-build $$$$tmp; rm -rf $$$$tmp; ) QMAKE_EXTRA_UNIX_TARGETS += lupdate lrelease ipk QMAKE_LFLAGS += -Wl,-rpath=$$prefix/lib QMAKE_LIBDIR += $(OPIEDIR)/lib + +include ( $(OPIEDIR)/gen.pro ) |