Skip to content

Commit db26397

Browse files
authored
Merge pull request #39 from aminya/isfile
2 parents cdeed74 + 806ea7c commit db26397

File tree

2 files changed

+41
-41
lines changed

2 files changed

+41
-41
lines changed

src/precompile_include.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ function new_includer_file(
7070
@static if !should_precompile
7171
# nothing
7272
elseif !ismultios && !ismultiversion
73-
@static if (isfile("$default_precompile_file_name"))
73+
@static if isfile(joinpath(@__DIR__, "$default_precompile_file_name"))
7474
include("$default_precompile_file_name")
7575
_precompile_()
7676
end
@@ -118,7 +118,7 @@ function _multios(package_name, precompiles_rootpath, os_in, else_os, ismultiver
118118
else
119119
precompile_file_name = "$precompiles_rootpath/$eachos/precompile_$package_name.jl"
120120
multistr = multistr * """
121-
@static if (isfile("$precompile_file_name"))
121+
@static if isfile(joinpath(@__DIR__, "$precompile_file_name"))
122122
include("$precompile_file_name")
123123
_precompile_()
124124
end
@@ -167,7 +167,7 @@ function _multiversion(package_name, precompiles_rootpath, version_in, else_vers
167167

168168
precompile_file_name = "$precompiles_rootpath/$eachos/$(VersionFloat(eachversion))/precompile_$package_name.jl"
169169
multiversionstr = multiversionstr * """
170-
@static if (isfile("$precompile_file_name"))
170+
@static if isfile(joinpath(@__DIR__, "$precompile_file_name"))
171171
include("$precompile_file_name")
172172
_precompile_()
173173
end

test/runtests.jl

Lines changed: 38 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ bottestdir = GoodPath(@__DIR__)
5353
@static if !should_precompile
5454
# nothing
5555
elseif !ismultios && !ismultiversion
56-
@static if (isfile("$precompiles_rootpath_rel/precompile_$package_name.jl"))
56+
@static if isfile(joinpath(@__DIR__, "$precompiles_rootpath_rel/precompile_$package_name.jl"))
5757
include("$precompiles_rootpath_rel/precompile_$package_name.jl")
5858
_precompile_()
5959
end
@@ -73,25 +73,25 @@ bottestdir = GoodPath(@__DIR__)
7373
@static if !should_precompile
7474
# nothing
7575
elseif !ismultios && !ismultiversion
76-
@static if (isfile("$precompiles_rootpath_rel/precompile_$package_name.jl"))
76+
@static if isfile(joinpath(@__DIR__, "$precompiles_rootpath_rel/precompile_$package_name.jl"))
7777
include("$precompiles_rootpath_rel/precompile_$package_name.jl")
7878
_precompile_()
7979
end
8080
else
8181
@static if Sys.islinux()
82-
@static if (isfile("$precompiles_rootpath_rel/linux/precompile_$package_name.jl"))
82+
@static if isfile(joinpath(@__DIR__, "$precompiles_rootpath_rel/linux/precompile_$package_name.jl"))
8383
include("$precompiles_rootpath_rel/linux/precompile_$package_name.jl")
8484
_precompile_()
8585
end
8686
elseif Sys.iswindows()
87-
@static if (isfile("$precompiles_rootpath_rel/windows/precompile_$package_name.jl"))
87+
@static if isfile(joinpath(@__DIR__, "$precompiles_rootpath_rel/windows/precompile_$package_name.jl"))
8888
include("$precompiles_rootpath_rel/windows/precompile_$package_name.jl")
8989
_precompile_()
9090
end
9191
else
9292
end
9393
94-
end # precompile_enclosure
94+
end
9595
"""), includer_text)
9696
end
9797

@@ -105,23 +105,23 @@ bottestdir = GoodPath(@__DIR__)
105105
@static if !should_precompile
106106
# nothing
107107
elseif !ismultios && !ismultiversion
108-
@static if (isfile("$precompiles_rootpath_rel/precompile_$package_name.jl"))
108+
@static if isfile(joinpath(@__DIR__, "$precompiles_rootpath_rel/precompile_$package_name.jl"))
109109
include("$precompiles_rootpath_rel/precompile_$package_name.jl")
110110
_precompile_()
111111
end
112112
else
113113
@static if Sys.islinux()
114-
@static if (isfile("$precompiles_rootpath_rel/linux/precompile_$package_name.jl"))
114+
@static if isfile(joinpath(@__DIR__, "$precompiles_rootpath_rel/linux/precompile_$package_name.jl"))
115115
include("$precompiles_rootpath_rel/linux/precompile_$package_name.jl")
116116
_precompile_()
117117
end
118118
elseif Sys.iswindows()
119-
@static if (isfile("$precompiles_rootpath_rel/windows/precompile_$package_name.jl"))
119+
@static if isfile(joinpath(@__DIR__, "$precompiles_rootpath_rel/windows/precompile_$package_name.jl"))
120120
include("$precompiles_rootpath_rel/windows/precompile_$package_name.jl")
121121
_precompile_()
122122
end
123123
else
124-
@static if (isfile("$precompiles_rootpath_rel/linux/precompile_$package_name.jl"))
124+
@static if isfile(joinpath(@__DIR__, "$precompiles_rootpath_rel/linux/precompile_$package_name.jl"))
125125
include("$precompiles_rootpath_rel/linux/precompile_$package_name.jl")
126126
_precompile_()
127127
end
@@ -141,18 +141,18 @@ bottestdir = GoodPath(@__DIR__)
141141
@static if !should_precompile
142142
# nothing
143143
elseif !ismultios && !ismultiversion
144-
@static if (isfile("$precompiles_rootpath_rel/precompile_$package_name.jl"))
144+
@static if isfile(joinpath(@__DIR__, "$precompiles_rootpath_rel/precompile_$package_name.jl"))
145145
include("$precompiles_rootpath_rel/precompile_$package_name.jl")
146146
_precompile_()
147147
end
148148
else
149149
@static if v"1.2.0-DEV" <= VERSION <= v"1.2.9"
150-
@static if (isfile("$precompiles_rootpath_rel//1.2/precompile_$package_name.jl"))
150+
@static if isfile(joinpath(@__DIR__, "$precompiles_rootpath_rel//1.2/precompile_$package_name.jl"))
151151
include("$precompiles_rootpath_rel//1.2/precompile_$package_name.jl")
152152
_precompile_()
153153
end
154154
elseif v"1.5.0-DEV" <= VERSION <= v"1.5.9"
155-
@static if (isfile("$precompiles_rootpath_rel//1.5/precompile_$package_name.jl"))
155+
@static if isfile(joinpath(@__DIR__, "$precompiles_rootpath_rel//1.5/precompile_$package_name.jl"))
156156
include("$precompiles_rootpath_rel//1.5/precompile_$package_name.jl")
157157
_precompile_()
158158
end
@@ -174,23 +174,23 @@ bottestdir = GoodPath(@__DIR__)
174174
@static if !should_precompile
175175
# nothing
176176
elseif !ismultios && !ismultiversion
177-
@static if (isfile("$precompiles_rootpath_rel/precompile_$package_name.jl"))
177+
@static if isfile(joinpath(@__DIR__, "$precompiles_rootpath_rel/precompile_$package_name.jl"))
178178
include("$precompiles_rootpath_rel/precompile_$package_name.jl")
179179
_precompile_()
180180
end
181181
else
182182
@static if v"1.2.0-DEV" <= VERSION <= v"1.2.9"
183-
@static if (isfile("$precompiles_rootpath_rel//1.2/precompile_$package_name.jl"))
183+
@static if isfile(joinpath(@__DIR__, "$precompiles_rootpath_rel//1.2/precompile_$package_name.jl"))
184184
include("$precompiles_rootpath_rel//1.2/precompile_$package_name.jl")
185185
_precompile_()
186186
end
187187
elseif v"1.5.0-DEV" <= VERSION <= v"1.5.9"
188-
@static if (isfile("$precompiles_rootpath_rel//1.5/precompile_$package_name.jl"))
188+
@static if isfile(joinpath(@__DIR__, "$precompiles_rootpath_rel//1.5/precompile_$package_name.jl"))
189189
include("$precompiles_rootpath_rel//1.5/precompile_$package_name.jl")
190190
_precompile_()
191191
end
192192
else
193-
@static if (isfile("$precompiles_rootpath_rel//1.5/precompile_$package_name.jl"))
193+
@static if isfile(joinpath(@__DIR__, "$precompiles_rootpath_rel//1.5/precompile_$package_name.jl"))
194194
include("$precompiles_rootpath_rel//1.5/precompile_$package_name.jl")
195195
_precompile_()
196196
end
@@ -210,19 +210,19 @@ bottestdir = GoodPath(@__DIR__)
210210
@static if !should_precompile
211211
# nothing
212212
elseif !ismultios && !ismultiversion
213-
@static if (isfile("$precompiles_rootpath_rel/precompile_$package_name.jl"))
213+
@static if isfile(joinpath(@__DIR__, "$precompiles_rootpath_rel/precompile_$package_name.jl"))
214214
include("$precompiles_rootpath_rel/precompile_$package_name.jl")
215215
_precompile_()
216216
end
217217
else
218218
@static if Sys.islinux()
219219
@static if v"1.2.0-DEV" <= VERSION <= v"1.2.9"
220-
@static if (isfile("$precompiles_rootpath_rel/linux/1.2/precompile_$package_name.jl"))
220+
@static if isfile(joinpath(@__DIR__, "$precompiles_rootpath_rel/linux/1.2/precompile_$package_name.jl"))
221221
include("$precompiles_rootpath_rel/linux/1.2/precompile_$package_name.jl")
222222
_precompile_()
223223
end
224224
elseif v"1.5.0-DEV" <= VERSION <= v"1.5.9"
225-
@static if (isfile("$precompiles_rootpath_rel/linux/1.5/precompile_$package_name.jl"))
225+
@static if isfile(joinpath(@__DIR__, "$precompiles_rootpath_rel/linux/1.5/precompile_$package_name.jl"))
226226
include("$precompiles_rootpath_rel/linux/1.5/precompile_$package_name.jl")
227227
_precompile_()
228228
end
@@ -231,12 +231,12 @@ bottestdir = GoodPath(@__DIR__)
231231
232232
elseif Sys.iswindows()
233233
@static if v"1.2.0-DEV" <= VERSION <= v"1.2.9"
234-
@static if (isfile("$precompiles_rootpath_rel/windows/1.2/precompile_$package_name.jl"))
234+
@static if isfile(joinpath(@__DIR__, "$precompiles_rootpath_rel/windows/1.2/precompile_$package_name.jl"))
235235
include("$precompiles_rootpath_rel/windows/1.2/precompile_$package_name.jl")
236236
_precompile_()
237237
end
238238
elseif v"1.5.0-DEV" <= VERSION <= v"1.5.9"
239-
@static if (isfile("$precompiles_rootpath_rel/windows/1.5/precompile_$package_name.jl"))
239+
@static if isfile(joinpath(@__DIR__, "$precompiles_rootpath_rel/windows/1.5/precompile_$package_name.jl"))
240240
include("$precompiles_rootpath_rel/windows/1.5/precompile_$package_name.jl")
241241
_precompile_()
242242
end
@@ -245,12 +245,12 @@ bottestdir = GoodPath(@__DIR__)
245245
246246
else
247247
@static if v"1.2.0-DEV" <= VERSION <= v"1.2.9"
248-
@static if (isfile("$precompiles_rootpath_rel/linux/1.2/precompile_$package_name.jl"))
248+
@static if isfile(joinpath(@__DIR__, "$precompiles_rootpath_rel/linux/1.2/precompile_$package_name.jl"))
249249
include("$precompiles_rootpath_rel/linux/1.2/precompile_$package_name.jl")
250250
_precompile_()
251251
end
252252
elseif v"1.5.0-DEV" <= VERSION <= v"1.5.9"
253-
@static if (isfile("$precompiles_rootpath_rel/linux/1.5/precompile_$package_name.jl"))
253+
@static if isfile(joinpath(@__DIR__, "$precompiles_rootpath_rel/linux/1.5/precompile_$package_name.jl"))
254254
include("$precompiles_rootpath_rel/linux/1.5/precompile_$package_name.jl")
255255
_precompile_()
256256
end
@@ -273,60 +273,60 @@ bottestdir = GoodPath(@__DIR__)
273273
@static if !should_precompile
274274
# nothing
275275
elseif !ismultios && !ismultiversion
276-
@static if (isfile("$precompiles_rootpath_rel/precompile_$package_name.jl"))
276+
@static if isfile(joinpath(@__DIR__, "$precompiles_rootpath_rel/precompile_$package_name.jl"))
277277
include("$precompiles_rootpath_rel/precompile_$package_name.jl")
278278
_precompile_()
279279
end
280280
else
281281
@static if Sys.islinux()
282282
@static if v"1.2.0-DEV" <= VERSION <= v"1.2.9"
283-
@static if (isfile("$precompiles_rootpath_rel/linux/1.2/precompile_$package_name.jl"))
283+
@static if isfile(joinpath(@__DIR__, "$precompiles_rootpath_rel/linux/1.2/precompile_$package_name.jl"))
284284
include("$precompiles_rootpath_rel/linux/1.2/precompile_$package_name.jl")
285285
_precompile_()
286286
end
287287
elseif v"1.5.0-DEV" <= VERSION <= v"1.5.9"
288-
@static if (isfile("$precompiles_rootpath_rel/linux/1.5/precompile_$package_name.jl"))
288+
@static if isfile(joinpath(@__DIR__, "$precompiles_rootpath_rel/linux/1.5/precompile_$package_name.jl"))
289289
include("$precompiles_rootpath_rel/linux/1.5/precompile_$package_name.jl")
290290
_precompile_()
291291
end
292292
else
293-
@static if (isfile("$precompiles_rootpath_rel/linux/1.5/precompile_$package_name.jl"))
293+
@static if isfile(joinpath(@__DIR__, "$precompiles_rootpath_rel/linux/1.5/precompile_$package_name.jl"))
294294
include("$precompiles_rootpath_rel/linux/1.5/precompile_$package_name.jl")
295295
_precompile_()
296296
end
297297
end
298298
299299
elseif Sys.iswindows()
300300
@static if v"1.2.0-DEV" <= VERSION <= v"1.2.9"
301-
@static if (isfile("$precompiles_rootpath_rel/windows/1.2/precompile_$package_name.jl"))
301+
@static if isfile(joinpath(@__DIR__, "$precompiles_rootpath_rel/windows/1.2/precompile_$package_name.jl"))
302302
include("$precompiles_rootpath_rel/windows/1.2/precompile_$package_name.jl")
303303
_precompile_()
304304
end
305305
elseif v"1.5.0-DEV" <= VERSION <= v"1.5.9"
306-
@static if (isfile("$precompiles_rootpath_rel/windows/1.5/precompile_$package_name.jl"))
306+
@static if isfile(joinpath(@__DIR__, "$precompiles_rootpath_rel/windows/1.5/precompile_$package_name.jl"))
307307
include("$precompiles_rootpath_rel/windows/1.5/precompile_$package_name.jl")
308308
_precompile_()
309309
end
310310
else
311-
@static if (isfile("$precompiles_rootpath_rel/windows/1.5/precompile_$package_name.jl"))
311+
@static if isfile(joinpath(@__DIR__, "$precompiles_rootpath_rel/windows/1.5/precompile_$package_name.jl"))
312312
include("$precompiles_rootpath_rel/windows/1.5/precompile_$package_name.jl")
313313
_precompile_()
314314
end
315315
end
316316
317317
else
318318
@static if v"1.2.0-DEV" <= VERSION <= v"1.2.9"
319-
@static if (isfile("$precompiles_rootpath_rel/linux/1.2/precompile_$package_name.jl"))
319+
@static if isfile(joinpath(@__DIR__, "$precompiles_rootpath_rel/linux/1.2/precompile_$package_name.jl"))
320320
include("$precompiles_rootpath_rel/linux/1.2/precompile_$package_name.jl")
321321
_precompile_()
322322
end
323323
elseif v"1.5.0-DEV" <= VERSION <= v"1.5.9"
324-
@static if (isfile("$precompiles_rootpath_rel/linux/1.5/precompile_$package_name.jl"))
324+
@static if isfile(joinpath(@__DIR__, "$precompiles_rootpath_rel/linux/1.5/precompile_$package_name.jl"))
325325
include("$precompiles_rootpath_rel/linux/1.5/precompile_$package_name.jl")
326326
_precompile_()
327327
end
328328
else
329-
@static if (isfile("$precompiles_rootpath_rel/linux/1.5/precompile_$package_name.jl"))
329+
@static if isfile(joinpath(@__DIR__, "$precompiles_rootpath_rel/linux/1.5/precompile_$package_name.jl"))
330330
include("$precompiles_rootpath_rel/linux/1.5/precompile_$package_name.jl")
331331
_precompile_()
332332
end
@@ -348,19 +348,19 @@ bottestdir = GoodPath(@__DIR__)
348348
@static if !should_precompile
349349
# nothing
350350
elseif !ismultios && !ismultiversion
351-
@static if (isfile("$precompiles_rootpath_rel/precompile_$package_name.jl"))
351+
@static if isfile(joinpath(@__DIR__, "$precompiles_rootpath_rel/precompile_$package_name.jl"))
352352
include("$precompiles_rootpath_rel/precompile_$package_name.jl")
353353
_precompile_()
354354
end
355355
else
356356
@static if Sys.islinux()
357357
@static if v"1.2.0-DEV" <= VERSION <= v"1.2.9"
358-
@static if (isfile("$precompiles_rootpath_rel/linux/1.2/precompile_$package_name.jl"))
358+
@static if isfile(joinpath(@__DIR__, "$precompiles_rootpath_rel/linux/1.2/precompile_$package_name.jl"))
359359
include("$precompiles_rootpath_rel/linux/1.2/precompile_$package_name.jl")
360360
_precompile_()
361361
end
362362
elseif v"1.5.0-DEV" <= VERSION <= v"1.5.9"
363-
@static if (isfile("$precompiles_rootpath_rel/linux/1.5/precompile_$package_name.jl"))
363+
@static if isfile(joinpath(@__DIR__, "$precompiles_rootpath_rel/linux/1.5/precompile_$package_name.jl"))
364364
include("$precompiles_rootpath_rel/linux/1.5/precompile_$package_name.jl")
365365
_precompile_()
366366
end
@@ -369,12 +369,12 @@ bottestdir = GoodPath(@__DIR__)
369369
370370
elseif Sys.iswindows()
371371
@static if v"1.2.0-DEV" <= VERSION <= v"1.2.9"
372-
@static if (isfile("$precompiles_rootpath_rel/windows/1.2/precompile_$package_name.jl"))
372+
@static if isfile(joinpath(@__DIR__, "$precompiles_rootpath_rel/windows/1.2/precompile_$package_name.jl"))
373373
include("$precompiles_rootpath_rel/windows/1.2/precompile_$package_name.jl")
374374
_precompile_()
375375
end
376376
elseif v"1.5.0-DEV" <= VERSION <= v"1.5.9"
377-
@static if (isfile("$precompiles_rootpath_rel/windows/1.5/precompile_$package_name.jl"))
377+
@static if isfile(joinpath(@__DIR__, "$precompiles_rootpath_rel/windows/1.5/precompile_$package_name.jl"))
378378
include("$precompiles_rootpath_rel/windows/1.5/precompile_$package_name.jl")
379379
_precompile_()
380380
end

0 commit comments

Comments
 (0)