metomi/fcm

fcm make fails if '.' appears in pathname

gdcarver opened this issue · 6 comments

Hi,
Barcelona Supercomputing Centre have reported a problem with OpenIFS using FCM. Unfortunately their filesystems use '.' in the path:

The filesystems (fs) at MN3 contains dots in them (e.g.:
/.statelite/tmpfs/scratch).

I've done a simple test to confirm this.
% pwd
/home/rd/nagc/openifs/.test
% ls
fcm-make.cfg hello.f90
% fcm make
…….
[init] make build # 2015-02-27T10:14:55Z
[info] sources: total=0, analysed=0, elapsed-time=0.0s, total-time=0.0s
[FAIL] make build # 0.0s
[FAIL] make # 0.1s
[FAIL] hello.exe: don't know how to build specified target

Note sources = 0.
I think FCM has stripped out pathnames with '.' in them. May relate to #79 ? There is no extract step in the build.
% cat fcm-make.cfg
steps = build
build.target = hello.exe
build.source = $HERE

A leading dot in a path name is normally regarded as hidden a directory or file. The logic specially discards these path names as paths to source files. Why would anyone put source files in a hidden directory? The only thing we can do here is to add a new option to allow hidden files to be included.

I don't know their reasons for doing it. I agree it's unusual, but as it's at the very start of the absolute pathname on their HPC system it's causing a problem for them. I guess it's how they like to do their mounts.

Were you thinking of a new command line option or in the .cfg file? I'd prefer a command line option though either is fine. Thanks.

Perhaps we can have a site/user configuration? After all this sort of thing would be site specific.

Yes, good idea.

On second thoughts...

It should be possible to only ignore hidden directories and files that are under the leading part of the source tree. E.g. consider a path /path/to/.com/bubble/ containing some source files:

# This will work:
build.source=/path/to/.com/bubble

# This will not work:
build.source=/path/to

Perfect, thanks.