-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #169 from matsduf/fix-make-and-makefile
Fix make and makefile
- Loading branch information
Showing
6 changed files
with
72 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
Makefile | ||
/Makefile | ||
Makefile.old | ||
Build | ||
Build.bat | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# This is the main Makefile in this directory and should be kept | ||
# GNU Make compatible. | ||
|
||
.POSIX: | ||
.SUFFIXES: .po .mo | ||
.PHONY: all dist touch-po update-po extract-pot | ||
|
||
DISTNAME = Zonemaster-CLI | ||
POFILES := $(shell find . -maxdepth 1 -type f -name '*.po' -exec basename {} \;) | ||
MOFILES := $(POFILES:%.po=%.mo) | ||
POTFILE = $(DISTNAME).pot | ||
PMFILES := $(shell find ../lib -type f -name '*.pm' | sort) | ||
|
||
all: $(MOFILES) | ||
@echo | ||
@echo Remember to make sure all of the above names are in the | ||
@echo MANIFEST file, or they will not be installed. | ||
@echo | ||
|
||
touch-po: | ||
@touch $(POTFILE) $(POFILES) | ||
|
||
update-po: extract-pot $(POFILES) | ||
|
||
extract-pot: | ||
@xgettext --output $(POTFILE) --sort-by-file --add-comments --language=Perl --from-code=UTF-8 -k__ -k\$$__ -k%__ -k__x -k__n:1,2 -k__nx:1,2 -k__xn:1,2 -kN__ -kN__n:1,2 -k__p:1c,2 -k__np:1c,2,3 -kN__p:1c,2 -kN__np:1c,2,3 $(PMFILES) | ||
|
||
$(POTFILE): extract-pot | ||
|
||
%.po: $(POTFILE) | ||
@msgmerge --update --backup=none --quiet --no-location $(MSGMERGE_OPTS) $@ $(POTFILE) | ||
|
||
.po.mo: | ||
@msgfmt -o $@ $< | ||
@mkdir -p locale/`basename $@ .mo`/LC_MESSAGES | ||
@ln -vf $@ locale/`basename $@ .mo`/LC_MESSAGES/$(DISTNAME).mo | ||
|
||
show-fuzzy: | ||
@for f in $(POFILES) ; do msgattrib --only-fuzzy $$f ; done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,15 @@ | ||
.POSIX: | ||
.SUFFIXES: .po .mo | ||
.PHONY: all dist touch-po update-po extract-pot | ||
# This is a wrapper for BSD Make (FreeBSD) to execute | ||
# GNU Make (gmake) and the primary makefile GNUmakefile. | ||
|
||
DISTNAME = Zonemaster-CLI | ||
POFILES != find . -maxdepth 1 -type f -name '*.po' | ||
MOFILES := $(POFILES:%.po=%.mo) | ||
POTFILE = $(DISTNAME).pot | ||
PMFILES != find ../lib -type f -name '*.pm' | sort | ||
GNUMAKE?= gmake | ||
FILES != ls * | ||
|
||
all: $(MOFILES) | ||
@echo | ||
@echo Remember to make sure all of the above names are in the | ||
@echo MANIFEST file, or they will not be installed. | ||
@echo | ||
# File targets should be evaluated by gmake. | ||
.PHONY: all $(FILES) | ||
|
||
touch-po: | ||
@touch $(POTFILE) $(POFILES) | ||
all: | ||
@${GNUMAKE} $@ | ||
|
||
update-po: extract-pot $(POFILES) | ||
.DEFAULT: | ||
@${GNUMAKE} $@ | ||
|
||
extract-pot: | ||
@xgettext --output $(POTFILE) --sort-by-file --add-comments --language=Perl --from-code=UTF-8 -k__ -k\$$__ -k%__ -k__x -k__n:1,2 -k__nx:1,2 -k__xn:1,2 -kN__ -kN__n:1,2 -k__p:1c,2 -k__np:1c,2,3 -kN__p:1c,2 -kN__np:1c,2,3 $(PMFILES) | ||
|
||
$(POTFILE): extract-pot | ||
|
||
%.po: $(POTFILE) | ||
@msgmerge --update --backup=none --quiet --no-location $(MSGMERGE_OPTS) $@ $(POTFILE) | ||
|
||
.po.mo: | ||
@msgfmt -o $@ $< | ||
@mkdir -p locale/`basename $@ .mo`/LC_MESSAGES | ||
@ln -vf $@ locale/`basename $@ .mo`/LC_MESSAGES/$(DISTNAME).mo | ||
|
||
show-fuzzy: | ||
@for f in $(POFILES) ; do msgattrib --only-fuzzy $$f ; done |