Makefile rules are not portable but easily fixable!

Bug #1376520 reported by LStranger
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
intltool
New
Undecided
Unassigned

Bug Description

The rules like this:

%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@

can work only in GNU make. And fix is very simple, such rule should be converted into:

.SUFFIXES: .directory.in .directory
.directory.in.directory: $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@

That's all, it will work with any make known to me (GNU, FreeBSD, OpenBSD, Solaris).
Fix it, please, we continue to get complains from users that our packages cannot build without GNU make.
Thank you in advance.

Revision history for this message
LStranger (andrej-rep) wrote :

Oh, I had to think more and actually test it on BSD. I missed another GNU thing - $(wildcard ...).
I'm sorry but I believe there is a solution for it also.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.