linux - Makefile Anomaly: Invoke `make` and it appears to be running another makefile -


i have following makefile:

objdirs       = runtime/core/common runtime/core/graphic/symbolxlib runtime/core/map runtime/core/symboldictionary \                 runtime/coreclient/runtimecorejava objs          = $(wildcard $(objdirs:=/*.o)) targeta       = libruntimecorejava.a targetd       = libruntimecorejava.so targetd1      = $(targetd).1 targetd2      = $(targetd).1.0 targetd3      = $(targetd).1.0.0 ar            = ar cqs link          = g++ symlink       = ln -f -s ldflags = -shared -wl,-soname,libruntimecorejava.so.1  : $(targetd) $(targeta)  $(targetd) : $(objs)         echo "building dynamic lib using "$(objs)         #$(cxx) $(ldflags) $(objs)         #$(symlink) $(targetd) $(targetd1)         #$(symlink) $(targetd) $(targetd2)         #$(symlink) $(targetd) $(targetd3)  $(targeta) : $(objs)         echo "building static lib using "$(objs)         #$(ar) $(targeta) $(objs) 

when run make @ same level makefile appears call makefile unrelated one.

in file included runtime/core/common/jnicallback.cpp:16: runtime/core/common/stdafx.h:33:17: error: log.h: no such file or directory runtime/core/common/stdafx.h:34:23: error: namespace.h: no such file or directory runtime/core/common/jnicallback.cpp:18:25: error: jnicallback.h: no such file or directory make: *** [runtime/core/common/jnicallback.o] error 1 

as can see not building source, taking object files compiled , putting them static , dynamic library. why trying compile source? below directory structure.

[matt6809@hogganz400 src]$ ls -l drwxrwxr-x  2 matt6809 matt6809  4096 mar  2 11:47 bindebug drwxrwxr-x  2 matt6809 matt6809  4096 feb 15 13:31 binrelease drwxrwxr-x  2 matt6809 matt6809  4096 feb 22 11:03 include drwxrwxr-x  2 matt6809 matt6809  4096 mar  5 10:55 libdebug drwxrwxr-x  2 matt6809 matt6809  4096 feb 15 11:25 librelease -rw-rw-r--  1 matt6809 matt6809   824 mar  6 15:48 makefile drwxrwxr-x  5 matt6809 matt6809  4096 feb 14 16:03 runtime drwxrwxr-x  6 matt6809 matt6809  4096 feb 14 16:43 system 

i 100% sure in same directory makefile. gives?

your targets have object files prerequisites (whatever object files happen in directories @ time). object files exist, make check them see if they're out of date , should rebuilt. if checks object file, finds corresponding source file that's newer, tries recompile object , there's header file missing, you'll error message see. there no evidence of makefile in play.

there couple of ways deal it. the easiest way move source files away directory run make (or vise-versa).

edit:
@eriktous has pointed out better way: use make -r disable built-in rules.


Comments

Popular posts from this blog

delphi - How to convert bitmaps to video? -

jasper reports - Fixed header in Excel using JasperReports -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -