From fdf29b4b01231c746f7697365fcd7bd57d154365 Mon Sep 17 00:00:00 2001 From: kergoth Date: Fri, 24 Jan 2003 01:09:11 +0000 Subject: 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. --- (limited to 'Rules.make') diff --git a/Rules.make b/Rules.make index 1e4b205..11bfa55 100644 --- a/Rules.make +++ b/Rules.make @@ -3,6 +3,16 @@ $(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 @@ -12,7 +22,7 @@ $(TOPDIR)/.depends : $(shell if [ -e $(TOPDIR)/config.in ]\; then echo $(TOPDIR) "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 | \ -- cgit v0.9.0.2