Migrate Source Files
The migration build process allows you to migrate existing
source files developed in the following environments:
C
Set++ for AIX, Version 3.1.4
VisualAge
C++ for OS/2, Version 3.0
VisualAge
for C++ for Windows, Version 3.5


IBM C
and C++ Compilers for OS/2, AIX and for Windows NT,
Version 3.6
A migration build fully compiles one source file at a time,
compared to normal builds which perform incremental compilation
only on changed files. The migration build allows you to fix any
errors in the file before it proceeds to the next file. The
migration build process does not make any changes to your source
files.
Before using the migration build process, create a
configuration file from an existing makefile using the
makefile-to-configuration-file conversion aid, make2cfg.
This ensures that the configuration file matches the requirements
for the migration build process, and that the file has not been
optimized.
To migrate your source files:
- Invoke the migration build process in one of the
following ways:
- Open the project in the IDE using the
configuration file created with make2cfg.
Click No in response to the
message dialog: "Project has not been built
yet. Would you like to begin a build?"
Select Migration Build from the Tools
menu. You may be asked whether you want to
continue with the migration build. This occurs
because the IDE normally opens with a set of
options that permit a normal build. Click Yes
to continue the migration build. The project
closes and reopens with options that are set for
a migration build, and the build continues. If
you click No, the migration
build does not proceed.
- Type the following command at the VisualAge C++
command prompt to open the IDE with migration
build options in effect:
vacide -nob -noc
Open the project using the configuration file
created with make2cfg and select
Migration Build from the Tools
menu in the IDE.
- Type the following command at the VisualAge C++
command prompt:
vacbld config.icc
-migrationbuild
where config.icc is the name of your
configuration file.
- If the configuration file contains macro source files,
the migration build process is likely to fail. If you are
running the migration build process through the IDE, the
migration build issues a warning and gives you the option
of continuing the build or of stopping it. If you are
running the migration build process with the vacbld
command at the VisualAge C++ command prompt, the warning
message appears and you can stop the process with the
Ctrl+C key combination.
If you stop the build, you can
take one of the following actions:
- Re-create the configuration file by running the make2cfg
conversion aid on your makefile, and then repeat
the migration build process.
- Remove the source files (from the configuration
file) on which the other source files are
dependent, and include them as header files in
the dependent source files in the traditional
manner, that is, as #include statements. (This
ensures that functions, classes, and variables
are declared and that macros are defined in each
file before it is processed.) Restart the
migration build process.
- Stop using the migration build process and
attempt a normal build.
- Correct any errors identified in the single file, and run
the migration build again.
- If you invoked the migration build from the IDE,
click the Build button
on the toolbar, and the build
proceeds and attempts to build the next source
file.
- If you invoked the migration build through the vacbld
command, you need to invoke the command again. In
this case the migration build starts from the
beginning and all source files are processed
again, one file at a time.
- Continue to run the migration build until you correct the
errors in each of the files and the migration build
completes successfully. Even though the tool directive (tool
'config_opt') to invoke the configuration
optimizer during a normal build may have been added to
the configuration file, the tool directive is ignored
during the migration build.
After a Successful Migration Build
Notes:
- When you run a migration build with the IDE, you have
turned off the options that generate a persistent
codestore during a build. Any subsequent projects opened
in the IDE during the same session will not generate a
persistent codestore with either a normal build or a
migration build. To ensure that the options for a
persistent codestore are reset, close the IDE and reopen
it before attempting a normal build.
- The migration build process is only intended for the
migration of an application from a previous release. You
should not use the migration build process once you have
completed the migration. If you do reuse it, the results
may be unpredictable.
Limitations
The migration build process should not be used with either a
persistent codestore or a configuration file that has been
optimized in any way.
If a persistent codestore (an .ics file), exists from an
earlier build of the configuration file, it will be ignored by
the migration build process. If you specify a codestore on the
command line when you invoke the migration build through vacbld,
it will also be ignored.
Use the make2cfg makefile conversion aid to
convert your makefile to a configuration file to avoid any
optimization of the configuration file.

Codestore
Configuration Files
Migration Tools

Build in the IDE
Convert Makefiles to Configuration Files
Optimize Configuration Files after
Migration

Migration Build Considerations