Principles:
  The construction is made from files located in ./admin
derived from the GILDAS ones:

  gildas-env.sh
  Makefile.admin
  Makefile.build
  Makefile.def
  Makefile.demo
  Makefile.doc
  Makefile.etc
  Makefile.lib
  Makefile.main
  Makefile.pro
  Makefile.python
  Makefile.struct
  Makefile.tasks

with modifications on
  Makefile.def              latex2html replaced by makehtml
  Makefile.build            latex2html replaced by makehtml
and in 
  imager-env.sh
which is cloned from gildas-env.sh  by substituting "gildas" by "imager"
  and adding a line of comments to acknowledge the original authors.

Specific versions are needed for IMAGER compared to GILDAS, and these
vesions differ slightly for standard compilation and MacPorts.

Generic versions that can generate the "compile" and "MacPorts" versions
are handled in directory Admin-Source. This generation requires 6 steps
described below.

----------------------------------------------------------------------------

1) Go to the Admin-Source directory in the IMAGER tree.
  Logical name $IRAM_ROOT should point to the GILDAS tree (obtained
  from a "git pull", or by a standard installation from the IRAM Web Site) 

2) Look at the GitHub site of GILDAS on MacPorts

https://github.com/macports/macports-ports/blob/master/science/gildas/Portfile

As of April 2025, the Portfile normally indicates 3 patch files, for
  Makefile.def
  gildas-env.sh
  define-system.sh
  
All other files are thus system independent
  
3) Verify the "reimport-from-gildas" script. If any other file appeared at step 2), 
  this script must be modified. Changing the list of files to include all those of 
  Step 1 is in general sufficient. 
  
    However there may also be specific changes in some other Makefile.* files for Imager. 
  This can be checked by comparing these Makefile(s) in the ../admin tree to those
  for the original $IRAM_ROOT/admin tree. The Step 3 in the script shows example
  of what may be needed.
  
4) Execute the "reimport-from-gildas" to generate the IMAGER specific files

5) Verify the "substitute.compile.sh" and "substitute.macport.sh" scripts

    These scripts should do nothing for MacPorts but 
  replace "@PREFIX@/bin/gsort"  by "sort" for Linux, as well as some
  other @DIRECTIVE@ by nothing. 
    
    If any other file appeared at step 1), they may need to be modified
    
6) Check the changes with a "git diff ." command.
   Commit these changes after this verification.
  
7) Execute the "substitute.compile.sh" script for manual compilation, or
    "substitute.macport.sh" for MacPorts preparation
  
  This customize the files in the ../admin/ directory that are to be used
  after.
--------------------------------------------------------------------------------

Steps 1 to 6 must be performed when a new release is intended.

Step 7 is to be done once when packaging the binary version for Linux,
or for MacPort.

    
  
  
    
    
