Skip to content

Commit 6a248b7

Browse files
authored
Bugfix for ls --fulltime issue
This fixes an issue in OSX (perhaps others) where --fulltime is not a supported option to the ls function.
1 parent e4bb49b commit 6a248b7

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

sources/Makefile

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,14 @@
2828
-ftrapuv -init=snan,arrays -debug all -D DEBUG
2929
LIBS=-I$(HDF5_HOME)/include
3030
LINKS=-L$(HDF5_HOME)/lib -lhdf5_fortran -lhdf5 -lpthread -lz -lm
31+
LS_FULLTIME=--full-time
32+
33+
### OSX Test
34+
UNAME := $(shell uname -s)
35+
ifeq ($(UNAME),Darwin)
36+
# macOS-specific settings
37+
LS_FULLTIME=-T
38+
endif
3139

3240
#### GFORTRAN+OpenMPI+HDF5###############
3341
# available env: /p/focus/modules/focus/gfortran
@@ -148,7 +156,7 @@ clean:
148156

149157
$(PFILES): %.pdf: %.f90 head.tex end.tex
150158
# @ls -lT $*.f90 | cut -c 35-55 > .$*.date
151-
@ls --full-time $*.f90 | cut -c 32-50 > .$*.date
159+
@ls $(LS_FULLTIME) $*.f90 | cut -c 32-50 > .$*.date
152160
@awk -v file=$* -v date=.$*.date 'BEGIN{getline cdate < date ; FS="!latex" ; print "\\input{head} \\code{"file"}"} \
153161
{if(NF>1) print $$2} \
154162
END{print "\\vspace{1mm} \\hrule \\vspace{1mm} \\footnotesize $*.f90 last modified on "cdate";" ; print "\\input{end}"}' $*.f90 > $*.tex

0 commit comments

Comments
 (0)