1
  
2
  
3
  
4
  
5
  
6
  
7
  
8
  
9
  
10
  
11
  
12
  
13
  
14
  
15
  
16
  
17
  
18
  
19
  
20
  
21
  
22
  
23
  
24
  
25
  
26
  
27
  
28
  
29
  
30
  
31
  
32
  
33
  
34
  
35
  
36
  
37
  
38
  
39
  
40
  
41
  
42
  
43
  
44
  
45
  
46
  
47
  
48
  
49
  
50
  
51
  
52
  
53
  
54
  
55
  
56
  
57
  
58
  
59
  
60
  
61
  
62
  
63
  
64
  
65
  
66
  
67
  
68
  
69
  
70
  
71
  
72
  
73
  
74
  
75
  
76
  
77
  
78
  
79
  
80
  
81
  
82
  
83
  
84
  
85
  
86
  
87
  
88
  
89
  
90
  
91
  
92
  
93
  
94
  
95
  
96
  
97
  
98
  
99
  
100
  
101
  
102
  
103
  
104
  
105
  
106
  
107
  
108
  
109
  
110
  
111
  
112
  
113
  
114
  
115
  
116
  
117
  
118
  
119
  
120
  
121
  
122
  
123
  
124
  
125
  
126
  
127
  
128
  
129
  
130
  
131
  
132
  
133
  
134
  
135
  
136
  
137
  
138
  
139
  
140
  
141
  
142
  
143
  
144
  
145
  
146
  
147
  
 
@make_variables@ 
 
MODULES=@module_names@ 
MODULE_SEGMENTS=@MODULE_SEGMENTS@ 
MODULE_LINKOPTS=@MODULE_LINKOPTS@ 
MY_DIR=modules 
 
all: modules_target modlist.h modlist_headers.h linker_options 
 
$(MODULE_SEGMENTS) $(MODULE_LINKOPTS) modules_target: modules 
 
force: 
        @: 
 
# If the current build type (static or dynamic) matches the build type 
# of the module then we have to start the submake without any target 
# since there are many module makefiles that depend on being able to 
# override the default target. Otherwise we specify the build type as 
# target to avoid running the default target twice. 
$(MODULES) no : Makefile force 
        @test $@ = "no" || \ 
        ( echo "#### Making $${MODULE_BUILD_TYPE}: $(MY_DIR)/$@"; \ 
          if [ -d $@ ]; then \ 
            rm $@.fail 2>/dev/null; \ 
          else \ 
            echo "#### You need to rerun configure to get $@." >$@.fail; \ 
            echo; echo; cat $@.fail >&2; echo; echo; \ 
            exit 0; \ 
          fi; \ 
          cd $@ && \ 
          { test -f build_type || \ 
            { rm remake >/dev/null 2>&1 || :; \ 
              $(MAKE) $(MAKE_FLAGS) build_type || \ 
              ( test -f remake && $(MAKE) $(MAKE_FLAGS) build_type ); }; } && \ 
          if [ "x$$MODULE_BUILD_TYPE" = "x`cat build_type`" ]; then \ 
            rm remake >/dev/null 2>&1 || :; \ 
            $(MAKE) $(MAKE_FLAGS) || \ 
            ( test -f remake && $(MAKE) $(MAKE_FLAGS) ); \ 
          else \ 
            rm remake >/dev/null 2>&1 || :; \ 
            $(MAKE) $(MAKE_FLAGS) $$MODULE_BUILD_TYPE || \ 
            ( test -f remake && $(MAKE) $(MAKE_FLAGS) $$MODULE_BUILD_TYPE ); \ 
          fi ) || exit $$? 
 
modules: Makefile $(MODULES) 
 
modlist.h: $(MODULE_SEGMENTS) 
        @echo 'Updating $(MY_DIR)/modlist.h'; \ 
        cat $(MODULE_SEGMENTS) </dev/null >modlist.h 
 
modlist_headers.h: $(MODULE_SEGMENTS) Makefile 
        @echo 'Updating $(MY_DIR)/modlist_headers.h'; \ 
        cat $(MODULE_SEGMENTS) </dev/null | \ 
        sed -e 's/^.*{.*,\(.*\),\(.*\),\(.*\)}.*$$/void \1(void),\2(void);/' >modlist_headers.h 
 
