Commit 2e7cd176d49f93fc000d0db24c90b9511fe383ce
authorMichel Pollet <buserror@gmail.com>
Sat, 16 Jun 2012 08:42:26 +0000 (09:42 +0100)
committerMichel Pollet <buserror@gmail.com>
Sat, 16 Jun 2012 08:42:26 +0000 (09:42 +0100)
make V=1 will create a /tmp/simavr_conf.log to help find why
the cores won't compile

Signed-off-by: Michel Pollet <buserror@gmail.com>
simavr/Makefile

index 7a67d32357e806518123773d14e425378c915534..365a099994beb14dc89f98ee23c59c31f2a207b2 100644 (file)
@@ -108,15 +108,20 @@ config: ${OBJ}/cores.deps sim_core_config.h sim_core_decl.h
 # ship with old version of avr-gcc and associated and needs
 # to be verified
 #
+ifeq ($(V), 1)
+DEBUGLOG=/tmp/simavr_conf.log
+else
+DEBUGLOG=/dev/null
+endif
 sim_core_config.h ${OBJ}/cores.deps: $(cores) Makefile
        @echo CONF $@
        @conf=""; decl=""; array=""; \
-       mkdir -p ${OBJ} ; echo >${OBJ}/cores.deps ; \
+       mkdir -p ${OBJ} ; echo >${OBJ}/cores.deps ; echo >$(DEBUGLOG) ;\
        for core in cores/*.c ; do \
                file=$$core; global=$${core/cores\/sim_}; global=$${global/.c}; \
                upper=$$(echo $$global|tr '[a-z]' '[A-Z]'); \
                if $(CC) -E $(CFLAGS) ${AVR_CPPFLAGS} $$file \
-                       >/dev/null 2>&1 ; then \
+                       >>$(DEBUGLOG) 2>&1 ; then \
                        conf+="#define CONFIG_$$upper 1\n"; \
                        obj=$${file/.c/.o} ; obj=$${obj/cores\/}; \
                        printf "\$${OBJ}/libsimavr.a: \$${OBJ}/$$obj\n">>${OBJ}/cores.deps ; \