Hi Dave,
Dave Festing wrote:
> If I used the ptxdist drop nanocom compile I would get this:
>
> davef@davef-laptop:~/Pengutronix12$ ptxdist go
>
> -----------------------
> target: nanocom.compile
> -----------------------
>
> make[1]: Entering directory `/home/davef/Pengutronix12/platform-mini2440/
> build-target/nanocom-1.0'
> rm -rf *.o nanocom
> make[1]: Leaving directory `/home/davef/Pengutronix12/platform-mini2440/
> build-target/nanocom-1.0'
> finished target nanocom.compile
>
> -----------------------
> target: nanocom.install
> -----------------------
>
> finished target nanocom.install
>
> ----------------------------
> target: nanocom.install.pack
> ----------------------------
>
> ptxdist: warning: PKG didn't install anything to '/home/davef/
> Pengutronix12/platform-mini2440/packages/nanocom-1.0'
> finished target nanocom.install.pack
>
> ----------------------------
> target: nanocom.install.post
> ----------------------------
>
> finished target nanocom.install.post
>
> -----------------------------
> target: nanocom.targetinstall
> -----------------------------
>
> install_init: preparing for image creation of 'nanocom'...
> install_init: @ARCH@ -> armel
> install_init: @PACKAGE@ -> nanocom
> install_init: @VERSION@ -> 1.0
> install_init: @DEPENDS@ ->
> install_init: preinst not available
> install_init: postinst not available
> install_init: prerm not available
> install_init: postrm not available
> install_fixup: @PRIORITY@ -> optional ... done.
> install_fixup: @SECTION@ -> base ... done.
> install_fixup: @AUTHOR@ -> "Juergen Beisert
> <juergen\@kreuzholzen.de>" ... done.
> install_fixup: @DESCRIPTION@ -> missing ... done.
> xpkg_finish: collecting license (unknown) ... done.
> xpkg_finish: creating ipkg package ...
>
> No suitable file '/bin/nanocom' could be found in any of these locations:
> /home/davef/Pengutronix12/platform-mini2440/build-target/
> nanocom-1.0/nanocom.mini2440
> /home/davef/Pengutronix12/platform-mini2440/build-target/nanocom-1.0/
> nanocom
>
> install file:
> src=Pengutronix12/platform-mini2440/build-target/nanocom-1.0/nanocom
> dst=/bin/nanocom
> owner=0
> group=0
> permissions=0755
>
>
> Error: file not found: /home/davef/Pengutronix12/platform-mini2440/
> build-target/nanocom-1.0/nanocom
>
> Error: install_file failed!
> failed
> make: ***
> [/home/davef/Pengutronix12/platform-mini2440/state/nanocom.targetinstall]
> Error 1
>
> **********
\o/ This time no PEBCAK! ;)
When I first build the nanocom, I get:
-----------------------
target: nanocom.compile
-----------------------
make[1]: Entering directory
`/long/path/platform-mini2440/build-target/nanocom-1.0'
rm -rf *.o nanocom
arm-v4t-linux-gnueabi-gcc mux.c nanocom.c menu.c -o nanocom
make[1]: Leaving directory
`/long/path/platform-mini2440/build-target/nanocom-1.0'
finished target nanocom.compile
It first removes any previously built object and binary files. Then it
builds them again.
After the "ptxdist drop nanocom compile; ptxdist go" it looks like at you side:
-----------------------
target: nanocom.compile
-----------------------
make[1]: Entering directory
`/home/jb/work/Pengutronix/public_bsps/OSELAS.BSP-Pengutronix-Mini2440/platform-mini2440/build-target/nanocom-1.0'
rm -rf *.o nanocom
make[1]: Leaving directory
`/home/jb/work/Pengutronix/public_bsps/OSELAS.BSP-Pengutronix-Mini2440/platform-mini2440/build-target/nanocom-1.0'
finished target nanocom.compile
It deletes again everything, but this time it does not built it again.
> Doing ptxdist drop nanocom compile then ptxdist compile nanocom would
> result in a nanocom binary then doing ptxdist go would fail and the binary
> was gone.
It's a really broken Makefile.
all: clean nanocom
nanocom:
$(CC) mux.c nanocom.c menu.c -o nanocom
clean:
rm -rf *.o nanocom
Make checks only once if a target must be built. So, for the second time it
detects an existing nanocom and the target nanocom will not be built. But the
"clean" target will be run...
Create a patch that removes the listed "clean" target from the "all" target.
Then it should work as expected. Or:
> I found if I made the changes to the files, quilt refresh,
> ptxdist clean nanocom and then ptxdist go it worked.
You should change the existing Makefile into a correct one. It should look
like this:
all: nanocom
nanocom: mux.c menu.c nanocom.c
clean:
rm -rf *.o nanocom
.PHONY: all clean
Regards,
Juergen
--
Pengutronix e.K. | Juergen Beisert |
Linux Solutions for Science and Industry | http://www.pengutronix.de/ |