Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Ill faited makefile:1: *** missing separator. Stop.

644 views
Skip to first unread message

Corey Archipley

unread,
Nov 21, 2016, 5:02:58 PM11/21/16
to
Hi All,

I'm trying to build a make file. When I attempt to compile it I get error:

makefile:1: *** missing separator. Stop.

My research suggests that this is a tabbing issue, however, I am not able to find the error.

Here is the makefile:

! Start of the makefile

amrl.exe : main.o initdata.o store.o solver.o rhoxcalc.o restart.o&
linintrp.o fhsw.o fcks.o&
cv.o biintrp.o fhfs.o cwmat.o fluid_friction_calc.o fckw.o dpdd.o bisection.o&
property_data.o amrl_data.o dt.o hex_calc.o

gfortran -o amrl.exe&
main.o initdata.o store.o solver.o rhoxcalc.o restart.o linintrp.o fhsw.o fcks.o&
cv.o biintrp.o fhfs.o cwmat.o fluid_friction_calc.o fckw.o dpdd.o bisection.o&
property_data.o amrl_data.o dt.o hex_calc.o

amrl_data.mod : amrl_data.o amrl_data.f90
gfortran -c amrl_data.f90

property_data.mod : property_data.o property_data.f90
gfortran -c property_data.f90

biintrp.o : biintrp.o biintrp.f90
gfortran -c BiIntrp.f90 

bisection.o : bisection.o bisection.f90
gfortran -c bisection.f90

cv.o : cv.o cv.f90
gfortran -c cv.f90

cwmat.o : cwmat.o cwmat.f90
gfortran -c cwmat.f90

dpdd.o : dpdd.o dpdd.f90
gfortran -c dpdd.f90

dt.o : dt.o dt.f90
gfortran -c dt.f90

fcks.o : fcks.o fcks.f90
gfortran -c fcks.f90

fckw.o : fckw.o fckw.f90
gfortran -c fckw.f90

fhfs.o : fhfs.o fhfs.f90
gfortran -c fhfs.f90

fhsw.o : fhsw.o fhsw.f90
gfortran -c fhsw.f90

fluid_friction_calc.o : fluid_friction_calc.o fluid_friction_calc.f90
gfortran -c fluid_friction_calc.f90

hex_calc.o : hex_calc.o hex_calc.f90
gfortran -c hex_calc.f90

initdata.o : initdata.o initdata.f90
gfortran -c initdata.f90

linintrp.o : linintrp.o linintrp.f90
gfortran -c linintrp.f90

restart.o : restart.o restart.f90
gfortran -c restart.f90

rhoxcalc.o : rhoxcalc.o rhoxcalc.f90
gfortran -c rhoxcalc.f90

solver.o : solver.o solver.f90
gfortran -c solver.f90

store.o : store.o store.f90
gfortran -c store.f90

clean :
rm main.o initdata.o store.o solver.o rhoxcalc.o restart.o linintrp.o fhsw.o fcks.o&
cv.o biintrp.o fhfs.o cwmat.o fluid_friction_calc.o fckw.o dpdd.o bisection.o&
property_data.o amrl_data.o dt.o hex_calc.o



The cat function shows ^I (tabs) before every function.

