Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#1734 Make file order problem

closed-fixed
Maarten Brock
5
2013-05-25
2010-12-31
Peter Van Epp
No

It appears that sdcpp isn't yet built when the library makefiles try to use it to create dependencies:

Building on Cygwin on windows from the latest source snapshot (but has been like this for a long time!)

SDCC : mcs51/gbz80/z80/ds390/pic16/pic14/TININative/ds400/hc08 3.0.1 #6092 (Dec
31 2010) (CYGWIN)

...

$ make install^M
make -f main.mk install^M
make[1]: Entering directory `/home/peter/sdcc/sdcc'
...
make[2]: Leaving directory `/home/peter/sdcc/sdcc/device/lib'^M
make model-ds390 model-ds400 model-hc08 models small-mcs51-stack-auto model-pic1
4 model-pic16 model-z80 model-gbz80^M
make[2]: Entering directory `/home/peter/sdcc/sdcc/device/lib'^M
rm -f Makefile.dep^M
for i in _atof.c _schar2fs.c _sint2fs.c _slong2fs.c _uchar2fs.c _uint2fs.c _ulon
g2fs.c _fs2schar.c _fs2sint.c _fs2slong.c _fs2uchar.c _fs2uint.c _fs2ulong.c _fs
add.c _fsdiv.c _fsmul.c _fssub.c _fseq.c _fsgt.c _fslt.c _fsneq.c fabsf.c frexpf
.c ldexpf.c expf.c powf.c sincosf.c sinf.c cosf.c logf.c log10f.c sqrtf.c tancot
f.c tanf.c cotf.c asincosf.c asinf.c acosf.c atanf.c atan2f.c sincoshf.c sinhf.c
coshf.c tanhf.c floorf.c ceilf.c modff.c errno.c _fscmp.c _fsget1arg.c _fsget2a
rgs.c _fsnormalize.c _fsreturnval.c _fsrshift.c _fsswapargs.c _logexpf.c _divsin
t.c _divuint.c _modsint.c _moduint.c _mulint.c _divslong.c _modslong.c _modulong
.c _divulong.c _mullong.c _atoi.c _atol.c abs.c labs.c rand.c _iscntrl.c _isdigi
t.c _isgraph.c _isprint.c _ispunct.c _isspace.c _islower.c _isupper.c _isxdigit.
c _strcat.c _strchr.c _strcmp.c _strcpy.c _strcspn.c _strncat.c _strncmp.c _strn
cpy.c _strpbrk.c _strrchr.c _strspn.c _strstr.c _strtok.c _memchr.c _memcmp.c _m
emcpy.c _memset.c _calloc.c _malloc.c _realloc.c _free.c printf_large.c puts.c g
ets.c assert.c time.c _autobaud.c _bp.c _decdptr.c _gptrget.c _gptrgetc.c _gptrp
ut.c _ser.c _setjmp.c serial.c _itoa.c _ltoa.c _spx.c _startup.c _strlen.c _memm
ove.c _heap.c sprintf.c vprintf.c printf_fast.c printf_fast_f.c printf_tiny.c pr
intfl.c bpx.c; do \^M
../../bin/sdcpp -std=c99 -M -I../../device/include -I../../device/incl
ude/mcs51 $i >${i}.dep; \^M
cat ${i}.dep >>Makefile.dep; \^M
rm ${i}.dep; \^M
done^M
/bin/sh: line 1: ../../bin/sdcpp: No such file or directory^M
/bin/sh: line 1: ../../bin/sdcpp: No such file or directory^M
...

(because at this point sdcpp hasn't been built yet):

...make[1]: Leaving directory `/home/peter/sdcc/sdcc/support/makebin'^M
make[1]: Entering directory `/home/peter/sdcc/sdcc/support/cpp'^M
gawk -f ./opt-gather.awk ./sdcpp.opt > tmp-optionlist^M
/bin/sh ./move-if-change tmp-optionlist optionlist^M
echo timestamp > s-options^M
...

Discussion

  • Maarten Brock
    Maarten Brock
    2011-01-06

    Peter,

    Is it fixed when you add $(SDCC_LIBS) to the dependency list of dep in Makefile.in ?

    # Creating dependencies
    # ---------------------
    dep: $(SDCC_LIBS)
    $(MAKE) -f main.mk dep
    @for pkg in $(PKGS); do\ $(MAKE) -C $$pkg dep ;\ done

    Maarten

     
  • Maarten Brock
    Maarten Brock
    2011-01-06

    Let's see if [ code ] ... [ / code ] works here...

    [code]
    # Creating dependencies
    # ---------------------
    dep: $(SDCC_LIBS)
    $(MAKE) -f main.mk dep
    @for pkg in $(PKGS); do\ $(MAKE) -C $$pkg dep ;\ done
    [/code]

     
  • Peter  Van Epp
    Peter Van Epp
    2011-01-06

    Maarten:
    This added to device/lib/Makefile (probably needs to be in Makefile.in really)
    seems to fix the problem. It builds ccp before doing the dependencies now.

    from:

    # Creating dependencies
    # ---------------------
    dep: Makefile.dep

    Makefile.dep: $(SOURCES) $(INCDIR)/*.h $(PORTINCDIR)/*.h
    rm -f Makefile.dep

    to:

    Makefile.dep: $(SOURCES) $(INCDIR)/*.h $(PORTINCDIR)/*.h $(CPP)

    .
    Peter

     
  • Peter  Van Epp
    Peter Van Epp
    2011-01-07

    Maarten:
    While the change below does fix this issue the real bug here is operator error on my part. At some point while doing builds of multiple versions I noticed that make install seemed to be doing a make first. Thus the version that fails was built by

    ./configure
    make install

    rather than the correct

    ./configure
    make
    make install

    which appears to build correctly. Sorry about the bad report!

    Peter

     
  • Maarten Brock
    Maarten Brock
    2011-09-04

    I added some dependencies that should fix this in SDCC 3.0.4 #6820.

     
  • Maarten Brock
    Maarten Brock
    2011-09-04

    • milestone: --> fixed
    • assigned_to: nobody --> maartenbrock
    • status: open --> closed-fixed