Makefile for a simple Debian RepoHow to write makefile for bulk processing?How can I copy a git repo from a Makefile?makefile uses same receipe for multiple targetsHow can I made a Debian ports like repo?Why 'Makefile' demands dependency?Use variable for string substution in makefileConvert Debian Makefile for FreeBSDReference function in Makefile?bash/debian: strange makefile behaviourHello World Makefile

Is it true that "only photographers care about noise"?

What does the homotopy coherent nerve do to spaces of enriched functors?

Was planting UN flag on Moon ever discussed?

Part of my house is inexplicably gone

Mathematica 12 has gotten worse at solving simple equations?

What does "lit." mean in boiling point or melting point specification?

How to handle when PCs taste a potion that is actually poison?

What's the difference between DHCP and NAT? Are they mutually exclusive?

If the pressure inside and outside a balloon balance, then why does air leave when it pops?

In Pandemic, why take the extra step of eradicating a disease after you've cured it?

Make Gimbap cutter

Am I allowed to determine tenets of my contract as a warlock?

What is the logic behind charging tax _in the form of money_ for owning property when the property does not produce money?

My mom's return ticket is 3 days after I-94 expires

What is this Amiga 2000 mod?

Selecting by attribute using Python and a list

Why is it bad to use your whole foot in rock climbing

Why are ambiguous grammars bad?

Suppose leased car is totalled: what are financial implications?

What did the 8086 (and 8088) do upon encountering an illegal instruction?

What do you call the action of "describing events as they happen" like sports anchors do?

What is the proper event in Extended Events to track stored procedure executions?

Print "N NE E SE S SW W NW"

How many sets of dice do I need for D&D?



Makefile for a simple Debian Repo


How to write makefile for bulk processing?How can I copy a git repo from a Makefile?makefile uses same receipe for multiple targetsHow can I made a Debian ports like repo?Why 'Makefile' demands dependency?Use variable for string substution in makefileConvert Debian Makefile for FreeBSDReference function in Makefile?bash/debian: strange makefile behaviourHello World Makefile






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








1















Making a very basic Debian repo for a client. Started with a bash script, but decided a Makefile would eliminate duplicated work. I've hammered out a working Makefile, but only if I make all. For some reason, a straight make only builds the first deb. make clean does nothing. What am I doing wrong?



MFGR:=MyCoolEmployer
MAJOR:=1
MINOR:=0
REVISION:=1000
VERSION:=$(MAJOR).$(MINOR)-$(REVISION)
MODELS:=SpiffyModel1 SpiffyModel2
COMMON:=common
SOFT_TARGETS:=$(COMMON) $(MODELS)
SOFT_TARGET_FOLDERS:=$(patsubst %, $(MFGR)-%_$(VERSION), $(SOFT_TARGETS))
DEBs := $(patsubst %, %.deb, $(SOFT_TARGET_FOLDERS))
REPO_DEBs :=$(patsubst %, Repo/binary/%, $(DEBs))
REPO=repo.zip
PACKAGES_GZ := Repo/binary/Packages.gz

%.deb: %
dpkg-deb --build $<

$(REPO_DEBs): $(DEBs)
cp $^ Repo/binary/

$(PACKAGES_GZ): $(REPO_DEBs)
dpkg-scanpackages Repo/binary /dev/null | gzip -9c > $@

$(REPO): $(REPO_DEBs) $(PACKAGES_GZ)
cd Repo; zip -r -v -0 ../$@ . ; cd ..

TARGETS: $(REPO) $(PACKAGES_GZ) $(REPO_DEBs) $(DEBs)

all: TARGETS

clean:
rm -f $(TARGETS)


This assumes the packages exist as folders named MyCoolEmployer-PACKAGENAME_1.0-1000










share|improve this question







New contributor



JustAnotherAltruist is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.



















  • Can you clarify what happens when you do make clean?  Does it just go directly back to your shell prompt?  Does it pause a little?  Does it say anything?  Are you sure that your rm command begins with a tab and not a bunch of spaces?  If you add some innocuous command (like date or ls) immediately before or after the rm, do they run when you do make clean?

    – G-Man
    8 hours ago

















1















Making a very basic Debian repo for a client. Started with a bash script, but decided a Makefile would eliminate duplicated work. I've hammered out a working Makefile, but only if I make all. For some reason, a straight make only builds the first deb. make clean does nothing. What am I doing wrong?



MFGR:=MyCoolEmployer
MAJOR:=1
MINOR:=0
REVISION:=1000
VERSION:=$(MAJOR).$(MINOR)-$(REVISION)
MODELS:=SpiffyModel1 SpiffyModel2
COMMON:=common
SOFT_TARGETS:=$(COMMON) $(MODELS)
SOFT_TARGET_FOLDERS:=$(patsubst %, $(MFGR)-%_$(VERSION), $(SOFT_TARGETS))
DEBs := $(patsubst %, %.deb, $(SOFT_TARGET_FOLDERS))
REPO_DEBs :=$(patsubst %, Repo/binary/%, $(DEBs))
REPO=repo.zip
PACKAGES_GZ := Repo/binary/Packages.gz

