مشکل پروندهی rules زیر چیه؟ که خطا میده؟ فقط میدونم که مشکلم در شیوهی بکاربردن متغیر هاست.
#!/usr/bin/make -f
clean:
@# Do nothing
build:
@# Do nothing
binary:
PROJ_NAME := debian/phoenix
FIREFOX_RELEASE := firefox-esr
mkdir -p $(PROJ_NAME)
mkdir -p $(PROJ_NAME)/etc/$(FIREFOX_RELEASE)
mkdir -p $(PROJ_NAME)/etc/$(FIREFOX_RELEASE)/phoenix
mkdir -p $(PROJ_NAME)/etc/$(FIREFOX_RELEASE)/phoenix/userjs
mkdir -p $(PROJ_NAME)/etc/$(FIREFOX_RELEASE)/phoenix/resources
mkdir -p $(PROJ_NAME)/etc/$(FIREFOX_RELEASE)/policies
mkdir -p $(PROJ_NAME)/usr/lib/$(FIREFOX_RELEASE)
mkdir -p $(PROJ_NAME)/usr/share/doc/phoenix
cp -r configs $(PROJ_NAME)/etc/$(FIREFOX_RELEASE)/phoenix
cp -Tr userjs/linux/ $(PROJ_NAME)/etc/$(FIREFOX_RELEASE)/phoenix/userjs
cp -r filter.pac $(PROJ_NAME)/etc/$(FIREFOX_RELEASE)/phoenix/resources
cp -r defaults $(PROJ_NAME)/etc/$(FIREFOX_RELEASE)
cp policies.json $(PROJ_NAME)/etc/$(FIREFOX_RELEASE)/policies
cp phoenix.cfg $(PROJ_NAME)/usr/lib/$(FIREFOX_RELEASE)
cp README.md $(PROJ_NAME)/usr/share/doc/phoenix
dh_gencontrol
dh_builddeb
dpkg-buildpackage: info: source package phoenix
dpkg-buildpackage: info: source version 20241229.1-1
dpkg-buildpackage: info: source distribution UNRELEASED
dpkg-buildpackage: info: source changed by Seyed Mohamad Amin Modaresi <modaresisofthard@proton.me>
dpkg-buildpackage: info: host architecture amd64
dpkg-source --before-build .
debian/rules clean
dpkg-source -b .
dpkg-source: info: using source format '3.0 (quilt)'
dpkg-source: info: building phoenix using existing ./phoenix_20241229.1.orig.tar.gz
dpkg-source: info: building phoenix in phoenix_20241229.1-1.debian.tar.xz
dpkg-source: info: building phoenix in phoenix_20241229.1-1.dsc
debian/rules binary
PROJ_NAME := debian/phoenix
make: PROJ_NAME: No such file or directory
make: *** [debian/rules:10: binary] Error 127
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2
با زیر حل شد. متغیر های makefile باید خارج از قسمت ها تعریف میشدن.
#!/usr/bin/make -f
PROJ_NAME := debian/phoenix
FIREFOX_RELEASE := firefox
clean:
@# Do nothing
build:
@# Do nothing
binary:
mkdir -p $(PROJ_NAME)
mkdir -p $(PROJ_NAME)/etc/$(FIREFOX_RELEASE)
mkdir -p $(PROJ_NAME)/etc/$(FIREFOX_RELEASE)/phoenix
mkdir -p $(PROJ_NAME)/etc/$(FIREFOX_RELEASE)/phoenix/userjs
mkdir -p $(PROJ_NAME)/etc/$(FIREFOX_RELEASE)/phoenix/resources
mkdir -p $(PROJ_NAME)/etc/$(FIREFOX_RELEASE)/policies
mkdir -p $(PROJ_NAME)/usr/lib/$(FIREFOX_RELEASE)
mkdir -p $(PROJ_NAME)/usr/share/doc/phoenix
cp -r configs $(PROJ_NAME)/etc/$(FIREFOX_RELEASE)/phoenix
cp -Tr userjs/linux/ $(PROJ_NAME)/etc/$(FIREFOX_RELEASE)/phoenix/userjs
cp -r filter.pac $(PROJ_NAME)/etc/$(FIREFOX_RELEASE)/phoenix/resources
cp -r defaults $(PROJ_NAME)/etc/$(FIREFOX_RELEASE)
cp policies.json $(PROJ_NAME)/etc/$(FIREFOX_RELEASE)/policies
cp phoenix.cfg $(PROJ_NAME)/usr/lib/$(FIREFOX_RELEASE)
cp README.md $(PROJ_NAME)/usr/share/doc/phoenix
dh_gencontrol
dh_builddeb