linker_options: $(MODULE_LINKOPTS) 
        @echo 'Updating $(MY_DIR)/linker_options'; \ 
        cat $(MODULE_LINKOPTS) </dev/null >linker_options 
 
propagated_variables: 
 
make_variables: $(make_variables_in) config.status propagated_variables 
        CONFIG_FILES="make_variables:$(make_variables_in)" CONFIG_HEADERS="" ./config.status 
 
Makefile: $(SRCDIR)/Makefile.in $(SRCDIR)/dependencies ./config.status make_variables 
        CONFIG_FILES=Makefile CONFIG_HEADERS="" ./config.status 
        touch remake 
        @echo "Run make again" >&2 
        @exit 1 
 
$(SRCDIR)/configure: $(SRCDIR)/configure.in $(PIKE_SRC_DIR)/aclocal.m4 
        cd $(SRCDIR) && $(PIKE_SRC_DIR)/run_autoconfig --no-recursion . 
 
config.status: $(SRCDIR)/configure propagated_variables 
        ./config.status --recheck 
 
depend: Makefile 
        @for a in $(MODULES) no ; do test $$a = no || \ 
          ( cd $$a && { \ 
            echo "Fixing depends in $(MY_DIR)/$$a"; \ 
            rm -f remake || :; \ 
            ${MAKE} $(MAKE_FLAGS) depend || \ 
              if test -f remake; then ${MAKE} $(MAKE_FLAGS) depend; else exit $$?; fi; \ 
          }); \ 
        done 
 
install: 
        @for a in $(MODULES) no ; do test $$a = no || \ 
          ( echo "Installing $(MY_DIR)/$$a"; \ 
            cd $$a && ${MAKE} $(MAKE_FLAGS) install ) ; \ 
        done 
 
clean_here: 
        -rm -f linker_options modlist.h modlist_headers.h 
 
clean: clean_here 
        @for a in $(MODULES) no ; do test $$a = no || \ 
          ( echo "Cleaning $(MY_DIR)/$$a"; \ 
            cd $$a && ${MAKE} $(MAKE_FLAGS) clean ) ; \ 
        done 
 
spotless: clean_here 
        -rm -f config.cache config.log config.status Makefile propagated_variables make_variables conftest.* 
        -rm -f common_module_makefile dynamic_module_makefile static_module_makefile 
        @for a in $(MODULES) no ; do test $$a = no || \ 
          ( echo "Cleaning $(MY_DIR)/$$a": \ 
            cd $$a && ${MAKE} $(MAKE_FLAGS) spotless ) ; \ 
        done 
 
verify: 
        @for a in $(MODULES) no ; do test $$a = no || \ 
          ( echo "Verifying $(MY_DIR)/$$a"; \ 
            cd $$a && ${MAKE} $(MAKE_FLAGS) verify \ 
          ) || exit $$? ; \ 
        done 
 
verbose_verify: 
        @for a in $(MODULES) no ; do test $$a = no || \ 
          ( echo "Verifying $(MY_DIR)/$$a"; \ 
            cd $$a && ${MAKE} $(MAKE_FLAGS) verbose_verify \ 
          ) || exit $$? ; \ 
        done 
 
fdtestsuites: 
        @for a in $(MODULES) no ; do test $$a = no || \ 
          ( echo "Making testsuite in $(MY_DIR)/$$a"; \ 
            $(TMP_BINDIR)/mktestsuite $(SRCDIR)/$$a/testsuite.in >$$a/testsuite -DSRCDIR="`echo $(SRCDIR)/$$a|$(BUILD_BASE)/posix_to_native.sh`" ) || exit $$? ; \ 
        done 
 
testsuites: 
        @for a in $(MODULES) no ; do test $$a = no || \ 
          ( echo "Making testsuite in $(MY_DIR)/$$a"; \ 
            cd $$a && $(MAKE) testsuite ) ; \ 
        done 
 
extra_tests: 
        @for a in $(MODULES) no ; do test $$a = no || \ 
          ( echo "Making extra_tests in $(MY_DIR)/$$a"; \ 
            cd $$a && \ 
            ${MAKE} $(MAKE_FLAGS) extra_tests \ 
          ) || exit $$? ; \ 
        done 
 
 
@dependencies@