%.deb: %
dpkg-deb --build $<

$(REPO_DEBs): $(DEBs)
cp $^ Repo/binary/

$(PACKAGES_GZ): $(REPO_DEBs)
dpkg-scanpackages Repo/binary /dev/null | gzip -9c > $@

$(REPO): $(REPO_DEBs) $(PACKAGES_GZ)
cd Repo; zip -r -v -0 ../$@ . ; cd ..

TARGETS: $(REPO) $(PACKAGES_GZ) $(REPO_DEBs) $(DEBs)

all: TARGETS

clean:
rm -f $(TARGETS)


This assumes the packages exist as folders named MyCoolEmployer-PACKAGENAME_1.0-1000










share|improve this question







New contributor



JustAnotherAltruist is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.



















  • Can you clarify what happens when you do make clean?  Does it just go directly back to your shell prompt?  Does it pause a little?  Does it say anything?  Are you sure that your rm command begins with a tab and not a bunch of spaces?  If you add some innocuous command (like date or ls) immediately before or after the rm, do they run when you do make clean?

    – G-Man
    8 hours ago













1












1








1








Making a very basic Debian repo for a client. Started with a bash script, but decided a Makefile would eliminate duplicated work. I've hammered out a working Makefile, but only if I make all. For some reason, a straight make only builds the first deb. make clean does nothing. What am I doing wrong?



MFGR:=MyCoolEmployer
MAJOR:=1
MINOR:=0
REVISION:=1000
VERSION:=$(MAJOR).$(MINOR)-$(REVISION)
MODELS:=SpiffyModel1 SpiffyModel2
COMMON:=common
SOFT_TARGETS:=$(COMMON) $(MODELS)
SOFT_TARGET_FOLDERS:=$(patsubst %, $(MFGR)-%_$(VERSION), $(SOFT_TARGETS))
DEBs := $(patsubst %, %.deb, $(SOFT_TARGET_FOLDERS))
REPO_DEBs :=$(patsubst %, Repo/binary/%, $(DEBs))
REPO=repo.zip
PACKAGES_GZ := Repo/binary/Packages.gz

%.deb: %
dpkg-deb --build $<

$(REPO_DEBs): $(DEBs)
cp $^ Repo/binary/

$(PACKAGES_GZ): $(REPO_DEBs)
dpkg-scanpackages Repo/binary /dev/null | gzip -9c > $@

$(REPO): $(REPO_DEBs) $(PACKAGES_GZ)
cd Repo; zip -r -v -0 ../$@ . ; cd ..

TARGETS: $(REPO) $(PACKAGES_GZ) $(REPO_DEBs) $(DEBs)

all: TARGETS

clean:
rm -f $(TARGETS)


This assumes the packages exist as folders named MyCoolEmployer-PACKAGENAME_1.0-1000










share|improve this question







New contributor



JustAnotherAltruist is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











Making a very basic Debian repo for a client. Started with a bash script, but decided a Makefile would eliminate duplicated work. I've hammered out a working Makefile, but only if I make all. For some reason, a straight make only builds the first deb. make clean does nothing. What am I doing wrong?



MFGR:=MyCoolEmployer
MAJOR:=1
MINOR:=0
REVISION:=1000
VERSION:=$(MAJOR).$(MINOR)-$(REVISION)
MODELS:=SpiffyModel1 SpiffyModel2
COMMON:=common
SOFT_TARGETS:=$(COMMON) $(MODELS)
SOFT_TARGET_FOLDERS:=$(patsubst %, $(MFGR)-%_$(VERSION), $(SOFT_TARGETS))
DEBs := $(patsubst %, %.deb, $(SOFT_TARGET_FOLDERS))
REPO_DEBs :=$(patsubst %, Repo/binary/%, $(DEBs))
REPO=repo.zip
PACKAGES_GZ := Repo/binary/Packages.gz

%.deb: %
dpkg-deb --build $<

$(REPO_DEBs): $(DEBs)
cp $^ Repo/binary/

$(PACKAGES_GZ): $(REPO_DEBs)
dpkg-scanpackages Repo/binary /dev/null | gzip -9c > $@

$(REPO): $(REPO_DEBs) $(PACKAGES_GZ)
cd Repo; zip -r -v -0 ../$@ . ; cd ..

TARGETS: $(REPO) $(PACKAGES_GZ) $(REPO_DEBs) $(DEBs)

all: TARGETS

clean:
rm -f $(TARGETS)


This assumes the packages exist as folders named MyCoolEmployer-PACKAGENAME_1.0-1000







debian make dpkg






share|improve this question







New contributor



JustAnotherAltruist is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.










share|improve this question







New contributor



JustAnotherAltruist is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.








share|improve this question




share|improve this question






New contributor



JustAnotherAltruist is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.








asked 9 hours ago









JustAnotherAltruistJustAnotherAltruist

83




83




New contributor



JustAnotherAltruist is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




New contributor




