1 tplarson 1.7 # $Header: /home/cvsuser/cvsroot/JSOC/proj/globalhs/Rules.mk,v 1.6 2013/04/30 06:49:36 tplarson Exp $
|
2 tplarson 1.2
|
3 tplarson 1.1 sp := $(sp).x
4 dirstack_$(sp) := $(d)
5 d := $(dir)
6
|
7 tplarson 1.7 # any modules specified in proj/globalhs/apps must appear in this list.
8 # one might think to add the libraries in proj/globalhs/libs as well,
9 # but it's actually unnecessary because they are forced to be recompiled
10 # every time the modules that use them are recompiled, whether they are
11 # out of date or not. see the phony targets in the corresponding Rules.mk files.
12 GLOBALHSMODLIST := jv2ts jretile jtsfiddle jtsslice jpkbgn jrebinsmooth undistortmdi mkylms
13
|
14 tplarson 1.6 ifeq ($(GLOBALHSTAGOVERRIDE),)
15 ifeq ($(MAKECMDGOALS),)
16 GLOBALHS_TAG := $(shell $(SRCDIR)/proj/globalhs/scripts/checkglobalhstags $(SRCDIR))
17 TAGCHECK := $(findstring globalhs,$(GLOBALHS_TAG))
18 ifeq ($(TAGCHECK),)
19 $(warning WARNING: proj/globalhs is not tagged consistently. a build of any target in proj/globalhs will fail. output of script checkglobalhstags is "$(GLOBALHS_TAG)")
20 endif
21 else
22 GHSMODLIST_SOCK := $(GLOBALHSMODLIST:%=%_sock)
23 GHSTARGETLIST := all universe targets globalhs $(GLOBALHSMODLIST) $(GHSMODLIST_SOCK)
|
24 tplarson 1.7 # if we added '%' before all the words in GLOBALHSMODLIST, the following would work even if someone specified the full path to the modules.
25 # if we added '%' after, it would also work if someone wanted to compile the .o files.
26 # i'm not doing so at this time because inserting literal %'s is too much hassle for functionality we don't even use.
27 GHSTARGETTEST := $(filter $(GHSTARGETLIST),$(MAKECMDGOALS))
|
28 tplarson 1.6 ifneq ($(GHSTARGETTEST),)
29 GLOBALHS_TAG := $(shell $(SRCDIR)/proj/globalhs/scripts/checkglobalhstags $(SRCDIR))
30 TAGCHECK := $(findstring globalhs,$(GLOBALHS_TAG))
31 ifeq ($(TAGCHECK),)
32 $(warning WARNING: proj/globalhs is not tagged consistently. a build of any target in proj/globalhs will fail. output of script checkglobalhstags is "$(GLOBALHS_TAG)")
33 endif
34 endif
35 endif
36 else
37 GLOBALHS_TAG := $(GLOBALHSTAGOVERRIDE)
|
38 arta 1.4 TAGCHECK := $(findstring globalhs,$(GLOBALHS_TAG))
39 ifeq ($(TAGCHECK),)
|
40 tplarson 1.6 $(warning WARNING: specified tag override "$(GLOBALHSTAGOVERRIDE)" should contain the string "globalhs". a build of any target in proj/globalhs will fail.)
|
41 arta 1.4 endif
|
42 tplarson 1.2 endif
43
|
44 tplarson 1.1 # Subdirectories. Directory-specific rules are optional here. The
|
45 tplarson 1.2 # order does NOT matter.
46 dir := $(d)/libs
47 -include $(SRCDIR)/$(dir)/Rules.mk
|
48 tplarson 1.1 dir := $(d)/apps
49 -include $(SRCDIR)/$(dir)/Rules.mk
50
51 # Standard things
52 d := $(dirstack_$(sp))
53 sp := $(basename $(sp))
|