Browse Prior Art Database

Using Smart Xml-Like Tags To Simplify Makefile Creation Disclosure Number: IPCOM000125901D
Original Publication Date: 2005-Jun-20
Included in the Prior Art Database: 2005-Jun-20
Document File: 5 page(s) / 37K

Publishing Venue



Writing makefiles can become extremely complex depending on a number of factors such as number of tags to be executed, platforms supported, configurations like debug/NonDebug etc.. Not only writing but maintenance of these makefiles can be nightmare as well. There are some solutions available help in automating makefile generation e.g. imake, ODE, but these require extensive knowledge to be able to use them. This solution makes it very easy to define xml-like tags (some are pre-defined, others can be custom designed) in text files and these tags can simplify the makefile generation and maintenance using a generator program.

This text was extracted from a PDF file.
This is the abbreviated version, containing approximately 38% of the total text.

Page 1 of 5

Using Smart Xml-Like Tags To Simplify Makefile Creation


Writing of makefiles, for compiling any kinds of code, is a process which can range from being relatively simple to becoming exponentially tedious as the complexity of operations to be performed and the number of subdirectories that the code spans across increases. Further requirements like compiling across multiple platforms and architectures and different modes like Debug/Non-debug make it even worse to write and maintain these makefiles.

The approach documented here also employs simple text files that are easy to understand and a utility that can generate makefiles from these text files. The reason these text files are easily readable is due to the unique idea of using smart xml-like tags in them to specify the operations and instructions. These text files are very easy to maintain and allow the makefiles to be generated quite easily for a number of platforms that the accompanying utility recognizes.

This tag approach fits in very well into situations involving code where the generated code is to be split between multiple jars or libraries with possible overlap between them.

Explanation of tags:

Here are some suggested tags which could be pre-defined, which will allow the use of this technology in various environments. Adding more tags and custom tags should be relatively easy.

Please note that these tags only suggest the use of this technology. A user could come up with their own version of tags which would make more sense to them in their build environments and would be easier for other users to understand as well.

Some example tags: <DIR> this tag at the top of the text file would tell that this text file is residing in the sdk directory relative to the com directory from which the package name starts.
.NT> or .AIX> and such tags identify the start of platform specific instructions
.NT< or .AIX< and such tags identify the end of platform specific instructions

Nested between these tags can be other tags. <DECL> </DECL> these tags specify global instructions which are passed into all makefiles generated, from top-level makefiles to makefiles in subdirectories as well <PRIVATE_DECL> </PRIVATE_DECL> these tags specify private instructions localized only to the current makefile

<TARGET mytarget> </TARGET> These are targets that the makefile processes and all instructions within the TARGET tags are processed for that particular target

<PROCESS subdirname> Specifies that a makefile needs to be generated for the subdirectory mentioned. A text file would be expected to be present in the surdirectory with instructions for that sub directory's makefile.

<SRC_JAVA><CLASS com\ibm\mm\sdk\common\dkAttr.class><JAR cmcmjar>

This tag tells that the source is a JAVA code and compiled class in the package has to be put in the cmcmjar.jar file.

<CLASS com\ibm\mm\sdk\common\dkAttr$Helper.class><JAR cmcmjar>

The class file