Page 2 of 2

Re: About HMG - AI's view!

Posted: Sun Aug 10, 2025 2:46 pm
by serge_girard
Yosef, demande CHTGPT: reponse

Code: Select all

Yes — HMG 3.4.4 (and any Harbour-based environment) can do something similar to Clipper’s “compile only changed files” approach, but it depends on how you organize the build process.

Clipper’s make utilities did this automatically if you used a .MAK file.
In HMG, you can achieve the same result in two main ways:

1. Use a make tool (recommended)
If you keep your .prg files separate and have a Makefile, you can let a build tool like make (or nmake on Windows) check file timestamps.

Example Makefile for HMG:

make
Kopiëren
Bewerken
APPNAME = myapp
PRGS = main.prg module1.prg module2.prg
OBJS = $(PRGS:.prg=.obj)

$(APPNAME).exe: $(OBJS)
   harbour $(PRGS)
   hmg -o$(APPNAME) $(OBJS)

%.obj: %.prg
   harbour $<

clean:
   del *.obj
   del $(APPNAME).exe
Now make will only compile .prg files that changed, then relink.

2. Compile individual .prg files manually
HMG lets you compile a single .prg without touching the others:

bat
Kopiëren
Bewerken
harbour module1.prg /n /i..\include
Then link it into your existing .exe:

bat
Kopiëren
Bewerken
hmg -oMyApp main.obj module1.obj module2.obj
If you keep your .obj files from the previous build, unchanged .prg files won’t be recompiled — just relinked.

3. GUI IDE builds (HMG-IDE)
If you’re using HMG-IDE, it always recompiles all .prg files by default.
To get incremental compilation, you’d have to:

Build your project in the IDE once (to generate .hbp and .hbc files).

Then, instead of pressing Run, compile from a batch file or make that preserves .obj files and only rebuilds changed ones.

💡 Practical tip:
If your project is large and you want Clipper-like speed, store your .prg files separately, use a Makefile or batch script, and don’t delete .obj files unless you do a clean rebuild.

If you want, I can give you a ready-to-use HMG 3.4.4 batch script that only recompiles changed .prg files and still lets you press one key to run the program. Would you like me to prepare that?

:

Je n'ai pas controle la reponse....

Re: About HMG - AI's view!

Posted: Sun Aug 10, 2025 6:50 pm
by mol
You must add line
inc=yes
In IDE's configuration tab

Re: About HMG - AI's view!

Posted: Mon Aug 11, 2025 2:18 pm
by tonton2
mol wrote: Sun Aug 10, 2025 6:50 pm You must add line
inc=yes
In IDE's configuration tab
merci

Re: About HMG - AI's view!

Posted: Mon Aug 11, 2025 2:19 pm
by tonton2
serge_girard wrote: Sun Aug 10, 2025 2:46 pm Yosef, demande CHTGPT: reponse
merci

Code: Select all

Yes — HMG 3.4.4 (and any Harbour-based environment) can do something similar to Clipper’s “compile only changed files” approach, but it depends on how you organize the build process.

Clipper’s make utilities did this automatically if you used a .MAK file.
In HMG, you can achieve the same result in two main ways:

1. Use a make tool (recommended)
If you keep your .prg files separate and have a Makefile, you can let a build tool like make (or nmake on Windows) check file timestamps.

Example Makefile for HMG:

make
Kopiëren
Bewerken
APPNAME = myapp
PRGS = main.prg module1.prg module2.prg
OBJS = $(PRGS:.prg=.obj)

$(APPNAME).exe: $(OBJS)
   harbour $(PRGS)
   hmg -o$(APPNAME) $(OBJS)

%.obj: %.prg
   harbour $<

clean:
   del *.obj
   del $(APPNAME).exe
Now make will only compile .prg files that changed, then relink.

2. Compile individual .prg files manually
HMG lets you compile a single .prg without touching the others:

bat
Kopiëren
Bewerken
harbour module1.prg /n /i..\include
Then link it into your existing .exe:

bat
Kopiëren
Bewerken
hmg -oMyApp main.obj module1.obj module2.obj
If you keep your .obj files from the previous build, unchanged .prg files won’t be recompiled — just relinked.

3. GUI IDE builds (HMG-IDE)
If you’re using HMG-IDE, it always recompiles all .prg files by default.
To get incremental compilation, you’d have to:

Build your project in the IDE once (to generate .hbp and .hbc files).

Then, instead of pressing Run, compile from a batch file or make that preserves .obj files and only rebuilds changed ones.

💡 Practical tip:
If your project is large and you want Clipper-like speed, store your .prg files separately, use a Makefile or batch script, and don’t delete .obj files unless you do a clean rebuild.

If you want, I can give you a ready-to-use HMG 3.4.4 batch script that only recompiles changed .prg files and still lets you press one key to run the program. Would you like me to prepare that?

:

Je n'ai pas controle la reponse....

Re: About HMG - AI's view!

Posted: Mon Aug 11, 2025 2:48 pm
by tonton2
tonton2 wrote: Mon Aug 11, 2025 2:19 pm
serge_girard wrote: Sun Aug 10, 2025 2:46 pm Yosef, demande CHTGPT: reponse
merci

Code: Select all

Yes — HMG 3.4.4 (and any Harbour-based environment) can do something similar to Clipper’s “compile only changed files” approach, but it depends on how you organize the build process.

Clipper’s make utilities did this automatically if you used a .MAK file.
In HMG, you can achieve the same result in two main ways:

1. Use a make tool (recommended)
If you keep your .prg files separate and have a Makefile, you can let a build tool like make (or nmake on Windows) check file timestamps.

Example Makefile for HMG:

make
Kopiëren
Bewerken
APPNAME = myapp
PRGS = main.prg module1.prg module2.prg
OBJS = $(PRGS:.prg=.obj)

$(APPNAME).exe: $(OBJS)
   harbour $(PRGS)
   hmg -o$(APPNAME) $(OBJS)

%.obj: %.prg
   harbour $<

clean:
   del *.obj
   del $(APPNAME).exe
Now make will only compile .prg files that changed, then relink.

2. Compile individual .prg files manually
HMG lets you compile a single .prg without touching the others:

bat
Kopiëren
Bewerken
harbour module1.prg /n /i..\include
Then link it into your existing .exe:

bat
Kopiëren
Bewerken
hmg -oMyApp main.obj module1.obj module2.obj
If you keep your .obj files from the previous build, unchanged .prg files won’t be recompiled — just relinked.

3. GUI IDE builds (HMG-IDE)
If you’re using HMG-IDE, it always recompiles all .prg files by default.
To get incremental compilation, you’d have to:

Build your project in the IDE once (to generate .hbp and .hbc files).

Then, instead of pressing Run, compile from a batch file or make that preserves .obj files and only rebuilds changed ones.

💡 Practical tip:
If your project is large and you want Clipper-like speed, store your .prg files separately, use a Makefile or batch script, and don’t delete .obj files unless you do a clean rebuild.

If you want, I can give you a ready-to-use HMG 3.4.4 batch script that only recompiles changed .prg files and still lets you press one key to run the program. Would you like me to prepare that?

:

Je n'ai pas controle la reponse....
With great pleasure, thank you