$ cat -e -t -v makefile
! Start of the makefile^M$
^M$
amrl.exe : main.o initdata.o store.o solver.o rhoxcalc.o restart.o& ^M$
^Ilinintrp.o fhsw.o fcks.o&^M$
^Icv.o biintrp.o fhfs.o cwmat.o fluid_friction_calc.o fckw.o dpdd.o bisection.o&^M$
^Iproperty_data.o amrl_data.o dt.o hex_calc.o^M$
^I^M$
^Igfortran -o amrl.exe&^M$
^I^Imain.o initdata.o store.o solver.o rhoxcalc.o restart.o linintrp.o fhsw.o fcks.o&^M$
^I^Icv.o biintrp.o fhfs.o cwmat.o fluid_friction_calc.o fckw.o dpdd.o bisection.o&^M$
^I^Iproperty_data.o amrl_data.o dt.o hex_calc.o^M$
^I^M$
amrl_data.mod : amrl_data.o amrl_data.f90^M$
^Igfortran -c amrl_data.f90^M$
^I^M$
property_data.mod : property_data.o property_data.f90^M$
^Igfortran -c property_data.f90^M$
^I^M$
biintrp.o : biintrp.o biintrp.f90^M$
^Igfortran -c BiIntrp.f90M- ^M$
^I^I^M$
bisection.o : bisection.o bisection.f90^M$
^Igfortran -c bisection.f90^M$
^I^I^M$
cv.o : cv.o cv.f90^M$
^Igfortran -c cv.f90^M$
^I^I^M$
cwmat.o : cwmat.o cwmat.f90^M$
^Igfortran -c cwmat.f90^M$
^I^M$
dpdd.o : dpdd.o dpdd.f90^M$
^Igfortran -c dpdd.f90^M$
^M$
dt.o : dt.o dt.f90^M$
^Igfortran -c dt.f90^M$
^I^I^M$
fcks.o : fcks.o fcks.f90^I^M$
^Igfortran -c fcks.f90^M$
^I^I^M$
fckw.o : fckw.o fckw.f90^I^M$
^Igfortran -c fckw.f90^M$
^I^I^M$
fhfs.o : fhfs.o fhfs.f90^I^M$
^Igfortran -c fhfs.f90^M$
^M$
fhsw.o : fhsw.o fhsw.f90^I^M$
^Igfortran -c fhsw.f90^M$
^I^I^M$
fluid_friction_calc.o : fluid_friction_calc.o fluid_friction_calc.f90^I^M$
^Igfortran -c fluid_friction_calc.f90^M$
^I^I^M$
hex_calc.o : hex_calc.o hex_calc.f90^I^M$
^Igfortran -c hex_calc.f90^M$
^I^I^M$
initdata.o : initdata.o initdata.f90^I^M$
^Igfortran -c initdata.f90^M$
^I^I^M$
linintrp.o : linintrp.o linintrp.f90^I^M$
^Igfortran -c linintrp.f90^M$
^I^I^M$
restart.o : restart.o restart.f90^I^M$
^Igfortran -c restart.f90^M$
^I^I^M$
rhoxcalc.o : rhoxcalc.o rhoxcalc.f90^I^M$
^Igfortran -c rhoxcalc.f90^M$
^I^M$
solver.o : solver.o solver.f90^I^M$
^Igfortran -c solver.f90^M$
^I^I^M$
store.o : store.o store.f90^M$
^Igfortran -c store.f90^M$
^I^I^M$
clean : ^M$
^Irm main.o initdata.o store.o solver.o rhoxcalc.o restart.o linintrp.o fhsw.o fcks.o&^M$
^I^Icv.o biintrp.o fhfs.o cwmat.o fluid_friction_calc.o fckw.o dpdd.o bisection.o&^M$
^I^Iproperty_data.o amrl_data.o dt.o hex_calc.o ^M$
^I^I^I^I^M$
^I^I^M$
! End of the makefile


Any other thoughts?

Thanks!!

Corey

Corey Archipley

unread,
Nov 21, 2016, 5:39:16 PM11/21/16
to
GNU Fortran (GCC) 4.9.3
Copyright (C) 2015 Free Software Foundation, Inc.

Ian Harvey

unread,
Nov 21, 2016, 6:11:07 PM11/21/16
to
On 2016-11-22 09:02, Corey Archipley wrote:
> Hi All,
>
> I'm trying to build a make file. When I attempt to compile it I get error:
>
> makefile:1: *** missing separator. Stop.
>
> My research suggests that this is a tabbing issue, however, I am not able to find the error.
>
> Here is the makefile:
>
> ! Start of the makefile
>
> amrl.exe : main.o initdata.o store.o solver.o rhoxcalc.o restart.o&
> linintrp.o fhsw.o fcks.o&
> cv.o biintrp.o fhfs.o cwmat.o fluid_friction_calc.o fckw.o dpdd.o bisection.o&
> property_data.o amrl_data.o dt.o hex_calc.o

A makefile is not a Fortran source file. The requirements for
introducing comments and for continuing lines are different.

