Maintain your software with amake (a make utility for developers). Supports strong pattern recognition and transformations. A single makefile can be used to compile an entire project.
Be the first to post a text review of Alexis Make. Rate and review a project by clicking thumbs up or thumbs down in the right column.
As I needed to recompile AMake, I noticed that one file was generating a warning (grammar.c). I fixed it so it compiles as is with gcc v4.1.2. That's pretty much it on this one... Enjoy! Alexis
AMAKE'S HISTORY * Mar 4, 2007 V2.10.21 . Fixed grammar.c for gcc version 4.1.2 . Removed the -C to the install tool * May 15, 2005 V2.10.20 . Fixed the $(wildcard ...) The use of the $(wildcard ...) in the current directory would be riddled by all the patterns and other files which don't exist and are by default added to the current directory. I.e. if you were to type: FILES=$(wildcard *) #echo $(FILES) in version 2.10.19 (at least) then you'd get files such as %.c, %.cpp, %.f, etc. This problem may affect some other instructions. . Fixed the .NULL test for dependencies In searching for dependencies, files without an extension are given the .NULL extension. This can be defined in the variable CSUFFIXES as in: CSUFFIXES:=.cxx .NULL then files with no extension will be searched like files with the .cxx extension. The .NULL in CSUFFIXES was ignored before. . -- line skipped -- message I finally reworked the function reading the output of a command line so it would properly skip the '-- line skipped --' since once in a while it wouldn't be skipped for some reason that I don't really know about. In any event, it is now filtered out which means that if you have a tool which generates such a line of output, it won't appear either. But I like it better this way anyway. Btw, it should be a bit faster too! The new function avoids many malloc()/free() and it reads lines at once instead of a few characters to be filtered (it is also a lot simpler to understand and fix further). * February 8th, 2005 . Added multi-/ and multi-\ support Functions comparing paths between each others will now use the special functions making sure that any double, triple, etc. separators (/ or \) are considered as one (thus "//" == "/"). * February 5th, 2004 V2.10.19 . Fixed a crash Somehow, an undefined macro could generate a NULL pointer which later could improperly be tested and generate a crash. . Added real support for Mac OS/X (Nov 2004) This time I could compile and run AMake on a Mac OS/X system. This required a few changes, most certainly for the better. This includes a makefile.mac and some changes to the code to accomodate the Mac system. . Fixed Errors in Windows (Feb 2005) Under MS-Windows, amake wouldn't set a flag on error and thus it looked like the -k option was always in operation. This was fixed. . Enhanced the Patterns comparison function Now the patterns will compare multiple / (and \ on WIN/MINGW) characters as one. Thus //this// is equal to /this/. * October 26th, 2003 V2.10.18 . Debian Package Doug Barbieri created a debian package so you can install amake on your Debian system without having to figure out anything. Note that isn't a full compliant package yet, that will come along later... . Added a license I added the license to the documentation. It was already there under Copyright, but I thought it would be better if it were to be stated as a license instead. . Case comparison functions I added the proper initialization for the uppercase/lowercase function initialization at the start of the options. I don't think it was important, but just in case the argument initialization is to use it at a later time, it will work. . Fixed variables matching function When a filename included a space, the name was likely to be quoted. In this case, the matching would fail since the quotes would be tested. I added a call to the function unquoting the string if necessary. Example: OUT="My filename includes spaces.exe" $(OUT): $(OUT:*.exe=*.o) ... With this version the .exe will be found and replaced with a .o. Note that the quotes are likely to be removed from the name in the list of words, and re-inserted on your command line(s) as required. . Made a fix for #echo, #error, #warning Some people would have the habit to put a string after one of these instructions (as in C/C++). Now the start and end quotes won't be printed in the output. Note that quotes within will still be printed. Thus an error such as: #error You GNU C/C++ compiler is too old (you have "$(VERSION)") will print as before. . Changed to copyright Now the copyright includes 2004. . Changed the makefile.mingw I fixed the tar/package targets so it kind of works. It won't create a complete package though and it requires a make which supports the $(patsubst ...) and $(nodir ...) functions. * October 13th, 2003 V2.10.17 . Real silence The message: '"<file>" is up to date' is not printed anymore when one of the silent options is used . Case Sensitivity The test of case sensitivity was also included in patterns. This the pattern "%.O" will match "a.o" and vice versa, "%.o" will match "A.O". All the patterns will work this way, including the strong AMake patterns (such as "object/*/*.o=source/*/*.c" which will accept file names in whatever case, in this example object could be found as actually being "ObjecT" and the file name can also be "A.O"). As a reminder, case sensitivity should only be changed when required. On a DOS and Amiga system, use case insensitive. On all other systems, use case sensitive. * September 28th, 2003 V2.10.16 . Added my amakefile in the -src I added this file so I have a copy on sourceforge. I will certainly look into having more developer files included as it goes. . Fixed the default # of parallel jobs In some cases, we could end up with -1 as the number of parallel jobs. I changed that to 0 so we get the proper default. . Fixed the amake-rules.mk Made a few fixes of the amake-rules.mk so the MINGW flag is slightly better handled (for instance,it will use gcc/g++ by default instead of cc). The main problem with MINGW is that you may have a shell. If that's the case, then the default rules would need to be different than what they currently endup being. . Fixed the '-' in MAKEFLAGS Sorry! This was actually correct (having no - or only one - for strings). This is back to normal (compatible with GNU and SGI make tools). Also, command lines with proper quotes would get additional, invalid quotes (such as the --use-time="..."). This was fixed by changing the low level lstr_spaces() function. There is another bug which is when a space and quotes are present in a value, but the spaces are not inside the quotes, then the whole option gets quoted, but the quotes won't be properly escaped. (i.e. an option such as --test="a" "b" will improperly be transformed in "--test="a" "b"" instead of "--test=\"a\" \"b\""). This will be fixed later. . Fixed the alternate (#!/bin/amake) When the --directory was specified on the recursive call and the makefile included an alternate different from the running amake, then it was trying to cd in the specified directory twice (the 2nd time it would fail). The --directory is still being passed down to the alternate amake, however, the path is restored before AMake runs the alternate command line. * August 28th, 2003 V2.10.15 . Added support for proper maximum concurrent under Linux If you have the "/proc/cpuinfo" file properly defined under your Linux system, then AMake will count the number of processors available on your system and multiply that by 2 as the default maximum concurrent targets to be created at once. . Fixed the help output The help output would write long flags information right after the flag without spaces. Now, such flags get their information properly aligned on the next line. . Added some special targets The following targets are defined in the WMAKE tool from Watcom and were added to AMake: .AFTER (like .END) .AUTODEPEND (like --autodepend, similar to $(...:I)) .BEFORE (like .BEGIN) .BLOCK (like --block) .CHECK (like --check; check existance of target) .CONTINUE (like -k/--keep-going) .ERASE (like .DELETE_ON_ERROR) .EXTENSIONS (like .SUFFIXES) .HOLD (see --hold and --keep-on-error) .KEEP_ON_ERROR (see --hold and --keep-on-error) .NOCHECK (see --no-check) .OPTIMIZE (accepted but ignored) .SYMBOLIC (like .PHONY) . Added support for Watcom special macros Available are $^@, $^*, $^&, $^:, $^. $[@, $[*, $[&, $[:, $[. $]@, $]*, $]&, $]:, $]. Note that can cause some problems if you used $^ directly followed by one of these characters. In the DOS version the $^& at the end of a line may be taken as $^ + new line. For this support a .TAIL macro was created. This is equivalent to $(.TARGET:T) . Added Watcom variables The following variables were added for watcom compatibility: __WINDOWS__set to 1 when running under Microsoft Windows __VERSION__the version of AMake (i.e. 210 for 2.10.15) __MAKEOPTS__the flags AMake was invoked with __MAKEFILES__set to the list of makefiles (see -f) . Added variables The following variables were added: MAKE_RELEASEthe release of AMake (i.e. 15) __RELEASE__the release of AMake (i.e. 15) . Fixed the doc Found tons of errors in the doc. Also, I made major fixes in regard to many topics which were either wrong or out of date. Fixed the English a bit too. Also added doc about the new targets, options, variables, etc. And added support for things I wrote in the doc. a while ago but weren't actually implemented yet! (such as support for the MAKELIBS variable). . Added support for new functions $(<func> ...) The following new functions were added: $(call ...) $(echo ...) $(error ...) $(message ...) $(warning ...) $(wordlist ...) . Added a --list-special (or --list-attributes), --list-preprocessor and --list-functions These special command line options can be used to get information about all of the - special targets and attributes currently supported, - preprocessor instructions (includes information such as whether it can alter the current condition state) - list of macro functions such as $(call me,at,the,usual,number) The --help, --list-special, --list-preprocessor and --list-functions can all be used on the same command line. In this case you will get all the lists. . Added support for target variables It is quite often useful to have a variable set with a value specific to one or several targets but not all. This is useful when you have a single set of command lines to work on multiple targets. The syntax is like in GNU, except AMake understands it with multiple targets and multiple variable names used on the same command line: t1 t2 t3: v1 v2 v3 += additional value All the usual operators are accepted (= := ?= != <= +=). Enjoy! (I know I will!) . Fixed the #shell This preprocessor would always execute the shell commands, even in --dry-run. Now, it won't be unless you start the command line with a + (you can still use the - to avoid errors, +- or -+ will work). Fixed the bug with the - which would generate a crash trying to free the buffer at the address + 1. . Added support for the <?, >? and ^^ operators The preprocessor accepting an expression can now make use of the minimum (<?), maximum (>?) and logical xor (^^) operators. . Added the .[NO]CHECK and --[no-]check Added the .[NO]CHECK targets and --[no-]check command line options to enable/disable the option of the same name from Watcom. Namely that the target will be or not checked for existance once the commands were executed. This is, in a way, the opposite of .PHONY. . Fixed the amake-rules.mk The TARGET_MARCH under Linux now needs to be -march=<arch> Also the assembler tool (as) doesn't support any architecture under the Intel 80x86. . Added support for a makeinit file AMake will check for a make file named "makeinit". If it exists it is loaded first. Also, the .depend file can be ignored with the --no-default-make option command line (the makeinit is ignored in that case too). . Fixed a possible bug in lshl_print() This function would use memcmp() with a null pointer (and a length of zero) which is not safe on all systems. . Fixed the touch option When utime() or fopen() were to fail because the file was write protected or otherwise, the touch would silently fail. . Fixed the min/max shell return error code The function would print out a debug printf(). . Added [else]ifeqi and [else]ifneqi These preprocessor will automatically ignore the case of the input strings. Thus "ifeqi VERSION version" is true. . Added .loaddll (pre-processor) Accepted but ignored for Watcom Make compatibility. . Fixed several error messages Some additional error messages make use of the strerror() function to print out the system errors. Also some messages were syntactically wrong. . Fixed the $(MAKEFLAGS) This variable (and some others) should have been set to the flags used on the command line and the .MAKEFLAGS/.MAKEOPTS special targets. However, the - was missing in the front of all the options. Also, the .MAKEFLAGS and .MAKEOPTS didn't properly refresh these variables. This is also fixed. Finally, the options followed by a list of strings wouldn't use the "-" or "--" in the front of the 2nd, 3rd, etc. option. . Implemented the --use-time option This option allows you to simulate any date and time at which AMake is started. . Fixed the --<compatible> & defaults Some defaults were not respected when entering a certain mode. Now this is done by forcing some defaults when a compatibility flag is encountered (ie. in Watcom land the --check is effective by default under DOS). . Fixed "else ifnmake" This was previously taken as "else ifndef". . Fixed "[else]if[n]eq[i] <var> <value>" These functions would crash AMake if the variable wasn't set. These were also added in the amake.vim. . Fixed the tmpnam() The shell.c source code would generate "unique" file names using tmpnam(). This was replaced with an sprintf() and the names as "{tmp,/tmp,.}/amake<pid>-<#>.tmp" (i.e. AMake test for a tmp directory in the current directory, then in the root path and otherwise uses the current directory as a temporary directory). The defaults can be overridden by defining the TMPDIR environment variable or a macro in the makefile. . Fixed the cpp.c This file was making use of sys_errcnt and sys_errstr which is deprecated. I now use the strerror() function (which I should very certainly use much more all over the place!) . Fixed the lfil_open() function This function can now return NULL instead of existing when a file doesn't (seem to) exist. Some other functions make use of this. . Fixed the ldep_depend() function When opening a source file, the lfil_open() can return NULL and thus we can know if the file exists or not. If the file doesn't exist, we simply don't do anything. In this case, the makefile should have been written to automatically generate the file (or retrieve it out from an archive). This means only the second run of amake will properly generate the dependencies, but on the first run the files will anyway be marked as out of date. Thus the system should work properly in all cases. NOTE: this is important if some of your source files are not checked out at all (this especially happens when you just checked in without the option saying "keep a local copy") * April 10th, 2003 V2.10.14 . Fixed the lvar_macro() function The function would always copy a list of words, even when that list was empty. Now it needs to include at least one item. This was making the system crash especially when the '::' macro separator was used as in: $(MY_VAR::*.c=*.o) If MY_VAR didn't include any *.c files, then amake would either crash or generate random strings. * November 13rd, 2002 V2.10.13 . Fixed the lstr_clean() function This function would loop forever in case the result was the empty string (as in "foo/../myfile.c - the path is equivalent to a null path). * October 30th, 2002 V2.10.12 . Reading of makefiles in Win32 The files were open for reading with "r" instead of "rb". This was fixed. The Unix versions are not affected by this change. . Bad cleaning rules The makefile.mingw and makefile.dos never had their clean, clobber and rmtargets targets working. This was fixed. . Compiles with NMAKE and CL Made a few changes so it compiles with CL (from Microsoft VC++ v6.x) and doesn't generate any warning. Note that if you have MinGW, don't use CL!!! Since it generates binaries which are twice bigger, it really doesn't make any sense to use CL (unless you absolutly want MS debugs). * October 23rd, 2002 V2.10.11 . Variable pattern bug When a pattern finished by a lone backslash, the software would hang. This was fixed. . Package bug The previous binary package was "wrongly" named with -i386 but no system was specified. It was Linux in case you were wondering. . Package addition I added a compiled version of amake to work under Silicon Graphics Inc. IRIX 6.5 with at least a MIPS 5000. I added a compiled version of amake to work under MS-Windows (compiled with MinGW). Works with at least Win32 and an 80386 processor. * October 21st, 2002 V2.10.10 . Fixed the module I noticed that the module wouldn't put all the files within a sub-directory. Also, I created several type of compressions for both sources and binary versions. . Pattern bug fix There was a bug in the pattern checking code where a pattern finishing with a ? or [] followed by an asterisk (*) would fail. . Compiles under MinGW There is makefile.mingw so you can easilly create amake under MS-Windows. . Version bug fix The version returned by uname() is better handled so the realease and bug release versions are ignored if invalid. . Flags fixed Some command line flags were fixed so they work properly. . Shell errors The lsh_error() function didn't increase the error counter at all. * Marsh 1st, 2002 V2.10.9 . New features The rules include one rule to compile java programs which looks like this: $(JAVAC) $(JAVAFLAGS) <filename>.java You can use this default rule with a line as follow: MyClass.class: $(.TARGET).java * June 15th, 2000 V2.10.8 . New features Compiles under IRIX 6.5 without warnings with C Pro V7.x. The new system macro $(.SERIAL) was added so one can easily create unique file names and such in its shell scripts A new letter was added in macro support to give an easy way to transform paths - defined in variables such $(PATH) and $(XFILESEARCHPATH) - in a list of words. Simply use: $(PATH:P). The REPORT.BUG was added so as to enable an easy way to report bugs found in amake including all the revelant informations. . Bug fixes AMake was setting environment variables using a local string variable. This was fixed by duplicating (allocating) the necessary strings. The archive searching mechanism now uses a length to test the name so it doesn't check after the end of the string (though it should be null terminated, it's safer this way). The pattern search didn't check if a file was a directory or not. Patterns such as */*.c would return errors on files in the current directory which were not directories. The documentation was wrongly defining CINCLUDEPATH as CINCLUDEDIR. In Linux V2.2.x bash starts with echo OFF enforced before to execute the default startup shell scripts. That way amake always starts silently now. Since the %: %,v targets have been fixed, the 'if test ...' has been removed from the amake-rules.mk file. Fixed the amake.doc for some syntax, grammar errors and forgotten entries. * March 12th, 2000 V2.10.7 . New features AMake has one more variable assignment operator which will take the right side words as filenames which are read in and used as the contains of the variable(s). This operator syntax is: <variable> <= <filenames> . Bug fixes The --order option had a couple of crashing bugs when targets without any dependencies where used. The --state-file and --error-output-file where defined as single character flags instead of string parameters. The #ifmake preprocessor operation would not properly take in account the result of the test. A couple of string functions didn't handle DOS filenames properly. Avoid calls to system() with empty command lines (and therefore NULL string pointers). A few things like the $(.TARGET:H) instead of $(.TARGET:D) were modified to be slightly more accurate. Enabled the input to use '\n' (unix), '\r\n' (PC) or '\r' (Mac) to mark the end of a line. Fixed the RSC/SCCS problems were the modified sources would not always recompile. * December 1st, 1999 V2.10.6 . New features AMake accepts the --out-of-date option so as to make sure all the targets at all the levels are made out of date. This is equivalent to a make clean. * November 14th, 1999 V2.10.5 . New features CMake compatibility was added. This simply ensures that AMake will run in parallel mode even when options such as --jobs 1 or targets such as .NO_PARALLEL: are used. It also turns ON the network feature. Yet, this one can be turned OFF in the script. The amake.doc was updated to include the sunmake binary name (and smake on SUN systems). Added concurrent C compile & link options in the amake rules file. AMake compiles under FreeBSD and includes another makefile to use under that system and create the software. AMake accepts patterns on special targets as in the following: .PRECIOUS: %.o %.c %.s %.l %.y %.p %.f note that this option doesn't actually work for the .IGNORE, .SILENT and .SINGLESHELL for these are specific to the command lines. It only applies to the following targets: .DELETE_ON_ERROR, .INTERMEDIATE, .NOTMAIN, .ORDER, .PHONY, .PRECIOUS and .SECONDARY. . Bugs fixes AMake doesn't need to have a makefile anymore. The default rules will suffices. However, AMake will need to have access to these rules. Calling AMake smake under SUN would have called the Joerg compatible mode anyway. This is fixed. The SUN make <macro>:sh=<command> let's the shell transform the variables in <command>. AMake was transformed to do the same thing. However, comments are still withdrawn before the result is sent to the shell interpreter. Updated all the makefiles to include the network.c source file. The --precious & --secondary main flags were not taken in account to prevent intermediate files deletion. The SUN version wouldn't work because the environment would end with an empty string instead of a NULL pointer. This was fixed and it works much better. * November 7th, 1999 V2.10.4 . New features AMake recognize a .ERROR target which is ran whenever an error occured. The $(.ALLSRC) target will list all the targets which generated an error before the .ERROR commands are executed. AMake accepts macro transformation patterns which include spaces or tabs as in: $(MACRO: s.%.o = %.o ) . Bugs fixes Fixed a bug which would declare existing files as intermediate and would therefore delete some source files which could be the edited once * August 30th, 1999 V2.10.3 . New features AMake compiles under SunOS 5.x It will search for the system makefiles in the current directory as well and search for files named amake.rules and make.rules. The GNU Make options can be specified with an equal sign as in "--file=myscript" The default makefile can be Iamakefile, iamakefile, Imakefile, imakefile when the --imake option is used. Several other options were added to enhance the support of Imake in AMake. It also checks for the IMAKE... environment variables. To complet the Imake features, AMake understands the following additional options on the command line: --imake --imakeCfile <source filename> --imake-only --imake-output <script filename> --keepCfile --template <template> -T <template> When no default makefile is found AMake will check for an SCCS filename (i.e. any makefile name with "s." prepended) or an RCS filename (i.e. any makefile name with ",v" appeneded). If one of these file is found AMake will generate the default necessary command to retrieve it. AMake now understands the following macro syntax: <macro>:sh = <command> and $(<macro>:sh) A new version of make.vim was created to support the syntax of AMake and all its functions, special targets, pre-processor, etc. When some files are automatically removed by AMake the user can know about them with the use of the --show-removed-file command line option. . Bug fixes the lstr_clean() was fixed so file names such as ../../test will not be reduced and therefore will work. the locking file is named LOCK.amk under DOS (instead of LOCK.amake) the CINCLUDEPATH doesn't need to be defined when the special variable $(<name>:I) is used; AMake will use the current working directory as the default (before it would generate a fatal error) GNU compatibility mode searches for GNUmakefile first once in a while the use of a macro with a set of directories would crash AMake which was actually freeing the same variable twice a target without any commands is now properly transformed with the correct default target (pattern, suffixes or .DEFAULT) the llst_concat() would increase the pos parameter even when this one was -1 (i.e. inserting new parameters at the very beginning instead of appending them) the pattern rules are much better handled and will work in most cases; before it would use the first matching pattern rule instead of the proper pattern rule and it would go through all the patterns looping for a quite long time; there was also a problem with patterns such as s.% where the stem would have been invalid fixed the $(<varname>:I) and $(<varname>:U) so the I and U can also be used to start any filename; thus $(<varname>:ISO) will not be used like if $(<varname>:I) was given * August 7th, 1999 V2.10.2 . New features --case-sensitive option --case-insensitive option . Bug fixes $(<var>:E) doesn't return hidden files $(<var>:R) doesn't suppress hidden files $(<var>:?) handles the / and \ properly under DOS the default system filenames are not freed before to be used (system.mk or amake-rules.mk) a comment which doesn't start at the beginning of a line will silently be removed (even) before a target is declared; after, it will become part of the shell commands By default, the \ will be used to skip only a very few characters when you use AMake in DOS. This doesn't change the behavior of AMake under any other systems. The --gnu and --sun work properly (i.e. these are accepted). . More explainations Made sure the software compiled under MS-DOS with the C/C++ compiler from Microsoft (Version 1.60.5270). Suppress the $(shell ...) in DOS compatible mode (at this time I didn't program pipes in MS-DOS). Fixed the default patterns for variable transformations: $(<var>:R) will return hidden filenames; $(<var>:E) will not return hidden filenames; $(<var>:?) where ? is any of R, E, H, T will take the backslash in account when you compile the DOS version (so a filename like object/amake.c is similar to object\amake.c toward these options). File names under DOS and AMIGA will be compared case insensitive by default. If AMake would be called make on any system except Linux it was supposed to enter the ANSII mode automatically. That was fixed. The makefile.dos was fixed so it includes argument.c instead of arguements.c. The makefile.dos would create a file named forget.tmp; now this file is automatically deleted once not necessary any more. The makefile.dos also includes /W4 to force the compiler to generate all the warnings it can. Some of the unused parameters errors were suppressed with the use of the #warning preprocessor available with CL from Microsoft.
AMAKE'S HISTORY * Mar 4, 2007 V2.10.21 . Fixed grammar.c for gcc version 4.1.2 . Removed the -C to the install tool * May 15, 2005 V2.10.20 . Fixed the $(wildcard ...) The use of the $(wildcard ...) in the current directory would be riddled by all the patterns and other files which don't exist and are by default added to the current directory. I.e. if you were to type: FILES=$(wildcard *) #echo $(FILES) in version 2.10.19 (at least) then you'd get files such as %.c, %.cpp, %.f, etc. This problem may affect some other instructions. . Fixed the .NULL test for dependencies In searching for dependencies, files without an extension are given the .NULL extension. This can be defined in the variable CSUFFIXES as in: CSUFFIXES:=.cxx .NULL then files with no extension will be searched like files with the .cxx extension. The .NULL in CSUFFIXES was ignored before. . -- line skipped -- message I finally reworked the function reading the output of a command line so it would properly skip the '-- line skipped --' since once in a while it wouldn't be skipped for some reason that I don't really know about. In any event, it is now filtered out which means that if you have a tool which generates such a line of output, it won't appear either. But I like it better this way anyway. Btw, it should be a bit faster too! The new function avoids many malloc()/free() and it reads lines at once instead of a few characters to be filtered (it is also a lot simpler to understand and fix further). * February 8th, 2005 . Added multi-/ and multi-\ support Functions comparing paths between each others will now use the special functions making sure that any double, triple, etc. separators (/ or \) are considered as one (thus "//" == "/"). * February 5th, 2004 V2.10.19 . Fixed a crash Somehow, an undefined macro could generate a NULL pointer which later could improperly be tested and generate a crash. . Added real support for Mac OS/X (Nov 2004) This time I could compile and run AMake on a Mac OS/X system. This required a few changes, most certainly for the better. This includes a makefile.mac and some changes to the code to accomodate the Mac system. . Fixed Errors in Windows (Feb 2005) Under MS-Windows, amake wouldn't set a flag on error and thus it looked like the -k option was always in operation. This was fixed. . Enhanced the Patterns comparison function Now the patterns will compare multiple / (and \ on WIN/MINGW) characters as one. Thus //this// is equal to /this/. * October 26th, 2003 V2.10.18 . Debian Package Doug Barbieri created a debian package so you can install amake on your Debian system without having to figure out anything. Note that isn't a full compliant package yet, that will come along later... . Added a license I added the license to the documentation. It was already there under Copyright, but I thought it would be better if it were to be stated as a license instead. . Case comparison functions I added the proper initialization for the uppercase/lowercase function initialization at the start of the options. I don't think it was important, but just in case the argument initialization is to use it at a later time, it will work. . Fixed variables matching function When a filename included a space, the name was likely to be quoted. In this case, the matching would fail since the quotes would be tested. I added a call to the function unquoting the string if necessary. Example: OUT="My filename includes spaces.exe" $(OUT): $(OUT:*.exe=*.o) ... With this version the .exe will be found and replaced with a .o. Note that the quotes are likely to be removed from the name in the list of words, and re-inserted on your command line(s) as required. . Made a fix for #echo, #error, #warning Some people would have the habit to put a string after one of these instructions (as in C/C++). Now the start and end quotes won't be printed in the output. Note that quotes within will still be printed. Thus an error such as: #error You GNU C/C++ compiler is too old (you have "$(VERSION)") will print as before. . Changed to copyright Now the copyright includes 2004. . Changed the makefile.mingw I fixed the tar/package targets so it kind of works. It won't create a complete package though and it requires a make which supports the $(patsubst ...) and $(nodir ...) functions. * October 13th, 2003 V2.10.17 . Real silence The message: '"<file>" is up to date' is not printed anymore when one of the silent options is used . Case Sensitivity The test of case sensitivity was also included in patterns. This the pattern "%.O" will match "a.o" and vice versa, "%.o" will match "A.O". All the patterns will work this way, including the strong AMake patterns (such as "object/*/*.o=source/*/*.c" which will accept file names in whatever case, in this example object could be found as actually being "ObjecT" and the file name can also be "A.O"). As a reminder, case sensitivity should only be changed when required. On a DOS and Amiga system, use case insensitive. On all other systems, use case sensitive. * September 28th, 2003 V2.10.16 . Added my amakefile in the -src I added this file so I have a copy on sourceforge. I will certainly look into having more developer files included as it goes. . Fixed the default # of parallel jobs In some cases, we could end up with -1 as the number of parallel jobs. I changed that to 0 so we get the proper default. . Fixed the amake-rules.mk Made a few fixes of the amake-rules.mk so the MINGW flag is slightly better handled (for instance,it will use gcc/g++ by default instead of cc). The main problem with MINGW is that you may have a shell. If that's the case, then the default rules would need to be different than what they currently endup being. . Fixed the '-' in MAKEFLAGS Sorry! This was actually correct (having no - or only one - for strings). This is back to normal (compatible with GNU and SGI make tools). Also, command lines with proper quotes would get additional, invalid quotes (such as the --use-time="..."). This was fixed by changing the low level lstr_spaces() function. There is another bug which is when a space and quotes are present in a value, but the spaces are not inside the quotes, then the whole option gets quoted, but the quotes won't be properly escaped. (i.e. an option such as --test="a" "b" will improperly be transformed in "--test="a" "b"" instead of "--test=\"a\" \"b\""). This will be fixed later. . Fixed the alternate (#!/bin/amake) When the --directory was specified on the recursive call and the makefile included an alternate different from the running amake, then it was trying to cd in the specified directory twice (the 2nd time it would fail). The --directory is still being passed down to the alternate amake, however, the path is restored before AMake runs the alternate command line. * August 28th, 2003 V2.10.15 . Added support for proper maximum concurrent under Linux If you have the "/proc/cpuinfo" file properly defined under your Linux system, then AMake will count the number of processors available on your system and multiply that by 2 as the default maximum concurrent targets to be created at once. . Fixed the help output The help output would write long flags information right after the flag without spaces. Now, such flags get their information properly aligned on the next line. . Added some special targets The following targets are defined in the WMAKE tool from Watcom and were added to AMake: .AFTER (like .END) .AUTODEPEND (like --autodepend, similar to $(...:I)) .BEFORE (like .BEGIN) .BLOCK (like --block) .CHECK (like --check; check existance of target) .CONTINUE (like -k/--keep-going) .ERASE (like .DELETE_ON_ERROR) .EXTENSIONS (like .SUFFIXES) .HOLD (see --hold and --keep-on-error) .KEEP_ON_ERROR (see --hold and --keep-on-error) .NOCHECK (see --no-check) .OPTIMIZE (accepted but ignored) .SYMBOLIC (like .PHONY) . Added support for Watcom special macros Available are $^@, $^*, $^&, $^:, $^. $[@, $[*, $[&, $[:, $[. $]@, $]*, $]&, $]:, $]. Note that can cause some problems if you used $^ directly followed by one of these characters. In the DOS version the $^& at the end of a line may be taken as $^ + new line. For this support a .TAIL macro was created. This is equivalent to $(.TARGET:T) . Added Watcom variables The following variables were added for watcom compatibility: __WINDOWS__set to 1 when running under Microsoft Windows __VERSION__the version of AMake (i.e. 210 for 2.10.15) __MAKEOPTS__the flags AMake was invoked with __MAKEFILES__set to the list of makefiles (see -f) . Added variables The following variables were added: MAKE_RELEASEthe release of AMake (i.e. 15) __RELEASE__the release of AMake (i.e. 15) . Fixed the doc Found tons of errors in the doc. Also, I made major fixes in regard to many topics which were either wrong or out of date. Fixed the English a bit too. Also added doc about the new targets, options, variables, etc. And added support for things I wrote in the doc. a while ago but weren't actually implemented yet! (such as support for the MAKELIBS variable). . Added support for new functions $(<func> ...) The following new functions were added: $(call ...) $(echo ...) $(error ...) $(message ...) $(warning ...) $(wordlist ...) . Added a --list-special (or --list-attributes), --list-preprocessor and --list-functions These special command line options can be used to get information about all of the - special targets and attributes currently supported, - preprocessor instructions (includes information such as whether it can alter the current condition state) - list of macro functions such as $(call me,at,the,usual,number) The --help, --list-special, --list-preprocessor and --list-functions can all be used on the same command line. In this case you will get all the lists. . Added support for target variables It is quite often useful to have a variable set with a value specific to one or several targets but not all. This is useful when you have a single set of command lines to work on multiple targets. The syntax is like in GNU, except AMake understands it with multiple targets and multiple variable names used on the same command line: t1 t2 t3: v1 v2 v3 += additional value All the usual operators are accepted (= := ?= != <= +=). Enjoy! (I know I will!) . Fixed the #shell This preprocessor would always execute the shell commands, even in --dry-run. Now, it won't be unless you start the command line with a + (you can still use the - to avoid errors, +- or -+ will work). Fixed the bug with the - which would generate a crash trying to free the buffer at the address + 1. . Added support for the <?, >? and ^^ operators The preprocessor accepting an expression can now make use of the minimum (<?), maximum (>?) and logical xor (^^) operators. . Added the .[NO]CHECK and --[no-]check Added the .[NO]CHECK targets and --[no-]check command line options to enable/disable the option of the same name from Watcom. Namely that the target will be or not checked for existance once the commands were executed. This is, in a way, the opposite of .PHONY. . Fixed the amake-rules.mk The TARGET_MARCH under Linux now needs to be -march=<arch> Also the assembler tool (as) doesn't support any architecture under the Intel 80x86. . Added support for a makeinit file AMake will check for a make file named "makeinit". If it exists it is loaded first. Also, the .depend file can be ignored with the --no-default-make option command line (the makeinit is ignored in that case too). . Fixed a possible bug in lshl_print() This function would use memcmp() with a null pointer (and a length of zero) which is not safe on all systems. . Fixed the touch option When utime() or fopen() were to fail because the file was write protected or otherwise, the touch would silently fail. . Fixed the min/max shell return error code The function would print out a debug printf(). . Added [else]ifeqi and [else]ifneqi These preprocessor will automatically ignore the case of the input strings. Thus "ifeqi VERSION version" is true. . Added .loaddll (pre-processor) Accepted but ignored for Watcom Make compatibility. . Fixed several error messages Some additional error messages make use of the strerror() function to print out the system errors. Also some messages were syntactically wrong. . Fixed the $(MAKEFLAGS) This variable (and some others) should have been set to the flags used on the command line and the .MAKEFLAGS/.MAKEOPTS special targets. However, the - was missing in the front of all the options. Also, the .MAKEFLAGS and .MAKEOPTS didn't properly refresh these variables. This is also fixed. Finally, the options followed by a list of strings wouldn't use the "-" or "--" in the front of the 2nd, 3rd, etc. option. . Implemented the --use-time option This option allows you to simulate any date and time at which AMake is started. . Fixed the --<compatible> & defaults Some defaults were not respected when entering a certain mode. Now this is done by forcing some defaults when a compatibility flag is encountered (ie. in Watcom land the --check is effective by default under DOS). . Fixed "else ifnmake" This was previously taken as "else ifndef". . Fixed "[else]if[n]eq[i] <var> <value>" These functions would crash AMake if the variable wasn't set. These were also added in the amake.vim. . Fixed the tmpnam() The shell.c source code would generate "unique" file names using tmpnam(). This was replaced with an sprintf() and the names as "{tmp,/tmp,.}/amake<pid>-<#>.tmp" (i.e. AMake test for a tmp directory in the current directory, then in the root path and otherwise uses the current directory as a temporary directory). The defaults can be overridden by defining the TMPDIR environment variable or a macro in the makefile. . Fixed the cpp.c This file was making use of sys_errcnt and sys_errstr which is deprecated. I now use the strerror() function (which I should very certainly use much more all over the place!) . Fixed the lfil_open() function This function can now return NULL instead of existing when a file doesn't (seem to) exist. Some other functions make use of this. . Fixed the ldep_depend() function When opening a source file, the lfil_open() can return NULL and thus we can know if the file exists or not. If the file doesn't exist, we simply don't do anything. In this case, the makefile should have been written to automatically generate the file (or retrieve it out from an archive). This means only the second run of amake will properly generate the dependencies, but on the first run the files will anyway be marked as out of date. Thus the system should work properly in all cases. NOTE: this is important if some of your source files are not checked out at all (this especially happens when you just checked in without the option saying "keep a local copy") * April 10th, 2003 V2.10.14 . Fixed the lvar_macro() function The function would always copy a list of words, even when that list was empty. Now it needs to include at least one item. This was making the system crash especially when the '::' macro separator was used as in: $(MY_VAR::*.c=*.o) If MY_VAR didn't include any *.c files, then amake would either crash or generate random strings. * November 13rd, 2002 V2.10.13 . Fixed the lstr_clean() function This function would loop forever in case the result was the empty string (as in "foo/../myfile.c - the path is equivalent to a null path). * October 30th, 2002 V2.10.12 . Reading of makefiles in Win32 The files were open for reading with "r" instead of "rb". This was fixed. The Unix versions are not affected by this change. . Bad cleaning rules The makefile.mingw and makefile.dos never had their clean, clobber and rmtargets targets working. This was fixed. . Compiles with NMAKE and CL Made a few changes so it compiles with CL (from Microsoft VC++ v6.x) and doesn't generate any warning. Note that if you have MinGW, don't use CL!!! Since it generates binaries which are twice bigger, it really doesn't make any sense to use CL (unless you absolutly want MS debugs). * October 23rd, 2002 V2.10.11 . Variable pattern bug When a pattern finished by a lone backslash, the software would hang. This was fixed. . Package bug The previous binary package was "wrongly" named with -i386 but no system was specified. It was Linux in case you were wondering. . Package addition I added a compiled version of amake to work under Silicon Graphics Inc. IRIX 6.5 with at least a MIPS 5000. I added a compiled version of amake to work under MS-Windows (compiled with MinGW). Works with at least Win32 and an 80386 processor. * October 21st, 2002 V2.10.10 . Fixed the module I noticed that the module wouldn't put all the files within a sub-directory. Also, I created several type of compressions for both sources and binary versions. . Pattern bug fix There was a bug in the pattern checking code where a pattern finishing with a ? or [] followed by an asterisk (*) would fail. . Compiles under MinGW There is makefile.mingw so you can easilly create amake under MS-Windows. . Version bug fix The version returned by uname() is better handled so the realease and bug release versions are ignored if invalid. . Flags fixed Some command line flags were fixed so they work properly. . Shell errors The lsh_error() function didn't increase the error counter at all. * Marsh 1st, 2002 V2.10.9 . New features The rules include one rule to compile java programs which looks like this: $(JAVAC) $(JAVAFLAGS) <filename>.java You can use this default rule with a line as follow: MyClass.class: $(.TARGET).java * June 15th, 2000 V2.10.8 . New features Compiles under IRIX 6.5 without warnings with C Pro V7.x. The new system macro $(.SERIAL) was added so one can easily create unique file names and such in its shell scripts A new letter was added in macro support to give an easy way to transform paths - defined in variables such $(PATH) and $(XFILESEARCHPATH) - in a list of words. Simply use: $(PATH:P). The REPORT.BUG was added so as to enable an easy way to report bugs found in amake including all the revelant informations. . Bug fixes AMake was setting environment variables using a local string variable. This was fixed by duplicating (allocating) the necessary strings. The archive searching mechanism now uses a length to test the name so it doesn't check after the end of the string (though it should be null terminated, it's safer this way). The pattern search didn't check if a file was a directory or not. Patterns such as */*.c would return errors on files in the current directory which were not directories. The documentation was wrongly defining CINCLUDEPATH as CINCLUDEDIR. In Linux V2.2.x bash starts with echo OFF enforced before to execute the default startup shell scripts. That way amake always starts silently now. Since the %: %,v targets have been fixed, the 'if test ...' has been removed from the amake-rules.mk file. Fixed the amake.doc for some syntax, grammar errors and forgotten entries. * March 12th, 2000 V2.10.7 . New features AMake has one more variable assignment operator which will take the right side words as filenames which are read in and used as the contains of the variable(s). This operator syntax is: <variable> <= <filenames> . Bug fixes The --order option had a couple of crashing bugs when targets without any dependencies where used. The --state-file and --error-output-file where defined as single character flags instead of string parameters. The #ifmake preprocessor operation would not properly take in account the result of the test. A couple of string functions didn't handle DOS filenames properly. Avoid calls to system() with empty command lines (and therefore NULL string pointers). A few things like the $(.TARGET:H) instead of $(.TARGET:D) were modified to be slightly more accurate. Enabled the input to use '\n' (unix), '\r\n' (PC) or '\r' (Mac) to mark the end of a line. Fixed the RSC/SCCS problems were the modified sources would not always recompile. * December 1st, 1999 V2.10.6 . New features AMake accepts the --out-of-date option so as to make sure all the targets at all the levels are made out of date. This is equivalent to a make clean. * November 14th, 1999 V2.10.5 . New features CMake compatibility was added. This simply ensures that AMake will run in parallel mode even when options such as --jobs 1 or targets such as .NO_PARALLEL: are used. It also turns ON the network feature. Yet, this one can be turned OFF in the script. The amake.doc was updated to include the sunmake binary name (and smake on SUN systems). Added concurrent C compile & link options in the amake rules file. AMake compiles under FreeBSD and includes another makefile to use under that system and create the software. AMake accepts patterns on special targets as in the following: .PRECIOUS: %.o %.c %.s %.l %.y %.p %.f note that this option doesn't actually work for the .IGNORE, .SILENT and .SINGLESHELL for these are specific to the command lines. It only applies to the following targets: .DELETE_ON_ERROR, .INTERMEDIATE, .NOTMAIN, .ORDER, .PHONY, .PRECIOUS and .SECONDARY. . Bugs fixes AMake doesn't need to have a makefile anymore. The default rules will suffices. However, AMake will need to have access to these rules. Calling AMake smake under SUN would have called the Joerg compatible mode anyway. This is fixed. The SUN make <macro>:sh=<command> let's the shell transform the variables in <command>. AMake was transformed to do the same thing. However, comments are still withdrawn before the result is sent to the shell interpreter. Updated all the makefiles to include the network.c source file. The --precious & --secondary main flags were not taken in account to prevent intermediate files deletion. The SUN version wouldn't work because the environment would end with an empty string instead of a NULL pointer. This was fixed and it works much better. * November 7th, 1999 V2.10.4 . New features AMake recognize a .ERROR target which is ran whenever an error occured. The $(.ALLSRC) target will list all the targets which generated an error before the .ERROR commands are executed. AMake accepts macro transformation patterns which include spaces or tabs as in: $(MACRO: s.%.o = %.o ) . Bugs fixes Fixed a bug which would declare existing files as intermediate and would therefore delete some source files which could be the edited once * August 30th, 1999 V2.10.3 . New features AMake compiles under SunOS 5.x It will search for the system makefiles in the current directory as well and search for files named amake.rules and make.rules. The GNU Make options can be specified with an equal sign as in "--file=myscript" The default makefile can be Iamakefile, iamakefile, Imakefile, imakefile when the --imake option is used. Several other options were added to enhance the support of Imake in AMake. It also checks for the IMAKE... environment variables. To complet the Imake features, AMake understands the following additional options on the command line: --imake --imakeCfile <source filename> --imake-only --imake-output <script filename> --keepCfile --template <template> -T <template> When no default makefile is found AMake will check for an SCCS filename (i.e. any makefile name with "s." prepended) or an RCS filename (i.e. any makefile name with ",v" appeneded). If one of these file is found AMake will generate the default necessary command to retrieve it. AMake now understands the following macro syntax: <macro>:sh = <command> and $(<macro>:sh) A new version of make.vim was created to support the syntax of AMake and all its functions, special targets, pre-processor, etc. When some files are automatically removed by AMake the user can know about them with the use of the --show-removed-file command line option. . Bug fixes the lstr_clean() was fixed so file names such as ../../test will not be reduced and therefore will work. the locking file is named LOCK.amk under DOS (instead of LOCK.amake) the CINCLUDEPATH doesn't need to be defined when the special variable $(<name>:I) is used; AMake will use the current working directory as the default (before it would generate a fatal error) GNU compatibility mode searches for GNUmakefile first once in a while the use of a macro with a set of directories would crash AMake which was actually freeing the same variable twice a target without any commands is now properly transformed with the correct default target (pattern, suffixes or .DEFAULT) the llst_concat() would increase the pos parameter even when this one was -1 (i.e. inserting new parameters at the very beginning instead of appending them) the pattern rules are much better handled and will work in most cases; before it would use the first matching pattern rule instead of the proper pattern rule and it would go through all the patterns looping for a quite long time; there was also a problem with patterns such as s.% where the stem would have been invalid fixed the $(<varname>:I) and $(<varname>:U) so the I and U can also be used to start any filename; thus $(<varname>:ISO) will not be used like if $(<varname>:I) was given * August 7th, 1999 V2.10.2 . New features --case-sensitive option --case-insensitive option . Bug fixes $(<var>:E) doesn't return hidden files $(<var>:R) doesn't suppress hidden files $(<var>:?) handles the / and \ properly under DOS the default system filenames are not freed before to be used (system.mk or amake-rules.mk) a comment which doesn't start at the beginning of a line will silently be removed (even) before a target is declared; after, it will become part of the shell commands By default, the \ will be used to skip only a very few characters when you use AMake in DOS. This doesn't change the behavior of AMake under any other systems. The --gnu and --sun work properly (i.e. these are accepted). . More explainations Made sure the software compiled under MS-DOS with the C/C++ compiler from Microsoft (Version 1.60.5270). Suppress the $(shell ...) in DOS compatible mode (at this time I didn't program pipes in MS-DOS). Fixed the default patterns for variable transformations: $(<var>:R) will return hidden filenames; $(<var>:E) will not return hidden filenames; $(<var>:?) where ? is any of R, E, H, T will take the backslash in account when you compile the DOS version (so a filename like object/amake.c is similar to object\amake.c toward these options). File names under DOS and AMIGA will be compared case insensitive by default. If AMake would be called make on any system except Linux it was supposed to enter the ANSII mode automatically. That was fixed. The makefile.dos was fixed so it includes argument.c instead of arguements.c. The makefile.dos would create a file named forget.tmp; now this file is automatically deleted once not necessary any more. The makefile.dos also includes /W4 to force the compiler to generate all the warnings it can. Some of the unused parameters errors were suppressed with the use of the #warning preprocessor available with CL from Microsoft.
AMAKE'S HISTORY * Mar 4, 2007 V2.10.21 . Fixed grammar.c for gcc version 4.1.2 . Removed the -C to the install tool * May 15, 2005 V2.10.20 . Fixed the $(wildcard ...) The use of the $(wildcard ...) in the current directory would be riddled by all the patterns and other files which don't exist and are by default added to the current directory. I.e. if you were to type: FILES=$(wildcard *) #echo $(FILES) in version 2.10.19 (at least) then you'd get files such as %.c, %.cpp, %.f, etc. This problem may affect some other instructions. . Fixed the .NULL test for dependencies In searching for dependencies, files without an extension are given the .NULL extension. This can be defined in the variable CSUFFIXES as in: CSUFFIXES:=.cxx .NULL then files with no extension will be searched like files with the .cxx extension. The .NULL in CSUFFIXES was ignored before. . -- line skipped -- message I finally reworked the function reading the output of a command line so it would properly skip the '-- line skipped --' since once in a while it wouldn't be skipped for some reason that I don't really know about. In any event, it is now filtered out which means that if you have a tool which generates such a line of output, it won't appear either. But I like it better this way anyway. Btw, it should be a bit faster too! The new function avoids many malloc()/free() and it reads lines at once instead of a few characters to be filtered (it is also a lot simpler to understand and fix further). * February 8th, 2005 . Added multi-/ and multi-\ support Functions comparing paths between each others will now use the special functions making sure that any double, triple, etc. separators (/ or \) are considered as one (thus "//" == "/"). * February 5th, 2004 V2.10.19 . Fixed a crash Somehow, an undefined macro could generate a NULL pointer which later could improperly be tested and generate a crash. . Added real support for Mac OS/X (Nov 2004) This time I could compile and run AMake on a Mac OS/X system. This required a few changes, most certainly for the better. This includes a makefile.mac and some changes to the code to accomodate the Mac system. . Fixed Errors in Windows (Feb 2005) Under MS-Windows, amake wouldn't set a flag on error and thus it looked like the -k option was always in operation. This was fixed. . Enhanced the Patterns comparison function Now the patterns will compare multiple / (and \ on WIN/MINGW) characters as one. Thus //this// is equal to /this/. * October 26th, 2003 V2.10.18 . Debian Package Doug Barbieri created a debian package so you can install amake on your Debian system without having to figure out anything. Note that isn't a full compliant package yet, that will come along later... . Added a license I added the license to the documentation. It was already there under Copyright, but I thought it would be better if it were to be stated as a license instead. . Case comparison functions I added the proper initialization for the uppercase/lowercase function initialization at the start of the options. I don't think it was important, but just in case the argument initialization is to use it at a later time, it will work. . Fixed variables matching function When a filename included a space, the name was likely to be quoted. In this case, the matching would fail since the quotes would be tested. I added a call to the function unquoting the string if necessary. Example: OUT="My filename includes spaces.exe" $(OUT): $(OUT:*.exe=*.o) ... With this version the .exe will be found and replaced with a .o. Note that the quotes are likely to be removed from the name in the list of words, and re-inserted on your command line(s) as required. . Made a fix for #echo, #error, #warning Some people would have the habit to put a string after one of these instructions (as in C/C++). Now the start and end quotes won't be printed in the output. Note that quotes within will still be printed. Thus an error such as: #error You GNU C/C++ compiler is too old (you have "$(VERSION)") will print as before. . Changed to copyright Now the copyright includes 2004. . Changed the makefile.mingw I fixed the tar/package targets so it kind of works. It won't create a complete package though and it requires a make which supports the $(patsubst ...) and $(nodir ...) functions. * October 13th, 2003 V2.10.17 . Real silence The message: '"<file>" is up to date' is not printed anymore when one of the silent options is used . Case Sensitivity The test of case sensitivity was also included in patterns. This the pattern "%.O" will match "a.o" and vice versa, "%.o" will match "A.O". All the patterns will work this way, including the strong AMake patterns (such as "object/*/*.o=source/*/*.c" which will accept file names in whatever case, in this example object could be found as actually being "ObjecT" and the file name can also be "A.O"). As a reminder, case sensitivity should only be changed when required. On a DOS and Amiga system, use case insensitive. On all other systems, use case sensitive. * September 28th, 2003 V2.10.16 . Added my amakefile in the -src I added this file so I have a copy on sourceforge. I will certainly look into having more developer files included as it goes. . Fixed the default # of parallel jobs In some cases, we could end up with -1 as the number of parallel jobs. I changed that to 0 so we get the proper default. . Fixed the amake-rules.mk Made a few fixes of the amake-rules.mk so the MINGW flag is slightly better handled (for instance,it will use gcc/g++ by default instead of cc). The main problem with MINGW is that you may have a shell. If that's the case, then the default rules would need to be different than what they currently endup being. . Fixed the '-' in MAKEFLAGS Sorry! This was actually correct (having no - or only one - for strings). This is back to normal (compatible with GNU and SGI make tools). Also, command lines with proper quotes would get additional, invalid quotes (such as the --use-time="..."). This was fixed by changing the low level lstr_spaces() function. There is another bug which is when a space and quotes are present in a value, but the spaces are not inside the quotes, then the whole option gets quoted, but the quotes won't be properly escaped. (i.e. an option such as --test="a" "b" will improperly be transformed in "--test="a" "b"" instead of "--test=\"a\" \"b\""). This will be fixed later. . Fixed the alternate (#!/bin/amake) When the --directory was specified on the recursive call and the makefile included an alternate different from the running amake, then it was trying to cd in the specified directory twice (the 2nd time it would fail). The --directory is still being passed down to the alternate amake, however, the path is restored before AMake runs the alternate command line. * August 28th, 2003 V2.10.15 . Added support for proper maximum concurrent under Linux If you have the "/proc/cpuinfo" file properly defined under your Linux system, then AMake will count the number of processors available on your system and multiply that by 2 as the default maximum concurrent targets to be created at once. . Fixed the help output The help output would write long flags information right after the flag without spaces. Now, such flags get their information properly aligned on the next line. . Added some special targets The following targets are defined in the WMAKE tool from Watcom and were added to AMake: .AFTER (like .END) .AUTODEPEND (like --autodepend, similar to $(...:I)) .BEFORE (like .BEGIN) .BLOCK (like --block) .CHECK (like --check; check existance of target) .CONTINUE (like -k/--keep-going) .ERASE (like .DELETE_ON_ERROR) .EXTENSIONS (like .SUFFIXES) .HOLD (see --hold and --keep-on-error) .KEEP_ON_ERROR (see --hold and --keep-on-error) .NOCHECK (see --no-check) .OPTIMIZE (accepted but ignored) .SYMBOLIC (like .PHONY) . Added support for Watcom special macros Available are $^@, $^*, $^&, $^:, $^. $[@, $[*, $[&, $[:, $[. $]@, $]*, $]&, $]:, $]. Note that can cause some problems if you used $^ directly followed by one of these characters. In the DOS version the $^& at the end of a line may be taken as $^ + new line. For this support a .TAIL macro was created. This is equivalent to $(.TARGET:T) . Added Watcom variables The following variables were added for watcom compatibility: __WINDOWS__set to 1 when running under Microsoft Windows __VERSION__the version of AMake (i.e. 210 for 2.10.15) __MAKEOPTS__the flags AMake was invoked with __MAKEFILES__set to the list of makefiles (see -f) . Added variables The following variables were added: MAKE_RELEASEthe release of AMake (i.e. 15) __RELEASE__the release of AMake (i.e. 15) . Fixed the doc Found tons of errors in the doc. Also, I made major fixes in regard to many topics which were either wrong or out of date. Fixed the English a bit too. Also added doc about the new targets, options, variables, etc. And added support for things I wrote in the doc. a while ago but weren't actually implemented yet! (such as support for the MAKELIBS variable). . Added support for new functions $(<func> ...) The following new functions were added: $(call ...) $(echo ...) $(error ...) $(message ...) $(warning ...) $(wordlist ...) . Added a --list-special (or --list-attributes), --list-preprocessor and --list-functions These special command line options can be used to get information about all of the - special targets and attributes currently supported, - preprocessor instructions (includes information such as whether it can alter the current condition state) - list of macro functions such as $(call me,at,the,usual,number) The --help, --list-special, --list-preprocessor and --list-functions can all be used on the same command line. In this case you will get all the lists. . Added support for target variables It is quite often useful to have a variable set with a value specific to one or several targets but not all. This is useful when you have a single set of command lines to work on multiple targets. The syntax is like in GNU, except AMake understands it with multiple targets and multiple variable names used on the same command line: t1 t2 t3: v1 v2 v3 += additional value All the usual operators are accepted (= := ?= != <= +=). Enjoy! (I know I will!) . Fixed the #shell This preprocessor would always execute the shell commands, even in --dry-run. Now, it won't be unless you start the command line with a + (you can still use the - to avoid errors, +- or -+ will work). Fixed the bug with the - which would generate a crash trying to free the buffer at the address + 1. . Added support for the <?, >? and ^^ operators The preprocessor accepting an expression can now make use of the minimum (<?), maximum (>?) and logical xor (^^) operators. . Added the .[NO]CHECK and --[no-]check Added the .[NO]CHECK targets and --[no-]check command line options to enable/disable the option of the same name from Watcom. Namely that the target will be or not checked for existance once the commands were executed. This is, in a way, the opposite of .PHONY. . Fixed the amake-rules.mk The TARGET_MARCH under Linux now needs to be -march=<arch> Also the assembler tool (as) doesn't support any architecture under the Intel 80x86. . Added support for a makeinit file AMake will check for a make file named "makeinit". If it exists it is loaded first. Also, the .depend file can be ignored with the --no-default-make option command line (the makeinit is ignored in that case too). . Fixed a possible bug in lshl_print() This function would use memcmp() with a null pointer (and a length of zero) which is not safe on all systems. . Fixed the touch option When utime() or fopen() were to fail because the file was write protected or otherwise, the touch would silently fail. . Fixed the min/max shell return error code The function would print out a debug printf(). . Added [else]ifeqi and [else]ifneqi These preprocessor will automatically ignore the case of the input strings. Thus "ifeqi VERSION version" is true. . Added .loaddll (pre-processor) Accepted but ignored for Watcom Make compatibility. . Fixed several error messages Some additional error messages make use of the strerror() function to print out the system errors. Also some messages were syntactically wrong. . Fixed the $(MAKEFLAGS) This variable (and some others) should have been set to the flags used on the command line and the .MAKEFLAGS/.MAKEOPTS special targets. However, the - was missing in the front of all the options. Also, the .MAKEFLAGS and .MAKEOPTS didn't properly refresh these variables. This is also fixed. Finally, the options followed by a list of strings wouldn't use the "-" or "--" in the front of the 2nd, 3rd, etc. option. . Implemented the --use-time option This option allows you to simulate any date and time at which AMake is started. . Fixed the --<compatible> & defaults Some defaults were not respected when entering a certain mode. Now this is done by forcing some defaults when a compatibility flag is encountered (ie. in Watcom land the --check is effective by default under DOS). . Fixed "else ifnmake" This was previously taken as "else ifndef". . Fixed "[else]if[n]eq[i] <var> <value>" These functions would crash AMake if the variable wasn't set. These were also added in the amake.vim. . Fixed the tmpnam() The shell.c source code would generate "unique" file names using tmpnam(). This was replaced with an sprintf() and the names as "{tmp,/tmp,.}/amake<pid>-<#>.tmp" (i.e. AMake test for a tmp directory in the current directory, then in the root path and otherwise uses the current directory as a temporary directory). The defaults can be overridden by defining the TMPDIR environment variable or a macro in the makefile. . Fixed the cpp.c This file was making use of sys_errcnt and sys_errstr which is deprecated. I now use the strerror() function (which I should very certainly use much more all over the place!) . Fixed the lfil_open() function This function can now return NULL instead of existing when a file doesn't (seem to) exist. Some other functions make use of this. . Fixed the ldep_depend() function When opening a source file, the lfil_open() can return NULL and thus we can know if the file exists or not. If the file doesn't exist, we simply don't do anything. In this case, the makefile should have been written to automatically generate the file (or retrieve it out from an archive). This means only the second run of amake will properly generate the dependencies, but on the first run the files will anyway be marked as out of date. Thus the system should work properly in all cases. NOTE: this is important if some of your source files are not checked out at all (this especially happens when you just checked in without the option saying "keep a local copy") * April 10th, 2003 V2.10.14 . Fixed the lvar_macro() function The function would always copy a list of words, even when that list was empty. Now it needs to include at least one item. This was making the system crash especially when the '::' macro separator was used as in: $(MY_VAR::*.c=*.o) If MY_VAR didn't include any *.c files, then amake would either crash or generate random strings. * November 13rd, 2002 V2.10.13 . Fixed the lstr_clean() function This function would loop forever in case the result was the empty string (as in "foo/../myfile.c - the path is equivalent to a null path). * October 30th, 2002 V2.10.12 . Reading of makefiles in Win32 The files were open for reading with "r" instead of "rb". This was fixed. The Unix versions are not affected by this change. . Bad cleaning rules The makefile.mingw and makefile.dos never had their clean, clobber and rmtargets targets working. This was fixed. . Compiles with NMAKE and CL Made a few changes so it compiles with CL (from Microsoft VC++ v6.x) and doesn't generate any warning. Note that if you have MinGW, don't use CL!!! Since it generates binaries which are twice bigger, it really doesn't make any sense to use CL (unless you absolutly want MS debugs). * October 23rd, 2002 V2.10.11 . Variable pattern bug When a pattern finished by a lone backslash, the software would hang. This was fixed. . Package bug The previous binary package was "wrongly" named with -i386 but no system was specified. It was Linux in case you were wondering. . Package addition I added a compiled version of amake to work under Silicon Graphics Inc. IRIX 6.5 with at least a MIPS 5000. I added a compiled version of amake to work under MS-Windows (compiled with MinGW). Works with at least Win32 and an 80386 processor. * October 21st, 2002 V2.10.10 . Fixed the module I noticed that the module wouldn't put all the files within a sub-directory. Also, I created several type of compressions for both sources and binary versions. . Pattern bug fix There was a bug in the pattern checking code where a pattern finishing with a ? or [] followed by an asterisk (*) would fail. . Compiles under MinGW There is makefile.mingw so you can easilly create amake under MS-Windows. . Version bug fix The version returned by uname() is better handled so the realease and bug release versions are ignored if invalid. . Flags fixed Some command line flags were fixed so they work properly. . Shell errors The lsh_error() function didn't increase the error counter at all. * Marsh 1st, 2002 V2.10.9 . New features The rules include one rule to compile java programs which looks like this: $(JAVAC) $(JAVAFLAGS) <filename>.java You can use this default rule with a line as follow: MyClass.class: $(.TARGET).java * June 15th, 2000 V2.10.8 . New features Compiles under IRIX 6.5 without warnings with C Pro V7.x. The new system macro $(.SERIAL) was added so one can easily create unique file names and such in its shell scripts A new letter was added in macro support to give an easy way to transform paths - defined in variables such $(PATH) and $(XFILESEARCHPATH) - in a list of words. Simply use: $(PATH:P). The REPORT.BUG was added so as to enable an easy way to report bugs found in amake including all the revelant informations. . Bug fixes AMake was setting environment variables using a local string variable. This was fixed by duplicating (allocating) the necessary strings. The archive searching mechanism now uses a length to test the name so it doesn't check after the end of the string (though it should be null terminated, it's safer this way). The pattern search didn't check if a file was a directory or not. Patterns such as */*.c would return errors on files in the current directory which were not directories. The documentation was wrongly defining CINCLUDEPATH as CINCLUDEDIR. In Linux V2.2.x bash starts with echo OFF enforced before to execute the default startup shell scripts. That way amake always starts silently now. Since the %: %,v targets have been fixed, the 'if test ...' has been removed from the amake-rules.mk file. Fixed the amake.doc for some syntax, grammar errors and forgotten entries. * March 12th, 2000 V2.10.7 . New features AMake has one more variable assignment operator which will take the right side words as filenames which are read in and used as the contains of the variable(s). This operator syntax is: <variable> <= <filenames> . Bug fixes The --order option had a couple of crashing bugs when targets without any dependencies where used. The --state-file and --error-output-file where defined as single character flags instead of string parameters. The #ifmake preprocessor operation would not properly take in account the result of the test. A couple of string functions didn't handle DOS filenames properly. Avoid calls to system() with empty command lines (and therefore NULL string pointers). A few things like the $(.TARGET:H) instead of $(.TARGET:D) were modified to be slightly more accurate. Enabled the input to use '\n' (unix), '\r\n' (PC) or '\r' (Mac) to mark the end of a line. Fixed the RSC/SCCS problems were the modified sources would not always recompile. * December 1st, 1999 V2.10.6 . New features AMake accepts the --out-of-date option so as to make sure all the targets at all the levels are made out of date. This is equivalent to a make clean. * November 14th, 1999 V2.10.5 . New features CMake compatibility was added. This simply ensures that AMake will run in parallel mode even when options such as --jobs 1 or targets such as .NO_PARALLEL: are used. It also turns ON the network feature. Yet, this one can be turned OFF in the script. The amake.doc was updated to include the sunmake binary name (and smake on SUN systems). Added concurrent C compile & link options in the amake rules file. AMake compiles under FreeBSD and includes another makefile to use under that system and create the software. AMake accepts patterns on special targets as in the following: .PRECIOUS: %.o %.c %.s %.l %.y %.p %.f note that this option doesn't actually work for the .IGNORE, .SILENT and .SINGLESHELL for these are specific to the command lines. It only applies to the following targets: .DELETE_ON_ERROR, .INTERMEDIATE, .NOTMAIN, .ORDER, .PHONY, .PRECIOUS and .SECONDARY. . Bugs fixes AMake doesn't need to have a makefile anymore. The default rules will suffices. However, AMake will need to have access to these rules. Calling AMake smake under SUN would have called the Joerg compatible mode anyway. This is fixed. The SUN make <macro>:sh=<command> let's the shell transform the variables in <command>. AMake was transformed to do the same thing. However, comments are still withdrawn before the result is sent to the shell interpreter. Updated all the makefiles to include the network.c source file. The --precious & --secondary main flags were not taken in account to prevent intermediate files deletion. The SUN version wouldn't work because the environment would end with an empty string instead of a NULL pointer. This was fixed and it works much better. * November 7th, 1999 V2.10.4 . New features AMake recognize a .ERROR target which is ran whenever an error occured. The $(.ALLSRC) target will list all the targets which generated an error before the .ERROR commands are executed. AMake accepts macro transformation patterns which include spaces or tabs as in: $(MACRO: s.%.o = %.o ) . Bugs fixes Fixed a bug which would declare existing files as intermediate and would therefore delete some source files which could be the edited once * August 30th, 1999 V2.10.3 . New features AMake compiles under SunOS 5.x It will search for the system makefiles in the current directory as well and search for files named amake.rules and make.rules. The GNU Make options can be specified with an equal sign as in "--file=myscript" The default makefile can be Iamakefile, iamakefile, Imakefile, imakefile when the --imake option is used. Several other options were added to enhance the support of Imake in AMake. It also checks for the IMAKE... environment variables. To complet the Imake features, AMake understands the following additional options on the command line: --imake --imakeCfile <source filename> --imake-only --imake-output <script filename> --keepCfile --template <template> -T <template> When no default makefile is found AMake will check for an SCCS filename (i.e. any makefile name with "s." prepended) or an RCS filename (i.e. any makefile name with ",v" appeneded). If one of these file is found AMake will generate the default necessary command to retrieve it. AMake now understands the following macro syntax: <macro>:sh = <command> and $(<macro>:sh) A new version of make.vim was created to support the syntax of AMake and all its functions, special targets, pre-processor, etc. When some files are automatically removed by AMake the user can know about them with the use of the --show-removed-file command line option. . Bug fixes the lstr_clean() was fixed so file names such as ../../test will not be reduced and therefore will work. the locking file is named LOCK.amk under DOS (instead of LOCK.amake) the CINCLUDEPATH doesn't need to be defined when the special variable $(<name>:I) is used; AMake will use the current working directory as the default (before it would generate a fatal error) GNU compatibility mode searches for GNUmakefile first once in a while the use of a macro with a set of directories would crash AMake which was actually freeing the same variable twice a target without any commands is now properly transformed with the correct default target (pattern, suffixes or .DEFAULT) the llst_concat() would increase the pos parameter even when this one was -1 (i.e. inserting new parameters at the very beginning instead of appending them) the pattern rules are much better handled and will work in most cases; before it would use the first matching pattern rule instead of the proper pattern rule and it would go through all the patterns looping for a quite long time; there was also a problem with patterns such as s.% where the stem would have been invalid fixed the $(<varname>:I) and $(<varname>:U) so the I and U can also be used to start any filename; thus $(<varname>:ISO) will not be used like if $(<varname>:I) was given * August 7th, 1999 V2.10.2 . New features --case-sensitive option --case-insensitive option . Bug fixes $(<var>:E) doesn't return hidden files $(<var>:R) doesn't suppress hidden files $(<var>:?) handles the / and \ properly under DOS the default system filenames are not freed before to be used (system.mk or amake-rules.mk) a comment which doesn't start at the beginning of a line will silently be removed (even) before a target is declared; after, it will become part of the shell commands By default, the \ will be used to skip only a very few characters when you use AMake in DOS. This doesn't change the behavior of AMake under any other systems. The --gnu and --sun work properly (i.e. these are accepted). . More explainations Made sure the software compiled under MS-DOS with the C/C++ compiler from Microsoft (Version 1.60.5270). Suppress the $(shell ...) in DOS compatible mode (at this time I didn't program pipes in MS-DOS). Fixed the default patterns for variable transformations: $(<var>:R) will return hidden filenames; $(<var>:E) will not return hidden filenames; $(<var>:?) where ? is any of R, E, H, T will take the backslash in account when you compile the DOS version (so a filename like object/amake.c is similar to object\amake.c toward these options). File names under DOS and AMIGA will be compared case insensitive by default. If AMake would be called make on any system except Linux it was supposed to enter the ANSII mode automatically. That was fixed. The makefile.dos was fixed so it includes argument.c instead of arguements.c. The makefile.dos would create a file named forget.tmp; now this file is automatically deleted once not necessary any more. The makefile.dos also includes /W4 to force the compiler to generate all the warnings it can. Some of the unused parameters errors were suppressed with the use of the #warning preprocessor available with CL from Microsoft.
AMAKE'S HISTORY * Mar 4, 2007 V2.10.21 . Fixed grammar.c for gcc version 4.1.2 . Removed the -C to the install tool * May 15, 2005 V2.10.20 . Fixed the $(wildcard ...) The use of the $(wildcard ...) in the current directory would be riddled by all the patterns and other files which don't exist and are by default added to the current directory. I.e. if you were to type: FILES=$(wildcard *) #echo $(FILES) in version 2.10.19 (at least) then you'd get files such as %.c, %.cpp, %.f, etc. This problem may affect some other instructions. . Fixed the .NULL test for dependencies In searching for dependencies, files without an extension are given the .NULL extension. This can be defined in the variable CSUFFIXES as in: CSUFFIXES:=.cxx .NULL then files with no extension will be searched like files with the .cxx extension. The .NULL in CSUFFIXES was ignored before. . -- line skipped -- message I finally reworked the function reading the output of a command line so it would properly skip the '-- line skipped --' since once in a while it wouldn't be skipped for some reason that I don't really know about. In any event, it is now filtered out which means that if you have a tool which generates such a line of output, it won't appear either. But I like it better this way anyway. Btw, it should be a bit faster too! The new function avoids many malloc()/free() and it reads lines at once instead of a few characters to be filtered (it is also a lot simpler to understand and fix further). * February 8th, 2005 . Added multi-/ and multi-\ support Functions comparing paths between each others will now use the special functions making sure that any double, triple, etc. separators (/ or \) are considered as one (thus "//" == "/"). * February 5th, 2004 V2.10.19 . Fixed a crash Somehow, an undefined macro could generate a NULL pointer which later could improperly be tested and generate a crash. . Added real support for Mac OS/X (Nov 2004) This time I could compile and run AMake on a Mac OS/X system. This required a few changes, most certainly for the better. This includes a makefile.mac and some changes to the code to accomodate the Mac system. . Fixed Errors in Windows (Feb 2005) Under MS-Windows, amake wouldn't set a flag on error and thus it looked like the -k option was always in operation. This was fixed. . Enhanced the Patterns comparison function Now the patterns will compare multiple / (and \ on WIN/MINGW) characters as one. Thus //this// is equal to /this/. * October 26th, 2003 V2.10.18 . Debian Package Doug Barbieri created a debian package so you can install amake on your Debian system without having to figure out anything. Note that isn't a full compliant package yet, that will come along later... . Added a license I added the license to the documentation. It was already there under Copyright, but I thought it would be better if it were to be stated as a license instead. . Case comparison functions I added the proper initialization for the uppercase/lowercase function initialization at the start of the options. I don't think it was important, but just in case the argument initialization is to use it at a later time, it will work. . Fixed variables matching function When a filename included a space, the name was likely to be quoted. In this case, the matching would fail since the quotes would be tested. I added a call to the function unquoting the string if necessary. Example: OUT="My filename includes spaces.exe" $(OUT): $(OUT:*.exe=*.o) ... With this version the .exe will be found and replaced with a .o. Note that the quotes are likely to be removed from the name in the list of words, and re-inserted on your command line(s) as required. . Made a fix for #echo, #error, #warning Some people would have the habit to put a string after one of these instructions (as in C/C++). Now the start and end quotes won't be printed in the output. Note that quotes within will still be printed. Thus an error such as: #error You GNU C/C++ compiler is too old (you have "$(VERSION)") will print as before. . Changed to copyright Now the copyright includes 2004. . Changed the makefile.mingw I fixed the tar/package targets so it kind of works. It won't create a complete package though and it requires a make which supports the $(patsubst ...) and $(nodir ...) functions. * October 13th, 2003 V2.10.17 . Real silence The message: '"<file>" is up to date' is not printed anymore when one of the silent options is used . Case Sensitivity The test of case sensitivity was also included in patterns. This the pattern "%.O" will match "a.o" and vice versa, "%.o" will match "A.O". All the patterns will work this way, including the strong AMake patterns (such as "object/*/*.o=source/*/*.c" which will accept file names in whatever case, in this example object could be found as actually being "ObjecT" and the file name can also be "A.O"). As a reminder, case sensitivity should only be changed when required. On a DOS and Amiga system, use case insensitive. On all other systems, use case sensitive. * September 28th, 2003 V2.10.16 . Added my amakefile in the -src I added this file so I have a copy on sourceforge. I will certainly look into having more developer files included as it goes. . Fixed the default # of parallel jobs In some cases, we could end up with -1 as the number of parallel jobs. I changed that to 0 so we get the proper default. . Fixed the amake-rules.mk Made a few fixes of the amake-rules.mk so the MINGW flag is slightly better handled (for instance,it will use gcc/g++ by default instead of cc). The main problem with MINGW is that you may have a shell. If that's the case, then the default rules would need to be different than what they currently endup being. . Fixed the '-' in MAKEFLAGS Sorry! This was actually correct (having no - or only one - for strings). This is back to normal (compatible with GNU and SGI make tools). Also, command lines with proper quotes would get additional, invalid quotes (such as the --use-time="..."). This was fixed by changing the low level lstr_spaces() function. There is another bug which is when a space and quotes are present in a value, but the spaces are not inside the quotes, then the whole option gets quoted, but the quotes won't be properly escaped. (i.e. an option such as --test="a" "b" will improperly be transformed in "--test="a" "b"" instead of "--test=\"a\" \"b\""). This will be fixed later. . Fixed the alternate (#!/bin/amake) When the --directory was specified on the recursive call and the makefile included an alternate different from the running amake, then it was trying to cd in the specified directory twice (the 2nd time it would fail). The --directory is still being passed down to the alternate amake, however, the path is restored before AMake runs the alternate command line. * August 28th, 2003 V2.10.15 . Added support for proper maximum concurrent under Linux If you have the "/proc/cpuinfo" file properly defined under your Linux system, then AMake will count the number of processors available on your system and multiply that by 2 as the default maximum concurrent targets to be created at once. . Fixed the help output The help output would write long flags information right after the flag without spaces. Now, such flags get their information properly aligned on the next line. . Added some special targets The following targets are defined in the WMAKE tool from Watcom and were added to AMake: .AFTER (like .END) .AUTODEPEND (like --autodepend, similar to $(...:I)) .BEFORE (like .BEGIN) .BLOCK (like --block) .CHECK (like --check; check existance of target) .CONTINUE (like -k/--keep-going) .ERASE (like .DELETE_ON_ERROR) .EXTENSIONS (like .SUFFIXES) .HOLD (see --hold and --keep-on-error) .KEEP_ON_ERROR (see --hold and --keep-on-error) .NOCHECK (see --no-check) .OPTIMIZE (accepted but ignored) .SYMBOLIC (like .PHONY) . Added support for Watcom special macros Available are $^@, $^*, $^&, $^:, $^. $[@, $[*, $[&, $[:, $[. $]@, $]*, $]&, $]:, $]. Note that can cause some problems if you used $^ directly followed by one of these characters. In the DOS version the $^& at the end of a line may be taken as $^ + new line. For this support a .TAIL macro was created. This is equivalent to $(.TARGET:T) . Added Watcom variables The following variables were added for watcom compatibility: __WINDOWS__set to 1 when running under Microsoft Windows __VERSION__the version of AMake (i.e. 210 for 2.10.15) __MAKEOPTS__the flags AMake was invoked with __MAKEFILES__set to the list of makefiles (see -f) . Added variables The following variables were added: MAKE_RELEASEthe release of AMake (i.e. 15) __RELEASE__the release of AMake (i.e. 15) . Fixed the doc Found tons of errors in the doc. Also, I made major fixes in regard to many topics which were either wrong or out of date. Fixed the English a bit too. Also added doc about the new targets, options, variables, etc. And added support for things I wrote in the doc. a while ago but weren't actually implemented yet! (such as support for the MAKELIBS variable). . Added support for new functions $(<func> ...) The following new functions were added: $(call ...) $(echo ...) $(error ...) $(message ...) $(warning ...) $(wordlist ...) . Added a --list-special (or --list-attributes), --list-preprocessor and --list-functions These special command line options can be used to get information about all of the - special targets and attributes currently supported, - preprocessor instructions (includes information such as whether it can alter the current condition state) - list of macro functions such as $(call me,at,the,usual,number) The --help, --list-special, --list-preprocessor and --list-functions can all be used on the same command line. In this case you will get all the lists. . Added support for target variables It is quite often useful to have a variable set with a value specific to one or several targets but not all. This is useful when you have a single set of command lines to work on multiple targets. The syntax is like in GNU, except AMake understands it with multiple targets and multiple variable names used on the same command line: t1 t2 t3: v1 v2 v3 += additional value All the usual operators are accepted (= := ?= != <= +=). Enjoy! (I know I will!) . Fixed the #shell This preprocessor would always execute the shell commands, even in --dry-run. Now, it won't be unless you start the command line with a + (you can still use the - to avoid errors, +- or -+ will work). Fixed the bug with the - which would generate a crash trying to free the buffer at the address + 1. . Added support for the <?, >? and ^^ operators The preprocessor accepting an expression can now make use of the minimum (<?), maximum (>?) and logical xor (^^) operators. . Added the .[NO]CHECK and --[no-]check Added the .[NO]CHECK targets and --[no-]check command line options to enable/disable the option of the same name from Watcom. Namely that the target will be or not checked for existance once the commands were executed. This is, in a way, the opposite of .PHONY. . Fixed the amake-rules.mk The TARGET_MARCH under Linux now needs to be -march=<arch> Also the assembler tool (as) doesn't support any architecture under the Intel 80x86. . Added support for a makeinit file AMake will check for a make file named "makeinit". If it exists it is loaded first. Also, the .depend file can be ignored with the --no-default-make option command line (the makeinit is ignored in that case too). . Fixed a possible bug in lshl_print() This function would use memcmp() with a null pointer (and a length of zero) which is not safe on all systems. . Fixed the touch option When utime() or fopen() were to fail because the file was write protected or otherwise, the touch would silently fail. . Fixed the min/max shell return error code The function would print out a debug printf(). . Added [else]ifeqi and [else]ifneqi These preprocessor will automatically ignore the case of the input strings. Thus "ifeqi VERSION version" is true. . Added .loaddll (pre-processor) Accepted but ignored for Watcom Make compatibility. . Fixed several error messages Some additional error messages make use of the strerror() function to print out the system errors. Also some messages were syntactically wrong. . Fixed the $(MAKEFLAGS) This variable (and some others) should have been set to the flags used on the command line and the .MAKEFLAGS/.MAKEOPTS special targets. However, the - was missing in the front of all the options. Also, the .MAKEFLAGS and .MAKEOPTS didn't properly refresh these variables. This is also fixed. Finally, the options followed by a list of strings wouldn't use the "-" or "--" in the front of the 2nd, 3rd, etc. option. . Implemented the --use-time option This option allows you to simulate any date and time at which AMake is started. . Fixed the --<compatible> & defaults Some defaults were not respected when entering a certain mode. Now this is done by forcing some defaults when a compatibility flag is encountered (ie. in Watcom land the --check is effective by default under DOS). . Fixed "else ifnmake" This was previously taken as "else ifndef". . Fixed "[else]if[n]eq[i] <var> <value>" These functions would crash AMake if the variable wasn't set. These were also added in the amake.vim. . Fixed the tmpnam() The shell.c source code would generate "unique" file names using tmpnam(). This was replaced with an sprintf() and the names as "{tmp,/tmp,.}/amake<pid>-<#>.tmp" (i.e. AMake test for a tmp directory in the current directory, then in the root path and otherwise uses the current directory as a temporary directory). The defaults can be overridden by defining the TMPDIR environment variable or a macro in the makefile. . Fixed the cpp.c This file was making use of sys_errcnt and sys_errstr which is deprecated. I now use the strerror() function (which I should very certainly use much more all over the place!) . Fixed the lfil_open() function This function can now return NULL instead of existing when a file doesn't (seem to) exist. Some other functions make use of this. . Fixed the ldep_depend() function When opening a source file, the lfil_open() can return NULL and thus we can know if the file exists or not. If the file doesn't exist, we simply don't do anything. In this case, the makefile should have been written to automatically generate the file (or retrieve it out from an archive). This means only the second run of amake will properly generate the dependencies, but on the first run the files will anyway be marked as out of date. Thus the system should work properly in all cases. NOTE: this is important if some of your source files are not checked out at all (this especially happens when you just checked in without the option saying "keep a local copy") * April 10th, 2003 V2.10.14 . Fixed the lvar_macro() function The function would always copy a list of words, even when that list was empty. Now it needs to include at least one item. This was making the system crash especially when the '::' macro separator was used as in: $(MY_VAR::*.c=*.o) If MY_VAR didn't include any *.c files, then amake would either crash or generate random strings. * November 13rd, 2002 V2.10.13 . Fixed the lstr_clean() function This function would loop forever in case the result was the empty string (as in "foo/../myfile.c - the path is equivalent to a null path). * October 30th, 2002 V2.10.12 . Reading of makefiles in Win32 The files were open for reading with "r" instead of "rb". This was fixed. The Unix versions are not affected by this change. . Bad cleaning rules The makefile.mingw and makefile.dos never had their clean, clobber and rmtargets targets working. This was fixed. . Compiles with NMAKE and CL Made a few changes so it compiles with CL (from Microsoft VC++ v6.x) and doesn't generate any warning. Note that if you have MinGW, don't use CL!!! Since it generates binaries which are twice bigger, it really doesn't make any sense to use CL (unless you absolutly want MS debugs). * October 23rd, 2002 V2.10.11 . Variable pattern bug When a pattern finished by a lone backslash, the software would hang. This was fixed. . Package bug The previous binary package was "wrongly" named with -i386 but no system was specified. It was Linux in case you were wondering. . Package addition I added a compiled version of amake to work under Silicon Graphics Inc. IRIX 6.5 with at least a MIPS 5000. I added a compiled version of amake to work under MS-Windows (compiled with MinGW). Works with at least Win32 and an 80386 processor. * October 21st, 2002 V2.10.10 . Fixed the module I noticed that the module wouldn't put all the files within a sub-directory. Also, I created several type of compressions for both sources and binary versions. . Pattern bug fix There was a bug in the pattern checking code where a pattern finishing with a ? or [] followed by an asterisk (*) would fail. . Compiles under MinGW There is makefile.mingw so you can easilly create amake under MS-Windows. . Version bug fix The version returned by uname() is better handled so the realease and bug release versions are ignored if invalid. . Flags fixed Some command line flags were fixed so they work properly. . Shell errors The lsh_error() function didn't increase the error counter at all. * Marsh 1st, 2002 V2.10.9 . New features The rules include one rule to compile java programs which looks like this: $(JAVAC) $(JAVAFLAGS) <filename>.java You can use this default rule with a line as follow: MyClass.class: $(.TARGET).java * June 15th, 2000 V2.10.8 . New features Compiles under IRIX 6.5 without warnings with C Pro V7.x. The new system macro $(.SERIAL) was added so one can easily create unique file names and such in its shell scripts A new letter was added in macro support to give an easy way to transform paths - defined in variables such $(PATH) and $(XFILESEARCHPATH) - in a list of words. Simply use: $(PATH:P). The REPORT.BUG was added so as to enable an easy way to report bugs found in amake including all the revelant informations. . Bug fixes AMake was setting environment variables using a local string variable. This was fixed by duplicating (allocating) the necessary strings. The archive searching mechanism now uses a length to test the name so it doesn't check after the end of the string (though it should be null terminated, it's safer this way). The pattern search didn't check if a file was a directory or not. Patterns such as */*.c would return errors on files in the current directory which were not directories. The documentation was wrongly defining CINCLUDEPATH as CINCLUDEDIR. In Linux V2.2.x bash starts with echo OFF enforced before to execute the default startup shell scripts. That way amake always starts silently now. Since the %: %,v targets have been fixed, the 'if test ...' has been removed from the amake-rules.mk file. Fixed the amake.doc for some syntax, grammar errors and forgotten entries. * March 12th, 2000 V2.10.7 . New features AMake has one more variable assignment operator which will take the right side words as filenames which are read in and used as the contains of the variable(s). This operator syntax is: <variable> <= <filenames> . Bug fixes The --order option had a couple of crashing bugs when targets without any dependencies where used. The --state-file and --error-output-file where defined as single character flags instead of string parameters. The #ifmake preprocessor operation would not properly take in account the result of the test. A couple of string functions didn't handle DOS filenames properly. Avoid calls to system() with empty command lines (and therefore NULL string pointers). A few things like the $(.TARGET:H) instead of $(.TARGET:D) were modified to be slightly more accurate. Enabled the input to use '\n' (unix), '\r\n' (PC) or '\r' (Mac) to mark the end of a line. Fixed the RSC/SCCS problems were the modified sources would not always recompile. * December 1st, 1999 V2.10.6 . New features AMake accepts the --out-of-date option so as to make sure all the targets at all the levels are made out of date. This is equivalent to a make clean. * November 14th, 1999 V2.10.5 . New features CMake compatibility was added. This simply ensures that AMake will run in parallel mode even when options such as --jobs 1 or targets such as .NO_PARALLEL: are used. It also turns ON the network feature. Yet, this one can be turned OFF in the script. The amake.doc was updated to include the sunmake binary name (and smake on SUN systems). Added concurrent C compile & link options in the amake rules file. AMake compiles under FreeBSD and includes another makefile to use under that system and create the software. AMake accepts patterns on special targets as in the following: .PRECIOUS: %.o %.c %.s %.l %.y %.p %.f note that this option doesn't actually work for the .IGNORE, .SILENT and .SINGLESHELL for these are specific to the command lines. It only applies to the following targets: .DELETE_ON_ERROR, .INTERMEDIATE, .NOTMAIN, .ORDER, .PHONY, .PRECIOUS and .SECONDARY. . Bugs fixes AMake doesn't need to have a makefile anymore. The default rules will suffices. However, AMake will need to have access to these rules. Calling AMake smake under SUN would have called the Joerg compatible mode anyway. This is fixed. The SUN make <macro>:sh=<command> let's the shell transform the variables in <command>. AMake was transformed to do the same thing. However, comments are still withdrawn before the result is sent to the shell interpreter. Updated all the makefiles to include the network.c source file. The --precious & --secondary main flags were not taken in account to prevent intermediate files deletion. The SUN version wouldn't work because the environment would end with an empty string instead of a NULL pointer. This was fixed and it works much better. * November 7th, 1999 V2.10.4 . New features AMake recognize a .ERROR target which is ran whenever an error occured. The $(.ALLSRC) target will list all the targets which generated an error before the .ERROR commands are executed. AMake accepts macro transformation patterns which include spaces or tabs as in: $(MACRO: s.%.o = %.o ) . Bugs fixes Fixed a bug which would declare existing files as intermediate and would therefore delete some source files which could be the edited once * August 30th, 1999 V2.10.3 . New features AMake compiles under SunOS 5.x It will search for the system makefiles in the current directory as well and search for files named amake.rules and make.rules. The GNU Make options can be specified with an equal sign as in "--file=myscript" The default makefile can be Iamakefile, iamakefile, Imakefile, imakefile when the --imake option is used. Several other options were added to enhance the support of Imake in AMake. It also checks for the IMAKE... environment variables. To complet the Imake features, AMake understands the following additional options on the command line: --imake --imakeCfile <source filename> --imake-only --imake-output <script filename> --keepCfile --template <template> -T <template> When no default makefile is found AMake will check for an SCCS filename (i.e. any makefile name with "s." prepended) or an RCS filename (i.e. any makefile name with ",v" appeneded). If one of these file is found AMake will generate the default necessary command to retrieve it. AMake now understands the following macro syntax: <macro>:sh = <command> and $(<macro>:sh) A new version of make.vim was created to support the syntax of AMake and all its functions, special targets, pre-processor, etc. When some files are automatically removed by AMake the user can know about them with the use of the --show-removed-file command line option. . Bug fixes the lstr_clean() was fixed so file names such as ../../test will not be reduced and therefore will work. the locking file is named LOCK.amk under DOS (instead of LOCK.amake) the CINCLUDEPATH doesn't need to be defined when the special variable $(<name>:I) is used; AMake will use the current working directory as the default (before it would generate a fatal error) GNU compatibility mode searches for GNUmakefile first once in a while the use of a macro with a set of directories would crash AMake which was actually freeing the same variable twice a target without any commands is now properly transformed with the correct default target (pattern, suffixes or .DEFAULT) the llst_concat() would increase the pos parameter even when this one was -1 (i.e. inserting new parameters at the very beginning instead of appending them) the pattern rules are much better handled and will work in most cases; before it would use the first matching pattern rule instead of the proper pattern rule and it would go through all the patterns looping for a quite long time; there was also a problem with patterns such as s.% where the stem would have been invalid fixed the $(<varname>:I) and $(<varname>:U) so the I and U can also be used to start any filename; thus $(<varname>:ISO) will not be used like if $(<varname>:I) was given * August 7th, 1999 V2.10.2 . New features --case-sensitive option --case-insensitive option . Bug fixes $(<var>:E) doesn't return hidden files $(<var>:R) doesn't suppress hidden files $(<var>:?) handles the / and \ properly under DOS the default system filenames are not freed before to be used (system.mk or amake-rules.mk) a comment which doesn't start at the beginning of a line will silently be removed (even) before a target is declared; after, it will become part of the shell commands By default, the \ will be used to skip only a very few characters when you use AMake in DOS. This doesn't change the behavior of AMake under any other systems. The --gnu and --sun work properly (i.e. these are accepted). . More explainations Made sure the software compiled under MS-DOS with the C/C++ compiler from Microsoft (Version 1.60.5270). Suppress the $(shell ...) in DOS compatible mode (at this time I didn't program pipes in MS-DOS). Fixed the default patterns for variable transformations: $(<var>:R) will return hidden filenames; $(<var>:E) will not return hidden filenames; $(<var>:?) where ? is any of R, E, H, T will take the backslash in account when you compile the DOS version (so a filename like object/amake.c is similar to object\amake.c toward these options). File names under DOS and AMIGA will be compared case insensitive by default. If AMake would be called make on any system except Linux it was supposed to enter the ANSII mode automatically. That was fixed. The makefile.dos was fixed so it includes argument.c instead of arguements.c. The makefile.dos would create a file named forget.tmp; now this file is automatically deleted once not necessary any more. The makefile.dos also includes /W4 to force the compiler to generate all the warnings it can. Some of the unused parameters errors were suppressed with the use of the #warning preprocessor available with CL from Microsoft.
Be the first person to add a text review.
Copyright © 2009 Geeknet, Inc. All rights reserved. Terms of Use
Thanks for your rating!
Would you also like to write a review?
Thanks for your review!
Get credit for your review by logging in via OpenID. Click your account provider: