Hi mentors,

I'm trying to package caffe as said [1] at debian-science@ .
However I encountered a problem when writing debian/rules.
I'd like to take over the whole build process, so I wrote:

         32 override_dh_auto_build: build_cpuonly
         33 
         34 build_cpuonly: config_cpuonly
         35     $(shell debian/my/00-fix-caffe-include-path-debian.sh)
         36     $(MAKE) -j4 all
         37     $(MAKE) -j4 test
         38     $(MAKE) runtest
         39 
         40 config_cpuonly:
         41     cp debian/my/Makefile.config.cpuonly Makefile.config
         42 
         43 .PHONY: config_cpuonly build_cpuonly

in file debian/rules.
Then I tested it with

        $ dh build
        
It works fine, but when I test the rules file with

        $ dpkg-buildpackage -us -uc

the dpkg-buildpackage ignored my build process,
because target "all" depends on the file Makefile.config which is
generated by target config_cpuonly, and dpkg-buildpackage 
doesn't run config_cpuonly target.

I'm very confused about it.
Well, maint-guide says so:

        Then you issue the following command in the source directory:
        $ dpkg-buildpackage -us -uc
        This will do everything to make full binary and source packages
        for you. It will:
        [...]
        build the program (debian/rules build) <----------------
        ATTENTION!
        [...]
        
The highlighted line means

        debian/rules build  --> dh build
        
That is to say, "$ dh build" works, while 
    "dpkg-buildpackage" -->
        "debian/rules build" -->
            "dh build"
doesn't work.

HOW SHOULD THE WEIRD THING HAPPEN?

[1] https://lists.debian.org/debian-science/2015/05/msg00024.html


-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/1432218658.976.18.ca...@gmail.com

Reply via email to