… | |
… | |
14 | LIBCGETOPT=1 |
14 | LIBCGETOPT=1 |
15 | |
15 | |
16 | # Define this to 1 if you do not have the gettext routines |
16 | # Define this to 1 if you do not have the gettext routines |
17 | WITHOUT_GETTEXT=0 |
17 | WITHOUT_GETTEXT=0 |
18 | |
18 | |
19 | |
19 | # For creating the archive |
|
|
20 | PACKAGE=getopt |
|
|
21 | VERSION=1.1.4 |
|
|
22 | BASENAME=$(PACKAGE)-$(VERSION) |
|
|
23 | UNLIKELYNAME=a8vwjfd92 |
20 | |
24 | |
21 | SHELL=/bin/sh |
25 | SHELL=/bin/sh |
22 | |
26 | |
23 | CC=gcc |
27 | CC=gcc |
24 | LD=ld |
28 | LD=ld |
… | |
… | |
27 | MSGFMT=msgfmt |
31 | MSGFMT=msgfmt |
28 | |
32 | |
29 | LANGUAGES = cs de es fr it ja nl pt_BR |
33 | LANGUAGES = cs de es fr it ja nl pt_BR |
30 | MOFILES:=$(patsubst %,po/%.mo,$(LANGUAGES)) |
34 | MOFILES:=$(patsubst %,po/%.mo,$(LANGUAGES)) |
31 | |
35 | |
32 | CPPFLAGS=-DLIBCGETOPT=$(LIBCGETOPT) -DWITH_GETTEXT=$(WITH_GETTEXT) -DLOCALEDIR=\"$(localedir)\" -DNOT_UTIL_LINUX |
36 | CPPFLAGS=-DLIBCGETOPT=$(LIBCGETOPT) -DWITH_GETTEXT=$(WITH_GETTEXT) -DLOCALEDIR=\"$(localedir)\" -DNOT_UTIL_LINUX -Dprogram_invocation_short_name=\"$(PACKAGE)\" -Dprogram_version=\"$(VERSION)\" |
33 | ifeq ($(LIBCGETOPT),0) |
37 | ifeq ($(LIBCGETOPT),0) |
34 | CPPFLAGS+=-I./gnu |
38 | CPPFLAGS+=-I./gnu |
35 | endif |
39 | endif |
36 | WARNINGS=-Wall \ |
40 | WARNINGS=-Wall \ |
37 | -W -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-qual \ |
41 | -W -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-qual \ |
… | |
… | |
91 | %.o: %.c |
95 | %.o: %.c |
92 | $(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c -o $*.o |
96 | $(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c -o $*.o |
93 | |
97 | |
94 | %.mo: %.po |
98 | %.mo: %.po |
95 | $(MSGFMT) -o $@ $< |
99 | $(MSGFMT) -o $@ $< |
|
|
100 | |
|
|
101 | # You need GNU tar for this to work! |
|
|
102 | .PHONY: package |
|
|
103 | package: clean |
|
|
104 | $(RM) -r $(UNLIKELYNAME) |
|
|
105 | mkdir $(UNLIKELYNAME) |
|
|
106 | ln -s .. $(UNLIKELYNAME)/$(BASENAME) |
|
|
107 | cd $(UNLIKELYNAME) && tar cfvzp ../$(BASENAME).tar.gz --exclude='CVS' --exclude='*.tar.gz' --exclude=$(UNLIKELYNAME) $(BASENAME)/* |
|
|
108 | $(RM) -r $(UNLIKELYNAME) |