author | kergoth <kergoth> | 2002-11-05 02:33:22 (UTC) |
---|---|---|
committer | kergoth <kergoth> | 2002-11-05 02:33:22 (UTC) |
commit | ed163d67a674b1c4ac6b7e917a509029da446dfb (patch) (unidiff) | |
tree | d444f6395e82b1dd66f0ce8a413348a6f183bad3 /Rules.make | |
parent | 9ac6d0a443c417158e3f2acf2de0629c51b6511c (diff) | |
download | opie-ed163d67a674b1c4ac6b7e917a509029da446dfb.zip opie-ed163d67a674b1c4ac6b7e917a509029da446dfb.tar.gz opie-ed163d67a674b1c4ac6b7e917a509029da446dfb.tar.bz2 |
config.in generation to reduce maintainance headaches
-rw-r--r-- | Rules.make | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -1,40 +1,45 @@ | |||
1 | ## targets ## | 1 | ## targets ## |
2 | 2 | ||
3 | $(TOPDIR)/config.in : | 3 | $(configs) : |
4 | $(call makecfg,$@) | ||
4 | 5 | ||
5 | $(TOPDIR)/.depends : $(TOPDIR)/config.in | 6 | $(TOPDIR)/.depends : $(TOPDIR)/config.in |
6 | @cat $(TOPDIR)/packages | \ | 7 | @cat $(TOPDIR)/packages | \ |
7 | awk '/^#/ { next }; {print \ | 8 | awk '/^#/ { next }; {print \ |
8 | ".PHONY : " $$2 "\n" \ | 9 | ".PHONY : " $$2 "\n" \ |
9 | "subdir-$$(" $$1 ") += " $$2 "\n\n" \ | 10 | "subdir-$$(" $$1 ") += " $$2 "\n\n" \ |
10 | $$2 "/Makefile : " $$2 "/" $$3 " $$(TOPDIR)/qmake/qmake\n\t" \ | 11 | $$2 "/Makefile : " $$2 "/" $$3 " $$(TOPDIR)/qmake/qmake\n\t" \ |
11 | "$$(call makefilegen,$$@)\n\n" \ | 12 | "$$(call makefilegen,$$@)\n\n" \ |
12 | $$2 " : " $$2 "/Makefile\n\t$$(call descend,$$@)\n"}'\ | 13 | $$2 " : " $$2 "/Makefile\n\t$$(call descend,$$@)\n"}'\ |
13 | > $(TOPDIR)/.depends | 14 | > $(TOPDIR)/.depends |
14 | @cat $(TOPDIR)/packages | \ | 15 | @cat $(TOPDIR)/packages | \ |
15 | $(TOPDIR)/scripts/deps.pl >> $(TOPDIR)/.depends | 16 | $(TOPDIR)/scripts/deps.pl >> $(TOPDIR)/.depends |
16 | 17 | ||
17 | $(TOPDIR)/qmake/qmake : | 18 | $(TOPDIR)/qmake/qmake : |
18 | $(call descend,$(TOPDIR)/qmake) | 19 | $(call descend,$(TOPDIR)/qmake) |
19 | 20 | ||
20 | $(TOPDIR)/scripts/lxdialog/lxdialog : | 21 | $(TOPDIR)/scripts/lxdialog/lxdialog : |
21 | $(call descend,$(TOPDIR)/scripts/lxdialog) | 22 | $(call descend,$(TOPDIR)/scripts/lxdialog) |
22 | 23 | ||
23 | $(TOPDIR)/scripts/kconfig/conf scripts/kconfig/conf: | 24 | $(TOPDIR)/scripts/kconfig/conf scripts/kconfig/conf: |
24 | $(call descend,$(TOPDIR)/scripts/kconfig,conf) | 25 | $(call descend,$(TOPDIR)/scripts/kconfig,conf) |
25 | 26 | ||
26 | $(TOPDIR)/scripts/kconfig/mconf scripts/kconfig/mconf: | 27 | $(TOPDIR)/scripts/kconfig/mconf scripts/kconfig/mconf: |
27 | $(call descend,$(TOPDIR)/scripts/kconfig,mconf) | 28 | $(call descend,$(TOPDIR)/scripts/kconfig,mconf) |
28 | 29 | ||
29 | $(TOPDIR)/scripts/kconfig/qconf scripts/kconfijg/qconf: | 30 | $(TOPDIR)/scripts/kconfig/qconf scripts/kconfijg/qconf: |
30 | $(call descend,$(TOPDIR)/scripts/kconfig,qconf) | 31 | $(call descend,$(TOPDIR)/scripts/kconfig,qconf) |
31 | 32 | ||
32 | ## general rules ## | 33 | ## general rules ## |
33 | 34 | ||
34 | define descend | 35 | define descend |
35 | $(MAKE) -C $(1) $(2) | 36 | $(MAKE) -C $(1) $(2) |
36 | endef | 37 | endef |
37 | 38 | ||
38 | define makefilegen | 39 | define makefilegen |
39 | cd $(shell dirname $(1)); $(TOPDIR)/qmake/qmake $(3) -o $(shell basename $(1)) `echo $(1)|sed -e 's,/Makefile$$,,g' -e 's,.*/,,g'`.pro | 40 | cd $(shell dirname $(1)); $(TOPDIR)/qmake/qmake $(3) -o $(shell basename $(1)) `echo $(1)|sed -e 's,/Makefile$$,,g' -e 's,.*/,,g'`.pro |
40 | endef | 41 | endef |
42 | |||
43 | define makecfg | ||
44 | $(TOPDIR)/scripts/makecfg.pl $1 | ||
45 | endef | ||