Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit a7983e9

Browse files
committed
Cosmetic improvements in plpython's make rule for libpython import library.
This build technique is remarkably ugly, but that doesn't mean it has to be unreadable too. Be a bit more liberal with the vertical whitespace, and give the .def file a proper dependency, just in case.
1 parent 4d894b4 commit a7983e9

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

src/pl/plpython/Makefile

+10-5
Original file line numberDiff line numberDiff line change
@@ -61,14 +61,19 @@ endif
6161
# which are not compatible with mingw gcc. Therefore we need to build a
6262
# new import library to link with.
6363
ifeq ($(PORTNAME), win32)
64+
6465
pytverstr=$(subst .,,${python_version})
66+
PYTHONDLL=$(subst \,/,$(WINDIR))/system32/python${pytverstr}.dll
67+
6568
OBJS += libpython${pytverstr}.a
69+
6670
libpython${pytverstr}.a: python${pytverstr}.def
67-
dlltool --dllname python${pytverstr}.dll --def python${pytverstr}.def --output-lib libpython${pytverstr}.a
68-
WD=$(subst \,/,$(WINDIR))
69-
python${pytverstr}.def:
70-
pexports $(WD)/system32/python${pytverstr}.dll > python${pytverstr}.def
71-
endif
71+
dlltool --dllname python${pytverstr}.dll --def python${pytverstr}.def --output-lib libpython${pytverstr}.a
72+
73+
python${pytverstr}.def: $(PYTHONDLL)
74+
pexports $^ > $@
75+
76+
endif # win32
7277

7378

7479
SHLIB_LINK = $(python_libspec) $(python_additional_libs) $(filter -lintl,$(LIBS))

0 commit comments

Comments
 (0)