summaryrefslogtreecommitdiff
blob: 4367bf9332b3257378f4e8a29b26f5b57197fe43 (plain)
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
--- a/dep.h
+++ b/dep.h
@@ -134,7 +134,7 @@
 struct goaldep *read_all_makefiles (const char **makefiles);
 
 /*! The chain of makefiles read by read_makefile.  */
-struct goaldep *read_makefiles;
+extern struct goaldep *read_makefiles;
 
 void eval_buffer (char *buffer, const gmk_floc *floc);
 enum update_status update_goal_chain (struct goaldep *goals);
--- a/globals.c
+++ b/globals.c
@@ -120,8 +120,6 @@
    of each job stay together.  */
 int output_sync = OUTPUT_SYNC_NONE;
 
-const char *default_shell;
-
 char *remote_description = 0;
 
 /* Remember the original value of the SHELL variable, from the environment.  */
--- a/globals.h
+++ b/globals.h
@@ -85,6 +85,12 @@
 extern bool b_debugger_preread;
 
 /* Remember the original value of the SHELL variable, from the environment.  */
-struct variable shell_var;
+extern struct variable shell_var;
+
+/**! The default value of SHELL and the shell that is used when issuing
+   commands on targets.
+*/
+extern const char *default_shell;
+
 
 #endif /*GLOBALS_H*/
--- a/main.c
+++ b/main.c
@@ -40,6 +40,8 @@
 # include <fcntl.h>
 #endif
 
+struct goaldep *read_makefiles;
+
 extern void initialize_stopchar_map ();
 
 #if defined HAVE_WAITPID || defined HAVE_WAIT3
--- a/main.h
+++ b/main.h
@@ -35,10 +35,5 @@
 /* is default_shell unixy? */
 extern int unixy_shell;
 
-/**! The default value of SHELL and the shell that is used when issuing
-   commands on targets.
-*/
-extern char *default_shell;
-
 /*! Print version information. */
 extern void print_version (void);
--- a/make.h
+++ b/make.h
@@ -333,7 +333,7 @@
 #endif
 #ifdef SET_STACK_SIZE
 # include <sys/resource.h>
-struct rlimit stack_limit;
+extern struct rlimit stack_limit;
 #endif
 
 /* We have to have stdarg.h or varargs.h AND v*printf or doprnt to use
--- a/print.h
+++ b/print.h
@@ -39,7 +39,7 @@
 
 /* Think of the below not as an enumeration but as #defines done in a
    way that we'll be able to use the value in a gdb. */
-enum debug_print_enums_e {
+extern enum debug_print_enums_e {
   MAX_STACK_SHOW = 1000,
 } debug_print_enums1;
 
--- a/variable.c
+++ b/variable.c
@@ -29,6 +29,7 @@
 #endif
 #include "hash.h"
 #include "main.h"
+#include "globals.h"
 
 /* Incremented every time we add or remove a global variable.  */
 static unsigned long variable_changenum;
--- a/variable.h
+++ b/variable.h
@@ -115,7 +115,6 @@
 extern char *variable_buffer;
 extern struct variable_set_list *current_variable_set_list;
 extern struct variable *default_goal_var;
-extern struct variable shell_var;
 
 /* expand.c */
 char *variable_buffer_output (char *ptr, const char *string, unsigned int length);
--- a/debugger/file2line.h
+++ b/debugger/file2line.h
@@ -19,7 +19,7 @@
 Boston, MA 02111-1307, USA.  */
 #ifndef REMAKE_FILE2LINE
 #define REMAKE_FILE2LINE
-struct hash_table file2lines;
+extern struct hash_table file2lines;
 
 typedef enum {
   F2L_TARGET,
--- a/debugger/file2line.c
+++ b/debugger/file2line.c
@@ -26,6 +26,8 @@
 #include "../rule.h"
 #include "./file2line.h"
 
+struct hash_table file2lines;
+
 unsigned long
 file2lines_hash_1 (const void *key)
 {