About HMG - AI's view!

Discuss anything else that does not suite other forums.

Moderator: Rathinagiri

User avatar
serge_girard
Posts: 3333
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Contact:

Re: About HMG - AI's view!

Post 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....
There's nothing you can do that can't be done...
User avatar
mol
Posts: 3789
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Contact:

Re: About HMG - AI's view!

Post by mol »

You must add line
inc=yes
In IDE's configuration tab
User avatar
tonton2
Posts: 465
Joined: Sat Jun 29, 2013 1:26 pm
Location: Algerie
Contact:

Re: About HMG - AI's view!

Post by tonton2 »

mol wrote: Sun Aug 10, 2025 6:50 pm You must add line
inc=yes
In IDE's configuration tab
merci
L'Algerie vous salut
Y.TABET
User avatar
tonton2
Posts: 465
Joined: Sat Jun 29, 2013 1:26 pm
Location: Algerie
Contact:

Re: About HMG - AI's view!

Post 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....
L'Algerie vous salut
Y.TABET
User avatar
tonton2
Posts: 465
Joined: Sat Jun 29, 2013 1:26 pm
Location: Algerie
Contact:

Re: About HMG - AI's view!

Post 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
L'Algerie vous salut
Y.TABET
Post Reply