This repository has been archived by the owner on Jun 11, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.mingw
71 lines (57 loc) · 2.03 KB
/
Makefile.mingw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#
# Makefile.mingw
#
# Description: Makefile for win32 (mingw)
#
PLUGIN_SRC := ./src
PLUGIN_PO := ./po
PLUGIN_TOP := .
-include $(PLUGIN_TOP)/local.mak
PIDGIN_TREE_TOP ?= ../../..
include $(PIDGIN_TREE_TOP)/libpurple/win32/global.mak
PLUGIN_VERSION := $(shell ./scripts/gen-version.sh)
PIDGIN_VERSION := $(shell cat $(PIDGIN_TREE_TOP)/VERSION)
PLUGIN=pidgin-hide-chat-on-join
PLUGIN_WIN32_ZIP := $(PLUGIN)-$(PLUGIN_VERSION)-win32.zip
$(shell mkdir -p .stamps)
.PHONY: all clean
all: config.h
$(MAKE) -C $(PLUGIN_SRC) -f Makefile.mingw all
$(MAKE) -C $(PLUGIN_PO) -f Makefile.mingw all
config.h: .stamps/v$(PLUGIN_VERSION) configure.ac scripts/gen-mingw-config_h.sh
./scripts/gen-mingw-config_h.sh > config.h
.stamps/v$(PLUGIN_VERSION):
rm -f .stamps/v*
touch $@
# If configure.ac.in exists, we generate configure.ac. Otherwise we assume that
# configure.ac exists (as in the release tarball).
ifneq ("$(wildcard configure.ac.in)", "")
configure.ac: configure.ac.in ./scripts/gen-configure_ac.sh
./scripts/gen-configure_ac.sh
endif
dist: $(PLUGIN_WIN32_ZIP)
$(PLUGIN_WIN32_ZIP): all
rm -rf win32-install-dir
mkdir -p win32-install-dir/$(PLUGIN)/plugins
cp src/pidgin-hide-chat.dll win32-install-dir/$(PLUGIN)/plugins
$(STRIP) win32-install-dir/$(PLUGIN)/plugins/pidgin-hide-chat.dll
GETTEXT_PKG=$$(awk -F= '/GETTEXT_PACKAGE=/ {print $$2}' configure.ac); \
for f in po/*.po; do \
lang=$$(basename $$f .po) || exit 1; \
mkdir -p win32-install-dir/$(PLUGIN)/locale/$${lang}/LC_MESSAGES || exit 1; \
cp po/$${lang}.gmo \
win32-install-dir/$(PLUGIN)/locale/$${lang}/LC_MESSAGES/$${GETTEXT_PKG}.mo || exit 1; \
done
for f in README.md CHANGES.md AUTHORS.md COPYING; do \
unix2dos -n $$f win32-install-dir/$$f; \
done
rm -f $(PLUGIN_WIN32_ZIP)
cd win32-install-dir && \
zip -r ../$(PLUGIN_WIN32_ZIP) *
clean:
$(MAKE) -C $(PLUGIN_SRC) -f Makefile.mingw clean
$(MAKE) -C $(PLUGIN_PO) -f Makefile.mingw clean
rm -f config.h
if [[ -f configure.ac.in ]]; then rm -f configure.ac; fi
rm -rf win32-install-dir .stamps
rm -f $(PLUGIN_WIN32_ZIP)