[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: RFS: wmaker (try 2)



* Scott Howard <showard@debian.org>, 2011-12-30, 11:36:
(1) The follow section is pretty much unnecessary:
{snip}
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
	CFLAGS += -O0
else
	CFLAGS += -O2
endif

ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
	CFLAGS += -DDEBUG
endif

# These are used for cross-compiling and for saving the configure script
# from having to guess our platform (since we know it already)
export DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
export DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)

ifeq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
	HOSTSPEC := --build $(DEB_HOST_GNU_TYPE)
else
	HOSTSPEC := --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE)
endif
{end snip}

the dh command will parse DEB_BUILD_OPTIONS, so you don't need to explicitly define the CFLAGS for noopt and debug.

Err. That's only true for debhelper (>= 8.9) and compat>=9 (which this package doesn't use).

Also, I'm not too familiar with this package, but is there any reason why you want to explicitly set DEB_BUILD and DEB_HOST types in debian/rules?

Please see: /usr/share/doc/autotools-dev/README.Debian.gz

(On the other hand, dh_auto_configure does pass correct --build (and --host, if necessary) to configure script out of the box.)

override_dh_auto_configure:
	./autogen.sh
ifneq "$(wildcard /usr/share/misc/config.sub)" ""
	cp -f /usr/share/misc/config.sub config.sub
endif
ifneq "$(wildcard /usr/share/misc/config.guess)" ""
	cp -f /usr/share/misc/config.guess config.guess
endif
	LINGUAS="$(LINGUAS)" ./configure $(COMMON_OPTIONS) \
	$(WMAKER_OPTIONS) CFLAGS="$(CFLAGS)"
{end snip}

this is bad Makefile form, you need tabs before the ifneq/endif/ifneq,
otherwise make doesn't think it is part of the auto_configure override
and just part of the script.

Nope. This is perfectly all right, as far as syntax is concerned.

The only problem I see here is that it makes the build non-deterministic. This $(wildcard /usr/share/misc/config.sub) "idiom" is unfortunately very common. :(

--
Jakub Wilk


Reply to: