Re: Using make to build rpms

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

 



Michael Dengler wrote:
> >RPM_DIRS = postgresql
> >
> >default:
> >    $(foreach DIR,$(RPM_DIRS),$(MAKE) -C $DIRS rpm)

Is the "DIR" versus "DIRS" a mispelling?

You will need to enclose the full DIR variable with parens or the
variable will be $D not $(DIR).

Also make sure the starts with a TAB and not four spaces as you have
indicated in your message.

RPM_DIRS = postgresql

default:
	$(foreach DIR,$(RPM_DIRS),$(MAKE) -C $(DIR) rpm)

Call me old fashioned but I would prefer portable make syntax and
would simply use a shell for loop there.  It is not much more
characters, will work with any make and to my eyes seems just a little
more obvious at a glance.

RPM_DIRS = postgresql

default:
	for subdir in $(RPM_DIRS); do \
	  (cd $$subdir && $(MAKE) rpm) || exit 1; \
	done

> GNUmakefile:70: *** multiple target patterns.  Stop.
> 
> Any help would be greatly appreciated!

For questions about GNU make which really do not have a lot of
relevance to rpm you might get better assistance asking on the
help-make@xxxxxxx mailing list.

HTH,
Bob

_______________________________________________
Rpm-list mailing list
Rpm-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/rpm-list

[Index of Archives]     [RPM Ecosystem]     [Linux Kernel]     [Red Hat Install]     [PAM]     [Red Hat Watch]     [Red Hat Development]     [Red Hat]     [Gimp]     [Yosemite News]     [IETF Discussion]

  Powered by Linux