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;
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
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.
add a comment |
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
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 domake clean
? Does it just go directly back to your shell prompt? Does it pause a little? Does it say anything? Are you sure that yourrm
command begins with a tab and not a bunch of spaces? If you add some innocuous command (likedate
orls
) immediately before or after therm
, do they run when you domake clean
?
– G-Man
8 hours ago
add a comment |
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
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
debian make dpkg
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.
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 domake clean
? Does it just go directly back to your shell prompt? Does it pause a little? Does it say anything? Are you sure that yourrm
command begins with a tab and not a bunch of spaces? If you add some innocuous command (likedate
orls
) immediately before or after therm
, do they run when you domake clean
?
– G-Man
8 hours ago
add a comment |
Can you clarify what happens when you domake clean
? Does it just go directly back to your shell prompt? Does it pause a little? Does it say anything? Are you sure that yourrm
command begins with a tab and not a bunch of spaces? If you add some innocuous command (likedate
orls
) immediately before or after therm
, do they run when you domake 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
add a comment |
2 Answers
2
active
oldest
votes
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.
1
That did it. Thanks!
– JustAnotherAltruist
8 hours ago
add a comment |
The "make clean" does nothing because $(TARGETS) isn't a variable, you've never set it to any value.
add a comment |
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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.
1
That did it. Thanks!
– JustAnotherAltruist
8 hours ago
add a comment |
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.
1
That did it. Thanks!
– JustAnotherAltruist
8 hours ago
add a comment |
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.
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.
answered 8 hours ago


G-ManG-Man
14.7k94175
14.7k94175
1
That did it. Thanks!
– JustAnotherAltruist
8 hours ago
add a comment |
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
add a comment |
The "make clean" does nothing because $(TARGETS) isn't a variable, you've never set it to any value.
add a comment |
The "make clean" does nothing because $(TARGETS) isn't a variable, you've never set it to any value.
add a comment |
The "make clean" does nothing because $(TARGETS) isn't a variable, you've never set it to any value.
The "make clean" does nothing because $(TARGETS) isn't a variable, you've never set it to any value.
answered 6 hours ago


stolenmomentstolenmoment
36713
36713
add a comment |
add a comment |
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.
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
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 yourrm
command begins with a tab and not a bunch of spaces? If you add some innocuous command (likedate
orls
) immediately before or after therm
, do they run when you domake clean
?– G-Man
8 hours ago