1 tplarson 1.8 # $Header: /home/cvsuser/cvsroot/JSOC/proj/globalhs/Rules.mk,v 1.7 2013/05/03 21:37:19 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.8 define GHSWARNING1
15
16 WARNING: proj/globalhs is not tagged consistently. A build of any target
17 in proj/globalhs will fail. The output of script
18 proj/globalhs/scripts/checkglobalhstags is "$(GLOBALHS_TAG)".
19
20 To skip tag checking (FOR DEVELOPMENT ONLY!), specify GLOBALHSTAGOVERRIDE
21 in either your environment or on the make command line. The value of
22 GLOBALHSTAGOVERRIDE must contain the string "globalhs". This value will
23 be compiled into the modules and written to ancillary dataseries as CVSTAG.
24
25 To automatically create a consistent tag (FOR PRODUCTION ONLY!), one may run
26 proj/globalhs/scripts/setglobalhstags. This script will add a tag in cvs
27 for every file comprising the globalhs source code, so use it with care.
28
29 endef
30
31 define GHSWARNING2
32
33 WARNING: GLOBALHSTAGOVERRIDE should contain the string "globalhs".
34 The value given was "$(GLOBALHSTAGOVERRIDE)".
35 tplarson 1.8 A build of any target in proj/globalhs will fail.
36 Note that the value of GLOBALHSTAGOVERRIDE will be compiled into
37 the modules and written to ancillary dataseries as CVSTAG.
38
39 endef
40
|
41 tplarson 1.6 ifeq ($(GLOBALHSTAGOVERRIDE),)
42 ifeq ($(MAKECMDGOALS),)
43 GLOBALHS_TAG := $(shell $(SRCDIR)/proj/globalhs/scripts/checkglobalhstags $(SRCDIR))
44 TAGCHECK := $(findstring globalhs,$(GLOBALHS_TAG))
45 ifeq ($(TAGCHECK),)
|
46 tplarson 1.8 $(warning $(GHSWARNING1))
|
47 tplarson 1.6 endif
48 else
49 GHSMODLIST_SOCK := $(GLOBALHSMODLIST:%=%_sock)
50 GHSTARGETLIST := all universe targets globalhs $(GLOBALHSMODLIST) $(GHSMODLIST_SOCK)
|
51 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.
52 # if we added '%' after, it would also work if someone wanted to compile the .o files.
53 # i'm not doing so at this time because inserting literal %'s is too much hassle for functionality we don't even use.
54 GHSTARGETTEST := $(filter $(GHSTARGETLIST),$(MAKECMDGOALS))
|
55 tplarson 1.6 ifneq ($(GHSTARGETTEST),)
56 GLOBALHS_TAG := $(shell $(SRCDIR)/proj/globalhs/scripts/checkglobalhstags $(SRCDIR))
57 TAGCHECK := $(findstring globalhs,$(GLOBALHS_TAG))
58 ifeq ($(TAGCHECK),)
|
59 tplarson 1.8 $(warning $(GHSWARNING1))
|
60 tplarson 1.6 endif
61 endif
62 endif
63 else
64 GLOBALHS_TAG := $(GLOBALHSTAGOVERRIDE)
|
65 arta 1.4 TAGCHECK := $(findstring globalhs,$(GLOBALHS_TAG))
66 ifeq ($(TAGCHECK),)
|
67 tplarson 1.8 $(warning $(GHSWARNING2))
|
68 arta 1.4 endif
|
69 tplarson 1.2 endif
70
|
71 tplarson 1.1 # Subdirectories. Directory-specific rules are optional here. The
|
72 tplarson 1.2 # order does NOT matter.
73 dir := $(d)/libs
74 -include $(SRCDIR)/$(dir)/Rules.mk
|
75 tplarson 1.1 dir := $(d)/apps
76 -include $(SRCDIR)/$(dir)/Rules.mk
77
78 # Standard things
79 d := $(dirstack_$(sp))
80 sp := $(basename $(sp))
|