@@ -104,28 +104,10 @@ help:
104104 @echo " $( PROJECT) Makefile."
105105 @echo " The following commands are available:"
106106 @echo " "
107- @echo " make buildall : Build and test everything from scratch"
108- @echo " make bz2 : Package the library in a compressed bz2 archive"
109- @echo " make clean : Delete the vendor and target directories"
110- @echo " make codefix : Fix code style violations"
111- @echo " make deb : Build a DEB package for Debian-like Linux distributions"
112- @echo " make deps : Download all dependencies"
113- @echo " make doc : Generate source code documentation"
114- @echo " make lint : Test source code for coding standard violations"
115- @echo " make qa : Run all tests and reports"
116- @echo " make report : Generate various reports"
117- @echo " make rpm : Build an RPM package for RedHat-like Linux distributions"
118- @echo " make server : Start the development server"
119- @echo " make test : Run unit tests"
120- @echo " make versionup: Increase the version patch number"
107+ @awk ' /^## /{desc=substr($$0,4)} /^\.PHONY:/{if(NF>1) {target=$$2; if(desc) printf " make %-15s: %s\n",target,desc; desc=""}}' Makefile
121108 @echo " "
122- @echo " make fonts : Import and convert fonts"
123- @echo " make rpm_fonts: Build fonts RPM packages"
124- @echo " make deb_fonts: Build fonts DEB packages"
125- @echo " make bz2_fonts: Build fonts tar bz2 (tbz2) compressed archives"
126- @echo " "
127- @echo " To test and build everything from scratch:"
128- @echo " make buildall"
109+ @echo " To test and build everything from scratch, use the shortcut:"
110+ @echo " make x"
129111 @echo " "
130112
131113# alias for help target
@@ -136,24 +118,24 @@ all: help
136118.PHONY : x
137119x : buildall
138120
139- # Full build and test sequence
121+ # # Full build and test sequence
140122.PHONY : buildall
141123buildall : deps codefix fonts qa bz2 rpm deb
142124
143- # Package the library in a compressed bz2 archive
125+ # # Package the library in a compressed bz2 archive
144126.PHONY : bz2
145127bz2 :
146128 rm -rf $(PATHBZ2PKG )
147129 make install DESTDIR=$(PATHBZ2PKG )
148130 tar -jcvf $(PATHBZ2PKG ) /$(PKGNAME ) -$(VERSION ) -$(RELEASE ) .tbz2 -C $(PATHBZ2PKG ) $(DATADIR )
149131
150- # Delete the vendor and target directories
132+ # # Delete the vendor and target directories
151133.PHONY : clean
152134clean :
153135 rm -rf ./vendor $(TARGETDIR )
154136 cd util && make clean
155137
156- # Fix code style violations
138+ # # Fix code style violations
157139.PHONY : codefix
158140codefix :
159141 ./vendor/bin/phpcbf --config-set ignore_non_auto_fixable_on_exit 1
@@ -162,7 +144,7 @@ codefix:
162144 --standard=psr12 \
163145 src test
164146
165- # Build a DEB package for Debian-like Linux distributions
147+ # # Build a DEB package for Debian-like Linux distributions
166148.PHONY : deb
167149deb :
168150 rm -rf $(PATHDEBPKG )
@@ -187,7 +169,7 @@ endif
187169 echo "new-package-should-close-itp-bug" > $(PATHDEBPKG)/$(PKGNAME)-$(VERSION)/debian/$(PKGNAME).lintian-overrides
188170 cd $(PATHDEBPKG)/$(PKGNAME)-$(VERSION) && debuild -us -uc
189171
190- # Clean all artifacts and download all dependencies
172+ # # Clean all artifacts and download all dependencies
191173.PHONY : deps
192174deps : ensuretarget
193175 rm -rf ./vendor/* $(TARGETDIR ) /fonts
@@ -196,21 +178,21 @@ deps: ensuretarget
196178 && chmod +x ./vendor/phpstan.phar
197179 cd util && make deps
198180
199- # Generate source code documentation
181+ # # Generate source code documentation
200182.PHONY : doc
201183doc : ensuretarget
202184 rm -rf $(TARGETDIR ) /doc
203185 $(PHPDOC ) -d ./src -t $(TARGETDIR ) /doc/
204186
205- # Create missing target directories for test and build artifacts
187+ # # Create missing target directories for test and build artifacts
206188.PHONY : ensuretarget
207189ensuretarget :
208190 mkdir -p $(TARGETDIR ) /test
209191 mkdir -p $(TARGETDIR ) /report
210192 mkdir -p $(TARGETDIR ) /doc
211193 mkdir -p $(TARGETDIR ) /fonts
212194
213- # Install this application
195+ # # Install this application
214196.PHONY : install
215197install : uninstall
216198 mkdir -p $(PATHINSTBIN )
@@ -232,7 +214,7 @@ ifneq ($(strip $(CONFIGPATH)),)
232214 find $(PATHINSTCFG) -type f -exec chmod 644 {} \;
233215endif
234216
235- # Test source code for coding standard violations
217+ # # Test source code for coding standard violations
236218.PHONY : lint
237219lint :
238220 ./vendor/bin/phpcbf --config-set ignore_non_auto_fixable_on_exit 1
@@ -241,17 +223,17 @@ lint:
241223 ./vendor/bin/phpmd test text unusedcode,naming,design --exclude vendor
242224 php -r ' exit((int)version_compare(PHP_MAJOR_VERSION, "7", ">"));' || ./vendor/phpstan.phar analyse
243225
244- # Run all tests and reports
226+ # # Run all tests and reports
245227.PHONY : qa
246228qa : ensuretarget lint test report
247229
248- # Generate various reports
230+ # # Generate various reports
249231.PHONY : report
250232report : ensuretarget
251233 ./vendor/bin/pdepend --jdepend-xml=$(TARGETDIR ) /report/dependencies.xml --summary-xml=$(TARGETDIR ) /report/metrics.xml --jdepend-chart=$(TARGETDIR ) /report/dependecies.svg --overview-pyramid=$(TARGETDIR ) /report/overview-pyramid.svg --ignore=vendor ./src
252234 # ./vendor/bartlett/php-compatinfo/bin/phpcompatinfo --no-ansi analyser:run src/ > $(TARGETDIR)/report/phpcompatinfo.txt
253235
254- # Build the RPM package for RedHat-like Linux distributions
236+ # # Build the RPM package for RedHat-like Linux distributions
255237.PHONY : rpm
256238rpm :
257239 rm -rf $(PATHRPMPKG )
@@ -269,59 +251,58 @@ rpm:
269251 --define " _configpath /$( CONFIGPATH) " \
270252 -bb resources/rpm/rpm.spec
271253
272- # Start the development server
254+ # # Start the development server
273255.PHONY : server
274256server :
275257 $(PHP ) -t example -S localhost:$(PORT )
276258
277- # Tag this GIT version
259+ # # Tag this GIT version
278260.PHONY : tag
279261tag :
280262 git checkout main && \
281263 git tag -a ${VERSION} -m " Release ${VERSION} " && \
282264 git push origin --tags && \
283265 git pull
284266
285- # Run unit tests
267+ # # Run unit tests
286268.PHONY : test
287269test :
288270 cp phpunit.xml.dist phpunit.xml
289271 # ./vendor/bin/phpunit --migrate-configuration || true
290272 XDEBUG_MODE=coverage ./vendor/bin/phpunit --stderr test
291273
292- # Remove all installed files
274+ # # Remove all installed files
293275.PHONY : uninstall
294276uninstall :
295277 rm -rf $(PATHINSTBIN )
296278 rm -rf $(PATHINSTDOC )
297279
298- # Increase the version patch number
280+ # # Increase the version patch number
299281.PHONY : versionup
300282versionup :
301283 echo ${VERSION} | gawk -F. ' {printf("%d.%d.%d\n",$$1,$$2,(($$3+1)));}' > VERSION
302284
303285# ----------
304286
305- # import and convert fonts
287+ # # import and convert fonts
306288fonts :
307289 cd util && ($( COMPOSER) install -vvv --no-interaction)
308290 cd util && make build
309291
310- # Build fonts RPM packages for RedHat-like Linux distributions
292+ # # Build fonts RPM packages for RedHat-like Linux distributions
311293rpm_fonts :
312294 $(foreach PKGFONTDIR,$(FONTLIST ) , \
313295 cd ${CURRENTDIR} /util && make rpm PKGFONTDIR=${PKGFONTDIR} ; \
314296 )
315297
316- # Build fonts DEB packages for Debian-like Linux distributions
298+ # # Build fonts DEB packages for Debian-like Linux distributions
317299deb_fonts :
318300 $(foreach PKGFONTDIR,$(FONTLIST ) , \
319301 cd ${CURRENTDIR} /util && make deb PKGFONTDIR=${PKGFONTDIR} ; \
320302 )
321303
322- # build fonts compressed bz2 archives
304+ # # build fonts compressed bz2 archives
323305bz2_fonts :
324306 $(foreach PKGFONTDIR,$(FONTLIST ) , \
325307 cd ${CURRENTDIR} /util && make bz2 PKGFONTDIR=${PKGFONTDIR} ; \
326308 )
327-
0 commit comments