Comments in a makefile are introduced with the # character.

To continue lines in a makefile, the last character on the line,
immediately before the newline, should be a backslash.


Corey Archipley

unread,
Nov 21, 2016, 6:16:01 PM11/21/16
to
Ian - You are so kind in giving me this critical insight!! I still have a couple of errors now, but at least it's actually reading the code. I'll have to look into makefile source code architecture.

Thank You!! --- Corey

Arjen Markus

unread,
Nov 22, 2016, 3:04:17 AM11/22/16
to
note also the ^M at the end of the lines - could it be a Windows file that you are using on Linux? I am not sure if make will ignore them, but if not use a program like dos2unix to convert the line endings.

Regards,

Arjen

Corey Archipley

unread,
Nov 22, 2016, 12:36:42 PM11/22/16
to
Thanks Arjen. I am on a Windows system most of the time using the internal command prompt, not the Msys terminal. I found a few little bugs in the test formatting that I believe were artifacts of copy-paste and the text editor (Notepad++). All is very well now. My final makefile is:

# Start of the makefile

all: amrl clean

ALL = amrl_data.o property_data.o biintrp.o\
bisection.o cv.o cwmat.o dpdd.o dt.o fcks.o fckw.o fhfs.o fhsw.o\
fluid_friction_calc.o hex_calc.o initdata.o linintrp.o restart.o\
rhoxcalc.o solver.o store.o main.o

amrl : $(ALL)

gfortran -g3 -fcheck=all -Wall -fbacktrace -o amrl $(ALL)


amrl_data.mod : amrl_data.f90
gfortran -c amrl_data.f90

amrl_data.o : amrl_data.f90
gfortran -c amrl_data.f90

property_data.mod : property_data.f90
gfortran -c property_data.f90

property_data.o : property_data.f90
gfortran -c property_data.f90

biintrp.o : biintrp.f90
gfortran -c Biintrp.f90

bisection.o : bisection.f90
gfortran -c bisection.f90

cv.o : cv.f90
gfortran -c cv.f90

cwmat.o : cwmat.f90
gfortran -c cwmat.f90

dpdd.o : dpdd.f90
gfortran -c dpdd.f90

dt.o : dt.f90
gfortran -c dt.f90

fcks.o : fcks.f90
gfortran -c fcks.f90

fckw.o : fckw.f90
gfortran -c fckw.f90

fhfs.o : fhfs.f90
gfortran -c fhfs.f90

fhsw.o : fhsw.f90
gfortran -c fhsw.f90

fluid_friction_calc.o : fluid_friction_calc.f90
gfortran -c fluid_friction_calc.f90

hex_calc.o : hex_calc.f90
gfortran -c hex_calc.f90

initdata.o : initdata.f90
gfortran -c initdata.f90

linintrp.o : linintrp.f90
gfortran -c linintrp.f90

main.o : main.f90
gfortran -c main.f90

restart.o : restart.f90
gfortran -c restart.f90

rhoxcalc.o : rhoxcalc.f90
gfortran -c rhoxcalc.f90

solver.o : solver.f90
gfortran -c solver.f90

store.o : store.f90
gfortran -c store.f90

clean :

del -f *.o

This runs well on the minGW-32 for windows. My research has shown me that I can make this file much simpler with more variables and shortcuts, but for now I am in good shape. (make command is mingw32-make).

Thanks again all.

Thanks!!

Arjen Markus

unread,
Nov 23, 2016, 2:56:01 AM11/23/16
to
On Tuesday, November 22, 2016 at 6:36:42 PM UTC+1, Corey Archipley wrote:

> Thanks Arjen. I am on a Windows system most of the time using the internal command prompt, not the Msys terminal. I found a few little bugs in the test formatting that I believe were artifacts of copy-paste and the text editor (Notepad++). All is very well now. My final makefile is:
>

Right, just thought I'd mention this because some environments are rather sensitive to this sort of things. As for editors: the other day I ran into an issue with the byte-order marker that notepad inserts for free when the file contains non-ASCII characters. One of those gratuitous niceties :(

Regards,

Arjen
0 new messages