JustAnotherAltruist is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.














  • Can you clarify what happens when you do make clean?  Does it just go directly back to your shell prompt?  Does it pause a little?  Does it say anything?  Are you sure that your rm command begins with a tab and not a bunch of spaces?  If you add some innocuous command (like date or ls) immediately before or after the rm, do they run when you do make clean?

    – G-Man
    8 hours ago

















  • Can you clarify what happens when you do make clean?  Does it just go directly back to your shell prompt?  Does it pause a little?  Does it say anything?  Are you sure that your rm command begins with a tab and not a bunch of spaces?  If you add some innocuous command (like date or ls) immediately before or after the rm, do they run when you do make clean?

    – G-Man
    8 hours ago
















Can you clarify what happens when you do make clean?  Does it just go directly back to your shell prompt?  Does it pause a little?  Does it say anything?  Are you sure that your rm command begins with a tab and not a bunch of spaces?  If you add some innocuous command (like date or ls) immediately before or after the rm, do they run when you do make clean?

– G-Man
8 hours ago





Can you clarify what happens when you do make clean?  Does it just go directly back to your shell prompt?  Does it pause a little?  Does it say anything?  Are you sure that your rm command begins with a tab and not a bunch of spaces?  If you add some innocuous command (like date or ls) immediately before or after the rm, do they run when you do make clean?

– G-Man
8 hours ago










2 Answers
2






active

oldest

votes


















1














Your question contains its own answer. 
By default, make processes only the first entry in the Makefile
You need to put the "all" entry first.






share|improve this answer


















  • 1





    That did it. Thanks!

    – JustAnotherAltruist
    8 hours ago


















3














The "make clean" does nothing because $(TARGETS) isn't a variable, you've never set it to any value.






share|improve this answer























    Your Answer








    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "106"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );






    JustAnotherAltruist is a new contributor. Be nice, and check out our Code of Conduct.









    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f524053%2fmakefile-for-a-simple-debian-repo%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    1














    Your question contains its own answer. 
    By default, make processes only the first entry in the Makefile
    You need to put the "all" entry first.






    share|improve this answer


















    • 1





      That did it. Thanks!

      – JustAnotherAltruist
      8 hours ago















    1














    Your question contains its own answer. 
    By default, make processes only the first entry in the Makefile
    You need to put the "all" entry first.






    share|improve this answer


















    • 1





      That did it. Thanks!

      – JustAnotherAltruist
      8 hours ago













    1












    1








    1







    Your question contains its own answer. 
    By default, make processes only the first entry in the Makefile
    You need to put the "all" entry first.






    share|improve this answer













    Your question contains its own answer. 
    By default, make processes only the first entry in the Makefile
    You need to put the "all" entry first.







    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered 8 hours ago









    G-ManG-Man

    14.7k94175




    14.7k94175







    • 1





      That did it. Thanks!

      – JustAnotherAltruist
      8 hours ago












    • 1





      That did it. Thanks!

      – JustAnotherAltruist
      8 hours ago







    1




    1





    That did it. Thanks!

    – JustAnotherAltruist
    8 hours ago





    That did it. Thanks!

    – JustAnotherAltruist
    8 hours ago













    3














    The "make clean" does nothing because $(TARGETS) isn't a variable, you've never set it to any value.






    share|improve this answer



























      3














      The "make clean" does nothing because $(TARGETS) isn't a variable, you've never set it to any value.






      share|improve this answer

























        3












        3








        3







        The "make clean" does nothing because $(TARGETS) isn't a variable, you've never set it to any value.






        share|improve this answer













        The "make clean" does nothing because $(TARGETS) isn't a variable, you've never set it to any value.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered 6 hours ago









        stolenmomentstolenmoment

        36713




        36713




















            JustAnotherAltruist is a new contributor. Be nice, and check out our Code of Conduct.









            draft saved

            draft discarded


















            JustAnotherAltruist is a new contributor. Be nice, and check out our Code of Conduct.












            JustAnotherAltruist is a new contributor. Be nice, and check out our Code of Conduct.











            JustAnotherAltruist is a new contributor. Be nice, and check out our Code of Conduct.














            Thanks for contributing an answer to Unix & Linux Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f524053%2fmakefile-for-a-simple-debian-repo%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            ParseJSON using SSJSUsing AMPscript with SSJS ActivitiesHow to resubscribe a user in Marketing cloud using SSJS?Pulling Subscriber Status from Lists using SSJSRetrieving Emails using SSJSProblem in updating DE using SSJSUsing SSJS to send single email in Marketing CloudError adding EmailSendDefinition using SSJS

            Кампала Садржај Географија Географија Историја Становништво Привреда Партнерски градови Референце Спољашње везе Мени за навигацију0°11′ СГШ; 32°20′ ИГД / 0.18° СГШ; 32.34° ИГД / 0.18; 32.340°11′ СГШ; 32°20′ ИГД / 0.18° СГШ; 32.34° ИГД / 0.18; 32.34МедијиПодациЗванични веб-сајту

            19. јануар Садржај Догађаји Рођења Смрти Празници и дани сећања Види још Референце Мени за навигацијуу