bug-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

The bugs in make v3.82


From: Alexander Kornilov
Subject: The bugs in make v3.82
Date: Tue, 28 Sep 2010 13:54:42 +0400

Hello!

My name is Alexander I am software developer and prepare build system
based on make tool. My approach of build system design is differs from
existing build systems as QMake, autotools and etc. e.g. QMake generate
result make file according template (*.pro files) rules. In my build
system present main module - engine, written on native make file
language and project settings file which contains list of sources files,
project settings and etc and this file include to engine module. So it's
concept of my build system in few words 
make -r -f engine.mak target=project_settings.min

While I working on my build system I find some bugs in working of make
tool.
Could you, please, review issues?

BUG #0001:
-----------

Description: The rule for generation dependency file (%.d) doesn't work
on Linux platform;
Severity: Major;

Steps to reproduce:
1. Unpack bug_0001.zip files from letter attachment;
2. Execute makefile from archive on Linux platform. Result of operation:
     > make
     Creating dir Obj
     Generate dependency for test1.cpp
     Generate dependency for test2.cpp
     Compiling test1.cpp
     Compiling test2.cpp
     Linking test.so
3. Remove file rm ./Obj/test1.o;
4. Execute makefile again. Result of operation:
     Compiling test1.cpp
     Linking test.so
5. Remove file rm ./Obj/test1.d;
6. Execute makefile again.

Expected result:
  The dependency file generated by rule %.d;

Actual result:
  make: *** No rule to make target `Obj/test1.d', needed by `test.so'.
Stop.

Note: On Windows platform this case work properly.
On Linux it's work only if dependency files placed in current directory
and -include of dependency files written without $(addprefix ...).
Adding vpath %.d doesn't solve problem.

BUG #0002:
-----------

Description: Wrong slash used in path of files from subdirectories on
Windows platform;
Severiy: Minor;

Steps to reproduce:
1. Unpack bug_0002.zip files from letter attachment;
2. Execute makefile from archive on Windows platform. Result of
operation:

Expected result:
   > make
   Creating dir 'Obj';
   Compiling test1.cpp;
   Compiling test2.cpp;
   Compiling sub_dir\test3.cpp;
   Compiling sub_dir\lib\test4.cpp;
   Linking test.so;

Actual result:
   > make
   Creating dir 'Obj';

   Compiling test1.cpp;

   Compiling test2.cpp;

   Compiling sub_dir/test3.cpp;

   Compiling sub_dir\lib/test4.cpp;

   Linking test.so;

WINDOWS x64:
------------

Also I see what make v3.82 doesn't work on Windows x64 platforms. It's
fails when tries to execute temporary .bat file. I fix this issue by my
self in file sub_proc.c. The patch is attached to letter in file
make_v3.82_win64_patch.zip.
In file make_v3.82_win64.zip compiled make.exe file for Windows x64
platforms compiled by Intel C/C++ Compiler v11.1.067 with maximum speed
optimizations (include IPO) with my fix. I test it on Windows XP x64 and
Windows Seven Ultimate x64 and make.exe work properly.

Klocwork:
----------

In file klocwork_report_make_v3.82.zip I attach static code analysis
tool Klocwork report for make v3.82 generated by my build system.
Klocwork find many vulnerabilities and warnings in make code. According
my experience Klocwork is 'smart' tool  and maybe you find it's comments
useful for make improvement.

Make language:
---------------
In my build system I am often use condition constructions and upset by
make language restrictions  Are you plan support condition construction
like this:
ifeq ($(SHELL), sh.exe) && (($(target_platform), WinXP) ||
($(target_platform), WinVista))
endif

ifeq ($(SHELL), sh.exe)
  <..>
elif ($(SHELL), /bin/bash)
  <..>
endif

I mind AND (&& and OR (||) 'elif' operations in ifeq.

Questions:
-----------

I doesn't find solve of this my problem in user-guide. Could I 'know'
what particular target user pass to make?
e.g. > make clean

Could I use target name in condition operation inside makefile like
this?
ifeq ($(SOMTHING), clean)
 <Change some project variables only for target 'clean'>
endif


Thanks a lot all make authors for cool crossplatform reliable tool!
Waiting for you respond!

---
Best wishes,
Alexander


 
Alexander Kornilov

 
Teleca
24 Salganskaya St., Nizhny Novgorod, 603105, Russia
Phone: +78312788198, Fax: +78312577230
address@hidden
http://www.teleca.com/
 
Follow what's going on at Teleca's blog on 
http://www.whatsyourideaoftomorrow.blogspot.com/.
 
The information contained in this message is confidential and is intended for 
the addressee(s) only. If you have received this message in error please notify 
the sender immediately. The unauthorized use, disclosure, copying or alteration 
of this message is strictly prohibited.
 

Attachment: bug_0001.zip
Description: Zip archive

Attachment: bug_0002.zip
Description: Zip archive

Attachment: klocwork_report_make_v3.82.zip
Description: Zip archive

Attachment: make_v3.82_win64_patch.zip
Description: Zip archive


reply via email to

[Prev in Thread] Current Thread [Next in Thread]